Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Classic ASP and Visual Basic 6.0 - Consuming a MTOM Webservice with binary attachment

$
0
0
I am working with a consumer whose application was developed in VB6.0 using Classic ASP. This application is calling a webservice to acquire attached documents, (Word, Excel, PDF, JPEG, TIFF, etc). First, I am looking to see if this type of application can consume a MTOM structured response with an attachment as a jpeg? If this is possible, would you please point me to documentation that allows this type of transaction to be processed successfully.

The first attempted was to read the entire raw response in an XML structure, it did not like it because it said that it was badly formed.

The second attempt was to read the raw response as a string. When looking at the response, there are many special characters that give errors "?".

The structure of an mtom response is as follows:

HTTP/1.1 200 OK
Date: Mon, 16 Mar 2015 17:52:32 GMT
Transfer-Encoding: chunked
Content-Type: multipart/related; boundary="MIMEBoundaryurn_uuid_5E4BE7C70AA7EDD6271426528384407"; type="application/xop+xml"; start="<0.urn:uuid:5E4BE7C70AA7EDD6271426528384408@apache.org>"; start-info="application/soap+xml"; action="http://www.nationwide.com/ecm/contentaccess/schema/DocumentService_V1/RetrieveDocument"
Content-Language: en-US

--MIMEBoundaryurn_uuid_5E4BE7C70AA7EDD6271426528384407
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:5E4BE7C70AA7EDD6271426528384408@apache.org>

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><retrieveDocumentResponse xmlns="http://nationwide.com/schemas/Communication/iaa7_1/Content/DocumentManagement_1" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><Document><Attachments type="Content"><Attachment><Name>010913460003.jpg</Name><MimeType>image/jpeg</MimeType><Size>97198</Size><DataContent><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:urn:uuid:5E4BE7C70AA7EDD6271426528384409@apache.org"/></DataContent></Attachment></Attachments><Properties><Property><Name>Id</Name><Value>{AE3C5A63-AF75-47AB-ADD5-7AD68C36B1AA}</Value></Property><Property><Name>MimeType</Name><Value>image/jpeg</Value></Property></Properties></Document><Status>Successful</Status></retrieveDocumentResponse></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_5E4BE7C70AA7EDD6271426528384407
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <urn:uuid:5E4BE7C70AA7EDD6271426528384409@apache.org>

Binary Information for the attached document
--MIMEBoundaryurn_uuid_5E4BE7C70AA7EDD6271426528384407--

Viewing all articles
Browse latest Browse all 688

Trending Articles