axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mattias Norlander <umciggy2...@yahoo.com>
Subject Multipart message parsing with javamail API
Date Fri, 07 Oct 2005 09:16:19 GMT
Hi!

I am accessing axis (v1.1) web services from a php
client.
When trying to send messages with attachments, the
server cannot process them. This is what I get:

Error in parsing mime data stream:  null
at
org.apache.axis.attachments.MultiPartRelatedInputStream.<init>(MultiPartRelatedInputStream.java:368)
 
After some debugging I figured out where the problem
was. The content type header sent from php looks like
this:

multipart/related; boundary="abc"; type=text/xml

Axis will then pass this data to the constructor for
javax.mail.internet.ContentType (sun javamail). This
constructor will then throw an exception. The
workaround is to add double quotes around the
"text/xml" part, like this:


multipart/related; boundary="abc"; type="text/xml"

... and everything works fine. The problem is this
cannot be done without altering the actual PHP soap
implementation. And also, as far as I can see, the
quotes are not mandatory. If you look at the examples
from w3, they don't use them:

http://www.w3.org/TR/2000/NOTE-SOAP-attachments-20001211#SOAPMultipart

So this might be a bug in axis (or possibly in
the javamail apis). So my question is...


Is this a bug in axis?
If so, can someone fix it?
Is there some sort of workaround available?


Regards, 

Mattias


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

Mime
View raw message