Groups | Blog | Home
all groups > dotnet xml > march 2006 >

dotnet xml : Invoke Web Service using a Client Application


Ganesh Muthuvelu
3/26/2006 2:55:29 PM
Hi,
I have a web serivce created that contains several methods that are
NON-PRIMITIVE types - meaning I cannot test it directly from the browser. So,
I thought of devloping a client application in .NET that can submit the XML
request and receive the response.

I created the application and it works; but the problem is, the user have to
frame the XML each time as TEXT (build the XML) and then submit it which
takes a long time. Is there a way that given the web service and the method,
a windows form with controls dynamically be created based on the types?.
These controls will basically form as placeholders so that the user can
simply type in the required values and submit the XML request?.

Any pointers will be greatly appreciated..

Thanks,
Martin Honnen
3/27/2006 12:00:00 AM


[quoted text, click to view]


[quoted text, click to view]

I am not sure why you work with raw XML at all. If you build a web
service with .NET (or other frameworks to write web services) then it
exposes its description as a WSDL document and the .NET framework has a
tool named wsdl.exe so that you can read the WSDL document and
automatically create the source code of a web service client proxy class
that exposes methods with .NET types, not with any XML. You can then use
that client proxy class in your applications to make calls to the web
service and receive the result, all abstracted away from SOAP but with
..NET types and objects. Instead of using wsdl.exe as a tool yourself you
can also simply add a reference to the wsdl file in your Visual Studio
project.
Of course that does not give you a form to fill in the data, I could
imagine there are tools for that too but I don't think the .NET
framework has that built in.


--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button