[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Consuming an internal web service



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

In example 16 the XML file content is hard-coded (fields "access request" and "track request"), which might be error-prone. Instead I would like to be able to use the WSDL file of the requested web service in order to create the XML file content automatically, so that I can use it in my RPG program..

HTTPAPI doesn't currently have that feature. If you'd like to write one and contribute it, it'd be very welcome!


I've found it easy to generate SOAP documents by pointing my web browser at the following link:
http://www.soapclient.com/soapmsg.html


If you scroll down the page a bit, you'll find a section that says "SOAP Message Generator". You can type the URL of a WSDL document, and it'll generate the SOAP message needed to consume it.

You can then copy/paste that SOAP message into an RPG source member, stick quotes around it, and use it with HTTPAPI.

This only takes me a few minutes to do. By contrast, if I were to write a tool that generates the SOAP messages on-the-fly, it'd take me hundreds of hours to write and debug the tool. Is it worth it?

Many of the SOAP toolkits out there (gSOAP, EasySOAP, PocketSOAP, etc) do the same thing. They take the WSDL document and convert it to a SOAP message, and then they generate source files containing the hard-coded SOAP message. The only difference between the way I'm doing it and the way they're doing it is that I convert the SOAP document to a source member manually...


I understand that WDSC is able to do that for me, but that tool is so complex, I don't know where to start (without training). is there a simple way in WDSC or outside of it to use a WSDL file to create all the XML file content? Can XML Toolkit for iSeries do that for me?

I've heard of WDSC's ability to do this, but I think it requires WebSphere and a Java front-end to RPG. (However, I have never tried it, so I may be wrong.)


Since my iSeries isn't fast enough to run WebSphere, I haven't tried it.

I have absolutely no experience with the XML Toolkit for iSeries, except what I've heard from other people. Every time I've seen code from this toolkit, it's extraordinarily complicated and hard to read, so I've stuck with Expat, it just seems simpler.

I don't think the XML Toolkit has anything that's SOAP or WSDL specific -- it's a general purpose XML toolkit. But, since I haven't used it and don't own it, I could be wrong.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------