You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ra...@external.merckgroup.com on 2012/05/31 10:54:54 UTC

Problem with Attachments after Update to Axis2 1.5.6

Hello,

we had a webservice based on Axis2 1.3 running for a long time. This
webservice delivers PDF documents. In the services.xml config we set the
parameter "enableMTOM" to "true". Before the update to Axis2 1.5.6 the
received XML for the PDF file looked like this (tested with soapUI 3.0.1):

<ns1:document>
            <xop:Include
href="cid:1.2cc88f6141647d97ffa49c1905597ee61644eb5811538393@apache.org"
xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</ns1:document>

Last week, we made an update to Axis2 1.5.6, i.e. update the server
installation (Tomcat 6.0.32) and generate both server and client classes
with the new Axis2 version. The config remained unchanged as before. Now
the XML for the PDF file looks like this:

<ns1:document>JVBERi0xLjINJeLjz9MN...</ns1:document>

This is the relevant part of the WSDL:

      <xs:element name="docResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="1" name="title" type="xs:string"/>
            <xs:element minOccurs="1" name="filename" type="xs:string"/>
            <xs:element minOccurs="0" ref="tns:document"/>
            <xs:element minOccurs="1" ref="tns:response"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="document" type="xs:base64Binary"/>

(We had to pull out the document tag and reference to it as we got an
"Unexpected element" error in the client after the update to Axis2 1.5.6).

If I understand the guide "Handling Binary Data with Axis2 (MTOM/SwA)" at
http://axis.apache.org/axis2/java/core/docs/mtom-guide.html correct, the
old version with <xop:Include> is the correct XML with MTOM enabled, right?
What has changed on the way to Axis2 1.5.6?

Best regards,
Ralf.

This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to
any other person. If you have received this transmission in error, please
notify the sender immediately and delete the message and any attachment
from your system. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not accept liability for any omissions or errors in this
message which may arise as a result of E-Mail-transmission or for damages
resulting from any unauthorized changes of the content of this message and
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not guarantee that this message is free of viruses and does
not accept liability for any damages caused by any virus transmitted
therewith.

Click http://www.merckgroup.com/disclaimer to access the German, French,
Spanish and Portuguese versions of this disclaimer.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org