Web Service Pound sign encoding

E

Ethan Strauss

Hi,
I am consuming a web service
(http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl) using C#.Net 2
and in general it works just fine. But recently I have had trouble getting a
specific method to work whenever I put a pound sign ("#") in a query string.
When I added a backslash in front of the pound sign (@"\#"), it started
failing in more graceful fashion, making me think that there was a problem
with the way the pound sign was being transmitted and that the escaped
version was closer to correct, but it is still not quite right.
Does anyone know how else I might try encoding a pound sign to make it
work?
Thanks!
Ethan

ps. This web service is very complex. I don't suggest you try it unless you
want to spend awhile working at it. There is some documentation at
http://www.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html and I am
trying to use eSearch methods with an active history....
 
J

John Saunders [MVP]

Ethan Strauss said:
Hi,
I am consuming a web service
(http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl) using C#.Net
2 and in general it works just fine. But recently I have had trouble
getting a specific method to work whenever I put a pound sign ("#") in a
query string. When I added a backslash in front of the pound sign (@"\#"),
it started failing in more graceful fashion, making me think that there
was a problem with the way the pound sign was being transmitted and that
the escaped version was closer to correct, but it is still not quite
right.
Does anyone know how else I might try encoding a pound sign to make it
work?
Thanks!
Ethan

ps. This web service is very complex. I don't suggest you try it unless
you want to spend awhile working at it. There is some documentation at
http://www.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html and I am
trying to use eSearch methods with an active history....

How are you calling the web service? Are you using Add Web Reference?

There should be no problem with encoding if you are calling the web service
via the proxy generated by Add Web Reference.
 
E

Ethan Strauss

Yep, I added the Web Reference.
Ethan

John Saunders said:
How are you calling the web service? Are you using Add Web Reference?

There should be no problem with encoding if you are calling the web
service via the proxy generated by Add Web Reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top