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

RE: How can i get XML result after execution of 'http_url_post_xml'



Can you use a file in the IFS? That is the easiest way to do it.

But I suspect you want to get the data into a big variable of some kind. In previous versions of HTTPAPI, one of the examples included how to do this. This was discussed in a thread in the archives. Here was the message that showed the old example code:
http://www.scottklement.com/archives/ftpapi/201207/msg00066.html

You use http_url_post_raw and write your own handler for the incoming data. Make sure your retData is big enough for your data. It looks like you are 7.1 so you should have no problem with that.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Patrick Goovaerts
Sent: Wednesday, December 12, 2012 5:09 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: How can i get XML result after execution of 'http_url_post_xml'

Mike,

Thx for the reply.  Checked, updated code (replaced 'incoming' with 'xmlReply'), and debugged this.  Now I begin to understand what is happening.  As you explained, procedure xmlReply (formerly 'incoming') is executed for each single element in the XML response file. So, yes, I'm able to get the data within the XML response file.

But... for my application, I always need the complete 'XML Response' file.  I need to pass this result file to our current applications which processes these XML response files.
Actually, the application I'm writing will be a bridge to our current existing ERP-apps a new EPR application. It should replace the current 'bridge-app', written in Java but rather slow for some unknown reason.

The application has to be able to

-          receive a data string containing an 'xml-request'-file'  (no problem)

-          Execute one of about 20 webservices  (no problem)

-          Return a data string containing the 'xml-result' file. (need to get it someway)

It would be a hell of a job to recreate xml-result files from the 'xmlReply' execution for each different webservice.  Some webservices returns xmlresults with about 1000 fields...

Isn't there a way to get the XML-result file 'as-is'?
It's printed in the DEBUG-Result file, so it must be possible, no?



DEBUG_Resultfile
...

SetError() #13: HTTP/1.1 200 OK

recvdoc parms: identity 5188

header_load_cookies() entered

recvdoc(): entered

SetError() #0:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="

http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="

http://www.w3.org/2001/XMLSchema"; xmlns:xsi="

http://www.w3.org/2001/XMLSchema-instance

"><soapenv:Body><webservice:GetResponse xmlns:webservice="

http://www.coda.com/efinance/schemas/elementmaster/elementmaster-12.0/webservice

" xmlns:com="http://www.coda.com/efinance/schemas/common"; xmlns:elm="

http://www.coda.com/efinance/schemas/elementmaster"; xmlns:udf="

http://www.coda.com/common/schemas/udfmaster
"><webservice:CmpCode>Q</webservice:CmpCode>
...
and so on



Patrick Goovaerts
Systems & Development
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------