Groups > Borland > Delphi web services WSDL > Re: Parse wsdl in call web service




Parse wsdl in call web service

Parse wsdl in call web service
Fri, 13 Jul 2007 11:06:36 +020
Is this possible? I need to connect to server and read wsdl at runtime. 
Depending on the wsdl, I need to store things on my own and I need to call 
that web service at runtime?
I don't need to call wsdl importer at designtime. I want to enable users to 
connect to different web services with my application and do something with 
data they get back.
I'm quite new to web services but this is how I imagine things. Read wsdl, 
remember some things. When I need to call web service, build appropriate url 
and get xml back. Parse that xml for results.
Anything that will point me to the right direction will be appreciated.

Grega 

Post Reply
Re: Parse wsdl in call web service
Mon, 16 Jul 2007 12:06:25 -070
Hello Grega,


> Is this possible? I need to connect to server and read wsdl at runtime.
> Depending on the wsdl, I need to store things on my own and I need to call
> that web service at runtime?

Yes, it's possible to do that. Not with Delphi SOAP but with other SOAP
toolkits. Delphi SOAP is driven by Delphi RTTI information hence it's not
that dynamic. I have not looked at MS SOAP in years (I looked at it back
when it was still known as ROPE) but the object model did expose objects
that represent SOAP requests/responses/etc that could be manipulated
programmatically. It's my understanding that MS SOAP has been deprecated so
that's something to watch for.

http://www.microsoft.com/downloads/details.aspx?FamilyId=C943C0DD-CEEC-4088-9753
-86F052EC8450&displaylang=en#Overview

There's also Pocket SOAP although I have not used it to know if it lends
itself to this kind of dynamic/programmatic usage.

http://www.pocketsoap.com/

If you're not tied to Delphi there are tools on other platforms that
illustrate this approach very well. MindReef has an online WSDL analyzer
that when given the URL to a WSDL will parse the latter and display a
WebForm allowing you to invoke any of the operations exposed by the
WebService. Once you enter the values it displays the request XML and allows
you to post the data, etc. :

   http://mindreef.net/tide/index.mrj

Cheers,

Bruneau.

Post Reply
about | contact