SAAJ
Hey Guys,
I am using SAAJ to extract a SOAP Request. The request has an embedded MIME attachment.
Everything seems to be working very well on my windows dev box. Using Java 1.5, and Tomcat I can send in my request and parse just fine. Issues started occuring when I moved into a dev production box which is running linux, but with an identical platform config. I was wondering if anyone has encountered an issue such as this? Or, if perhaps I'm overlooking some lib dependancy.
My two biggest issues are 1) setting my embedded attachment's content type to "multipart/mixed" vs. "multipart/related." And, 2) setting one body parts content-type to something like "application/smil." Now, I realize that that it should contain text/xml, but I am confused as to why it was working on my windows dev machine.
The exception that's getting thrown is "SAAJ0535: Unable to internalize message". And, "Invalid Content-Type: multipart/mixed"
Currently, I am leaning towards my request format, perhaps since I am using windows there's some issue with CRLF's somewhere.
Has anyone seen anything similar? Below is code details:
POST / HTTP/1.0
SOAPAction:""
Content-Length: 6190
Content-Type: multipart/related; boundary="=_Boundary_0="; type="text/xml"; start="<soap-start>"
--=_Boundary_0=
Content-Type: text/xml; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-ID: <soap-start>
<?xml version="1.0" encoding="UTF-8"?>
*SOAP Envelope - Parses perfectly*
--=_Boundary_0=
Content-Type: [b]multipart/mixed[/b]; start="<myid.cid>"; type="text/xml"; boundary="=_Boundary_1="
Content-ID: <myid.cidgeneric>
--=_Boundary_1=
Content-Type: [b]application/smil[/b]
Content-ID: <myid.cid>
Content-Transfer-Encoding: 7bit
<?xml version="1.0" encoding ="UTF-8"?>
*<xml> - Parses perfectly.*
--=_Boundary_1=
Content-Type: image/gif
Content-ID: <mygif>
Content-Transfer-Encoding: base64
Content-Disposition: inline
*base64 data*
--=_Boundary_1=
Content-Type: text/plain; charset=us-ascii; name=txt.txt
Content-ID: <text.txt>
Content-Disposition: attachment; filename=txt.txt
Content-Transfer-Encoding: 7bit
Some text
--=_Boundary_1=--
--=_Boundary_0=--

