on 01-21-2014 5:18 PM
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
I would actually have the webservice modified to read the data based on the content type . So if they want the attachment they should look for the content-type 'text/plain'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muniyappan,
thanks for replying.
The problem here is the attachment is missing in the MIME Message not in the body, I am able to get the attachment name in the body but the same is missing in the MIME message. In the below MIME message the part highlighted in red is missing. (You can check the complete MIME message above in my thread).
Apart from the name one more thing I also need in to get the Content-ID of the below mesage and map it to the HREF in the SOAP Body
--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
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.