commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject Trying to send "text/xml" content type, but with attachments
Date Thu, 10 Jun 2004 17:41:17 GMT
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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message