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

Re: Soap message with xml as string



Hello Magne,

> The problem seem to be that I'm sending real xml in the <dataxml> tag. 
> I've tried to convert all the '<' and '>' to &lt; &gt; in the <dataxml> 
> tag but all my tries has resulted in expat message"no elements found".

I don't understand what this has to do with Expat.  Your SOAP variable is 
the data that you're sending to the web service.  Expat never sees it, nor 
tries to parse it.

Instead, Expat tries to parse what you receive from the web service. 
Naturally, the two are related, if you send an invalid document to the web 
service, it might send an invalid document back!

A good starting point is to call HTTP_url_post() instead of 
HTTP_url_post_xml().  That way, you can see what you're receiving back 
from the web service.  Once you get back the response that you're 
expecting (the correct SOAP document, I mean) then switch over the 
http_url_post_xml() so that it gets parsed correctly.


> When I remove the xml data in <dataxml> tag (empty dataxml) I receive a 
> soap response from the web service (just says that there was no data in 
> the dataxml tag). Anyone knows how to build string xml within xml?

That depends on what you mean by that.  Should the data be escaped?  Or 
not?  I don't know how the web service works!  Is there a WSDL document 
you can look at for answers?


> Another question (just quorious):
> Why the +2 in %addr(SOAP) + 2 ?

Because SOAP is a VARYING string.  The first 2 bytes of a varying string 
always contain a binary number representing the current length of the 
string.  Since you don't want to send that binary number, you need to 
start sending data that's 2 bytes later in memory than the start of the 
variable.

"%addr(SOAP) + 2" means "start sending 2 bytes later than the address of 
the SOAP variable".


> And is is possible to use this (add_soapaction) 2 times (or more) in the 
> same program/rc? http_xproc( HTTP_POINT_ADDL_HEADER : 
> %paddr(Add_SOAPACTION) );

I don't understand the question.  That code sets an exit procedure to call 
when the ADDL_HEADER exit point occurs.  Can you set it twice?  Sure, but 
why would you want to?
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------