Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically calling a method from a Web Service
Message
From
06/09/2012 04:43:58
 
 
To
05/09/2012 12:52:09
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01552418
Message ID:
01552464
Views:
33
>Recently, there was a thread where I showed a link which allows to dynamically call a method into a Web Service. This was allowing us to build a small EXE and put some textboxes in it to enter the method name. Thus, the code was flexible enough to adjust and use that generic code to call the required method at the Web Service level. That works well. However, that approach does not support the fact that we could add a query string to the URL of the Web Service. If we do so, the code will not work as the register of the object need to be the .asmx + the ?wsdl, which does not make any room for a query string.
>
>Has anyone found on the net a way to to that, or any other approaches which would allow us to enter a method name in a textbox, have the generic code to call the Web Service to that method, and benefit from a Web Service URL containing a query string?
>
>Here is an example:
>
>http://www.mydomain.com/WebService/MyWebService.asmx
>
>Then, from the code, I need to enter values like this in my form:
>
>CreateCustomer()
>CreateInvoice()
>
>But, I always need to pass a query string such as this:
>
>http://www.mydomain.com/WebService/MyWebService.asmx?NoClient=1

The above links didn't work for me. But Webservices use SOAP/POST so query strings won't normally work.
If it's your web service that is being called you might be able to use something like this :http://stackoverflow.com/questions/2006828/possible-to-invoke-asmx-service-with-parameter-via-url-query-string

If not you'd have to build your own Soap request.....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform