Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 02, 2010 08:57 PM by st_
Sep 22, 2007 08:23 AM|LINK
I'm creating a web service using C#, and wondering if it is possible to capture the parameter passed in from the URL?
Is there a function or something that can obtain the parameters like the normal Request.QueryString?
Thanks in advance!
Sep 22, 2007 01:19 PM|LINK
The nearest to a QueryString is when you are testing you can get a string like http://localhost:4740/WebSvcCS/Service.asmx?op=FilterAlphaNumeric.
If you want to monitor the traffic, your can install WSE and trace the traffic to a file.
Sep 22, 2007 02:05 PM|LINK
hi, really appreciate your reply :)
is there any code sample to obtain the parameter value in c# (im coding the web service with c#)
i see there's a function called UrlParameterReader, but not much information on the usage of it on websites.
is it the function to obtain the parameter value?
what i'm actually trying to do is to create a web service data source for a drop-down list of infopath form,
i'm hoping that by using
http://www.abc.com/webservice/service.asmx?entityname=tableA&attributename=attrA as the web service url, the web service can make use of the parameter and returns the set of values for the picklist.
am I hoping for the impossible or...?
Sep 22, 2007 06:59 PM|LINK
Having look at http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.urlparameterreader.aspx, you could do it that way but why not program web services a more conventional way?
Sep 22, 2007 07:38 PM|LINK
thanks for your advice, mind telling me how does the conventional way goes?
sorry, this is the first time i'm working on web service..
Sep 22, 2007 08:27 PM|LINK
Have a look at the following:
Sep 23, 2007 06:48 AM|LINK
hi thanks for your replies, really appreciate.
just realised i've been thinking too far off. could simply set the web method to take in a parameter, and the value can be passed in from infopath settings..
Jan 11, 2008 07:08 PM|LINK
I have the same question. Could you please share your code how you did?
Jan 11, 2008 07:28 PM|LINK
>I have the same question. Could you please share your code how you did?
What exactly do you need?
Jan 12, 2008 01:30 PM|LINK
How do I modify the above URL to take parameters? I tried something like below, all failed: