Multiple structures returned on a SOAP call
Posted: Tue May 31, 2022 4:17 pm
Hello, I'm using httpapi, http_url_post_xml to post to a service that's returning two structures, the first structure typically contains a basic status of the call, which may contain text such as 'no records returned' <soap:Envelope>...</soap:Envelope>. This is followed in the same return by another structure, which is the data I expect to be returned from my call, in <LicensingReportProcessResult> ..</LicensingReportProcessResult>.
This second causes an xml parser error on the call being made. If I make the call using SOAPUI, the second structure is returned as an attachment. I tried loading the return into a file using http_url_post into an IFS file, then http_parse_xml_stmf , but parsing that file gives the same error.
The size of the second structure can be very large, much greater than 64k. I'm looking for advice on the most efficient way to handle this return. Should I be using a different method, is there a way to split out that second structure into a separate file, similar to how SOAPUI makes it an attachment?
Any advice greatly appreciated.
Here's a typical layout of the raw returned content. Second structure in this example contains no real data, but the structure is correct. When data is returned, It's normally somewhere in the order of 10mb.
HTTP/1.1 200 OK
Date: Fri, 27 May 2022 16:08:14 GMT
Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:eacca707-56d7-4a7f-983d-34448fdd87a9"; start="<root.message@cxf.apache.org>"; start-info="text/xml"
Transfer-Encoding: chunked
Connection: keep-alive
Server: Apache/2.4.6 (Red Hat)
--uuid:eacca707-56d7-4a7f-983d-34448fdd87a9
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelop ... rtResponse xmlns="https://anther-service.com/my-ws"><aler ... op:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:4d7b1558-454d-40ce-894c-e15b17791ec7-5550@my-services.com"/></alertsReport></alertsReport></receiveSpecificReportResponse></soap:Body></soap:Envelope>
--uuid:eacca707-56d7-4a7f-983d-34448fdd87a9
Content-Type: null
Content-Transfer-Encoding: binary
Content-ID: <4d7b1558-454d-40ce-894c-e15b17791ec7-5550@my-services.com>
<LicensingReportProcessResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.acord.org/schema/data/draft/ ... mponents/1" xsi:schemaLocation="http://www.acord.org/schema/data/draft/ ... mponents/1 http://www-mybeta.com/XSD/ACORD/message ... cessResult>
This second causes an xml parser error on the call being made. If I make the call using SOAPUI, the second structure is returned as an attachment. I tried loading the return into a file using http_url_post into an IFS file, then http_parse_xml_stmf , but parsing that file gives the same error.
The size of the second structure can be very large, much greater than 64k. I'm looking for advice on the most efficient way to handle this return. Should I be using a different method, is there a way to split out that second structure into a separate file, similar to how SOAPUI makes it an attachment?
Any advice greatly appreciated.
Here's a typical layout of the raw returned content. Second structure in this example contains no real data, but the structure is correct. When data is returned, It's normally somewhere in the order of 10mb.
HTTP/1.1 200 OK
Date: Fri, 27 May 2022 16:08:14 GMT
Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:eacca707-56d7-4a7f-983d-34448fdd87a9"; start="<root.message@cxf.apache.org>"; start-info="text/xml"
Transfer-Encoding: chunked
Connection: keep-alive
Server: Apache/2.4.6 (Red Hat)
--uuid:eacca707-56d7-4a7f-983d-34448fdd87a9
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelop ... rtResponse xmlns="https://anther-service.com/my-ws"><aler ... op:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:4d7b1558-454d-40ce-894c-e15b17791ec7-5550@my-services.com"/></alertsReport></alertsReport></receiveSpecificReportResponse></soap:Body></soap:Envelope>
--uuid:eacca707-56d7-4a7f-983d-34448fdd87a9
Content-Type: null
Content-Transfer-Encoding: binary
Content-ID: <4d7b1558-454d-40ce-894c-e15b17791ec7-5550@my-services.com>
<LicensingReportProcessResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.acord.org/schema/data/draft/ ... mponents/1" xsi:schemaLocation="http://www.acord.org/schema/data/draft/ ... mponents/1 http://www-mybeta.com/XSD/ACORD/message ... cessResult>