axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Ahokas" <>
Subject [Axis2] Vanishing MTOM attachments
Date Thu, 18 May 2006 13:07:13 GMT
Hi all,

We are using Axis2 1.0 (client & server) and sending XML and
binary MTOM attachments to the server. The XML document and the
first binary attachment are received without problems, but any
additional attachments never reach the server (are not available
from the OMElement when the server-side code starts executing).

I'm sending roughly the following from the client:

      XML document (constructed via StAXOMBuilder.getDocumentElement())

      Binary attachment 1 (via factory.createOMText(datahandler, true))

      Binary attachment 2

      Binary attachment n

This is sent out without problems from the client (as confirmed by
running through the Axis1 SoapMon proxy). The message on the wire
looks like fine, the first part of the multipart contains the
message (SOAP message with a XML payload and include references
for all the 1-n binary attachments) and each of the binary
attachments are included in separate parts of the message.

But when the message reaches the server, only the first binary
part seems to be in the OMElement that the server has constructed.
If I return that to the client, again looking at the wire
representation, only the first binary attachment is in place.

Also (possibly related to how the message is constructed), if I try
to set SOAP version to 1.2 on the client
I get the following error on the server side:

2006-05-18 13:30:11,108 [ERROR][http-80-Processor24][org.apache.catalina
Servlet.service() for servlet AxisServlet threw exception org.apache. SOAPEnvelope must contain a body element which is
either first or second child element of the SOAPEnvelope.
at org.apache.axis2.transport.http.AxisServlet.doPost(
at javax.servlet.http.HttpServlet.service(

But looking at the messages sent over the wire, only the soapenv
is different, and both messages start otherwise similarly:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="">
	  ... body content

Is there something fundamentally wrong in our approach for sending the
multiple binary attachments in the single message? Has someone been able to
do something similar using Axis2 1.0? Are there any debug flags etc
I could enable to see what happens when the message from the wire is
being processed?

Kind regards,
Timo Ahokas

View raw message