[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTTPAPI, SOAP, and parsing the returned XML
Glenn, may be you can send ( or copy-paste) the debug file ?
Regards
Nicolas
Scott Klement escribió:
If you look at the raw data being returned from the web service, does it
look something like the following:
<soap:Envelope whatever-whatever>
<soap:Body whatever>
<ADStart><error code="0" text="NO_ERROR"
/><ticket>fe81cb7e-fd9e-411b-b3fd-b9c5729728f7
</ticket></ADStart>
</soap:Body>
</soap:Envelope>
What I mean is... are the <, > and & characters escaped so that they
won't be treated as XML tags, as they are in the above example? If so,
that's a very common issue. The solution is to have the contents of the
'Body' element saved to a file (or a string if it's small enough) and
then parse that file/string separately using http_parse_xml_stmf() or
http_parse_xml_string()
However, your description doesn't QUITE match that symptom... but it's
very close. So I might be completely wrong in this diagnosis. If I am,
then I really need more information than just "the XML parser isn't
working" (which is about all I can get from your description). I'll
need a way to reproduce the problem.
Glenn R. McClenny wrote:
I'm trying my first application with HTTPAPI. I'm using the
http_url_post_xml to send a SOAP request to a web service. I'm
getting an XML file back that looks something like this:
<ADStart><error code="0" text="NO_ERROR"
/><ticket>fe81cb7e-fd9e-411b-b3fd-b9c5729728f7</ticket></ADStart>
I'm using the incoming procedure in a lot of the examples to attempt
to parse the returned XML. The first name comes back as ADStart, with
a value of: error code="0" text="NO_ERROR"
/><ticket>fe81cb7e-fd9e-411b-b3fd-b9c5729728f7</ticket>
I'm trying to extract the ticket value, but not quite sure how to get
there! The next time the Incoming procedure is invoked, it simply
returns the end of the soap body followed by the envelope. Is the
fact that the web service is returning the error code line and that
line isn't enclosed in starting and ending tags the issue? If so, do
you have any suggestion of how to get around it?
Thanks for your help!
Glenn
------------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
[1]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
[2]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
--
.::.
Nicolas Machado
Metodo Argentina S.A.
_____________________
Tel: 02262 527431
Necochea, Buenos Aires.
References
1. http://www.scottklement.com/mailman/listinfo/ftpapi
2. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------