Skip to Content
0
Former Member
Jan 21, 2014 at 05:18 PM

SOAP with attachment Issue

55 Views


Hi Folks,

we are working on a scenario with Receiver SOAP adapter, where we send the data to the webservice with an attachment. The data received by the webservice looks as below

--SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END
content-id: <payload-9C8E990EADEC1ED39FE6EEEEA7F6ED58@sap.com>
content-type: text/plain; name="E2Open_Attachment"

# ECC Data
4000000001,Mat-1,10,KG
4000000002,Mat-2,10,KG
4000000003,Mat-3,10,KG
4000000004,Mat-4,10,KG
4000000005,Mat-5,10,KG

--SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END

--SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END
content-id: <payload-9C8E990EADEC1ED39FE6EEEEA7F70D58@sap.com>
content-type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:a="http://Softel.com/xi/Softel_SC_PLANNING/GPEO/TransactionalData"

xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<PayloadDescriptor>
<MessageFormat>owner="Softel";version=1.0;date="October 2013";</MessageFormat>
<SenderId>Softel-GPEO</SenderId>
<RecipientId>SoftelCORP</RecipientId>
<ControlNumber>123456789</ControlNumber>
<MessageId>the-message-id-value</MessageId>
<DocumentType>SoftelOrders</DocumentType>
<DateSent format="yyyyMMDDhhss" timezone="UTC">20140116212318</DateSent>
<PayloadType>Text/Plain</PayloadType>
<Version>1.0</Version>
</PayloadDescriptor>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<AttachmentDescriptor>
<DocumentType>SoftelOrders</DocumentType>
<Version>1.0</Version>
<Date format="yyyyMMddhhmmss" timezone="UTC">20140116212318</Date>
<Attachments count="1">
<Attachment>
<FileData>
<Include href="cid:payload-9C8E990EADEC1ED39FE6EEEEA7F6ED58@sap.com"/>
</FileData>
<FileName>E2Open_Attachment_20140116212318.txt</FileName>
<FileType>txt</FileType>
<FileCreateDate format="yyyyMMddhhmmss" timezone="UTC">20140116212318</FileCreateDate>
<FileSize uom="byte">200</FileSize>
</Attachment>
</Attachments>
</AttachmentDescriptor>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

In the MIME message type above, the part highlighted in red is the Attachment part & the par highlighted in Green is the payload. The issue I have here is the webservice expects the payload on the top and the attachment data below i.e. the target MIME message is as below. Will appreciate your inputs.

message-id: <the-message-id-value>
mime-version: 1.0
content-type: multipart/related; boundary=SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END; type="text/plain"; xop-info="false"; start="<payload-9C8E990EADEC1ED39FE6EEEEA7F70D58@sap>"


--SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END
content-id: <payload-9C8E990EADEC1ED39FE6EEEEA7F70D58@sap.com>
content-type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:a="http://Softel.com/xi/Softel_SC_PLANNING/GPEO/TransactionalData" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<PayloadDescriptor>
<MessageFormat>owner="Softel";version=1.0;date="October 2013";</MessageFormat>
<SenderId>Softel-GPEO</SenderId>
<RecipientId>SoftelCORP</RecipientId>
<ControlNumber>123456789</ControlNumber>
<MessageId>the-message-id-value</MessageId>
<DocumentType>SoftelOrders</DocumentType>
<DateSent format="yyyyMMDDhhss" timezone="UTC">20140116212318</DateSent>
<PayloadType>Text/Plain</PayloadType>
<Version>1.0</Version>
</PayloadDescriptor>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<AttachmentDescriptor>
<DocumentType>SoftelOrders</DocumentType>
<Version>1.0</Version>
<Date format="yyyyMMddhhmmss" timezone="UTC">20140116212318</Date>
<Attachments count="1">
<Attachment>
<FileData>
<Include href="cid:payload-9C8E990EADEC1ED39FE6EEEEA7F6ED58@sap.com"/>
</FileData>
<FileName>E2Open_Attachment_20140116212318.txt</FileName>
<FileType>txt</FileType>
<FileCreateDate format="yyyyMMddhhmmss" timezone="UTC">20140116212318</FileCreateDate>
<FileSize uom="byte">200</FileSize>
</Attachment>
</Attachments>
</AttachmentDescriptor>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END
content-id: <payload-9C8E990EADEC1ED39FE6EEEEA7F6ED58@sap.com>
content-type: text/plain; name="E2Open_Attachment_20140116212318.txt"

# ECC Data
4000000001,Mat-1,10,KG
4000000002,Mat-2,10,KG
4000000003,Mat-3,10,KG
4000000004,Mat-4,10,KG
4000000005,Mat-5,10,KG

--SAP_7b2e5574-7f37-11e3-b017-00000091a8de_END