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

Re: Missing tags in the web service XML creation

hello Kalyan,

> - If it is worth a question can you please tell me how different is
> EXPAT compared to IBM supplied XML-SAX parser? I just started reading
> documentation on IBM for XML parsing.

The general concept of XML-SAX and Expat are about the same.  The 
overall paradigm is the same.

With regards to how they read the XML data.  XML-SAX is simpler, but 
Expat is more flexible.  With Expat, you have to write your own routine 
to read the data -- which means you have to do more work.  That gives 
you added flexibilty (for example, you can get the data from a network 
instead of a disk file) but you need to know/understand the programming 
to do so.  XML-SAX reads the file for you, which means you don't have to 
do it -- but is only capable of reading a variable or stream file.  It 
can't read from a pointer or network socket.

With regards to how the handlers work...   XML-SAX calls only one 
handler routine, and passes an integer that identifies which event has 
occurred. The parameter list is therefore the same for every event 
(which it has to be, since there's only one routine to call)

By contrast, Expat requires a separate event handler for each event, and 
has parameter lists taylored for that event.

Those are the main differences -- and about as much as I can explain 
without turning it into a very long complicated e-mail message.

> - I am trying to understand your sample programs in LIBHTTP and find
> which is going to be the version I should use as there seems to be
> different methods of XML parsing in there.

Hmmm... not sure that I follow that?  Maybe I'm interpreting the word 
"method" differently than you mean it, but...   there's only one method 
of parsing included with HTTPAPI, and that's Expat.

You can, of course, get the document itself and parse it with a 
different parser that's not included with HTTPAPI.

> - Also I do not know if I can use SOAPUI since our company has already
> developed a generic RPG application to generate a XML file to POST to
> the web service. Would that cause any issues in using your EXPAT utility
> to parse the response file?

Weren't you planning to use Thomas Raddatz's WSDL2RPG?? I'm confused. 
SoapUI would calculate the SOAP message, just as Thomas's tool would do 
it.  The only difference is that SoapUI won't generate RPG code for you, 
you'll have to generate it yourself.

If your company is already generatign the SOAP message, then you'd want 
to use HTTPAPI directly, and not go through SoapUI *or* WSDL2RPG.

Unless you mean that your company's data is actually an XML payload of a 
SOAP message, as opposed to the SOAP message itself.  If that's the 
case, then you should be able to use it with either approach.

> - Lastly, your example in HTTPXMLR4 seems to contain both HTTP POST as
> well as EXPAT parsing. Is that correct?

HTTPXMLR4 is *not* an example.  It's one of the modules of HTTPAPI.  The 
examples are named EXAMPLE1, EXAMPLE2, EXAMPLE3, and so forth.

HTTPXMLR4 is part of the code of the HTTPAPIR4 service program, and is 
definitely not something I'd start learning from, as it's rather 
advanced coding.
This is the FTPAPI mailing list.  To unsubscribe, please go to: