I'm looking into a way to use an RPG program as a web service (server
side). Is it as simple as creating a RPG-CGI program that receives xml
formatted data and writes xml formatted data back to the browser or is
there more to it?

Yes, it's that simple. Or that complicated, depending on how you feel about parsing and generating XML!

My understanding is that SOAP will be used to post xml formatted data to
the web service and the web service will return xml formatted data.

Okay...  this leads to the questions "What is XML?" and "What is SOAP?".

XML is a language for creating markup languages. By itself, the term XML is so broad you can drive an aircraft carrier through it.

SOAP is a specific markup language that was created from XML. So technically, SOAP _is_ XML.

However, frequently when people refer to SOAP they're referring to toolkits that convert a virtual procedure call into XML, send it, receive the response and convert it back to look like the virtual procedure call. But, again, what they're doing in that case is trying to SIMPLIFY things (not complicate them) by making it so that you don't HAVE to do the XML creation and parsing. The SOAP toolkit does it for you.

That's why I responded the way I did to the first question. :)

All of the examples I have seen use SOAP and WSDL and none of the examples I have seen call an RPG-CGI program. I'm not opposed to using SOAP and WDSL, but it is necessary in order for the RPG-CGI program to be considered a web service?

You could parse the incoming SOAP message (using an XML parser) and get the data you need from it, then do your processing, and write out a new SOAP message (again, by writing out an XML message) and this would certainly be considered a web service.

Once you know what the SOAP messages need to look like, it'd be easy enough to hand-code the WSDL document so that other poeple would know how to format and send the SOAP messages.

What the SOAP toolkits and wizards and all the Java and .NET stuff that you see are doing is taking all of those steps for you, so that you don't have to do all of the XML parsing and generating. If you consider them to be simple, then by all means do it manually! :)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.