I'm doing some testing of some web service constructs.  I'm trying to
build a SOAP request with an attachment.  If I directly use the SAAJ api
to build the object, and then stringify it, I see the result is
MIME-encoded, with a content-type for the main body of "text/xml", and
the attachment is whatever it's content type is, either "text/xml" or
blank.  This is groked by my web-services runtime.

I'm now trying to build the same HTTP request with HttpClient (using 2.0
for now).  I first built a simple test just using "PostMethod" (not
testing attachments yet).  This works fine.  It allowed me to set the
content-type header of "text/xml".

Now, to test attachments, I would assume I have to use
MultipartPostMethod.  This presents a problem.  I tried to set the
"Content-Type" of the request to "text/xml", but I'm guessing this was
ignored, because this ended up being "multipart/form-data".

I'm sure I'm misunderstanding something about how to build a proper
mime-encoded request, but I'm not sure what that is.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to