// take this out:
// Message msg = new Message(in);
// put this in:
MimeHeaders header = new MimeHeaders();
header.addHeader("Content-Type", "multipart/related");
Message msg = new Message(in, true, header);I am able to call a jaxrpc method that takes a DataHandler argument using jms transport. Of course, this change breaks other types of attachments that are not multipart (byts[], String, etc). I got the idea for this change by looking at what is done in AxisServlet.java, which gets the content-type info from the incoming http call. I don't see anything equivalently available in the incoming jms message that the JMSSimpleMessageWorker responds to (e.g. I don't see anything that can carry my content-type info over jms)
What I am looking for is some way for the SimpleJMSListener and SimpleJMSWorker to discern that the mime type setting is needed because the serialized object is a DataHandler.
Have I missed something obvious, or can someone comment on what the axis team has in mind to support multipart attachments using jms transport?
Thanks! Tom Nelson
On Feb 11 2004, [EMAIL PROTECTED] wrote:
Greetings,
I have a demo application that attempts to send various types of attachments as SOAP messages over JMS using jaxrpc Service methods include:
sendString(String str) sendBytes(byte[] bytes) sendDataHandler(DataHander dh)
Sending a String or a byte array works fine, but sending
a javax.activation.DataHandler fails.
The same service code, deployed as a WebService (using jboss) and accessed via http, works fine (e.g. the DataHandler is received properly)
For the jms version, I can see that my SimpleJMSListener is getting called, and the message contains a reference to the (audio) data followed by the data itself:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:sendDataHandler soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:Service">
<dh href="cid:32A99BDD12F209211C50E65535468CC6"/>
</ns1:sendDataHandler>
</soapenv:Body>
</soapenv:Envelope>
------=_Part_0_14017689.1076512674972
Content-Type: audio/x-wav
Content-Transfer-Encoding: binary
Content-Id: <32A99BDD12F209211C50E65535468CC6>
RIFF|WAVEfmt +"VdataX
...binary data follows....
This leads me to think that the client is serializing and sending the data properly, but the server is unable to parse what it takes out of the jms message.
A tarball of my demo code is available here:
http://procmgmt.raba.com/axis/attachmenttest.tar.gz
Am I missing some setting on the Call or in the jms url? Can anyone point me in the right direction about how to solve this?
TIA,
Tom Nelson
