I'm trying to send the attachments using custom java app ( using Apache commons ) to Ariba network as suggested in the below post / cXML user guide.
Problem Posting MIME encoded attachment to Ariba Supplier Network
Getting "EOF Skipping Headers" error response from Ariba
As per my research above error will thrown when the ending boundary not found, but my message has the end boundary.
Please let me know if any one ran into similar issue and able to resolve.
Thanks for your help.
Here is the message format that I was posting to Ariba.
Below are the HTTP headers:
POST / HTTP/1.1
Content-Type: multipart/related;boundary="1403166176143"; type="text/xml"; start="<987654321@xxx.com>"
User-Agent: Jakarta Commons-HttpClient/3.0.1
Content-Length: 4356
Host: Target Server
& This is body of the message
--1403166176143
Content-Type: text/xml; charset=UTF-8
Content-Disposition: attachment; filename=PO.xml
Content-ID: <987654321@xxx.com>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.021/cXML.dtd">
All the PO related cXML
<Comments>Tax Rates:<Attachment><URL>cid:123456789@xxx.com</URL></Attachment></Comments>
</ItemOut>
</OrderRequest>
</Request>
</cXML>
--1403166176143
Content-type: text/plain;
Content-ID: <123456789@xxx.com>
Content-Disposition: attachment; filename=FirstAttach.txt
Content-length: 44
VGhpcyBpcyB0aGUgZmlyc3QgUE8gYXR0YWNobWVudC4=
--1403166176143--
using Apache commons PostMethod