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

Re: Soap message with xml as string

   Hi Scott,

   thanks for your answere.

   I realize that I'm not explaining my problem good enough....;-)

   See my comments below.
   >-----Original Message-----
   >From: Scott Klement [mailto:sk@xxxxxxxxxxxxxxxx]
   >Sent: Monday, December 18, 2006 07:20 AM
   >To: 'HTTPAPI and FTPAPI Projects'
   >Subject: Re: Soap message with xml as string
   >Hello Magne,
   >> The problem seem to be that I'm sending real xml in the <dataxml>
   >> I've tried to convert all the '<' and '>' to &lt; &gt; in the
   >> tag but all my tries has resulted in expat message"no elements
   >I don't understand what this has to do with Expat. Your SOAP variable
   >the data that you're sending to the web service. Expat never sees it,
   >tries to parse it.

   Yes Scott...just meant to explain that I receive an invalid document
   and expat is giving me the "no elements found" message.

   >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.

   Thanks Scott....I will try the HTTP_url_post() first in the future.

   >> 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?

   I had to wrap the xml request in a <!CDATA  tag  to get it working
   (build string xml within xml e.g  <dataxml>string<dataxml>  where

   >> Another question (just quorious):
   >> Why the +2 in %addr(SOAP) + 2 ?
   >Because SOAP is a VARYING string. The first 2 bytes of a varying
   >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
   >"%addr(SOAP) + 2" means "start sending 2 bytes later than the address
   >the SOAP variable".

   Ok, I tried to set the pointer to an IFS file (instead of %addr(SOAP))
    and lost the first 2 characters. Solved it by having 2 blanks first
   in the file.

   >> 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
   >when the ADDL_HEADER exit point occurs. Can you set it twice? Sure,
   >why would you want to?

   I just needed to add 2 different soap action in the same program (a
   dialog with the web service) . I have now tested it and  it works

   Again Scott...thanks for your answere!

   Best regards

This is the FTPAPI mailing list.  To unsubscribe, please go to: