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 Jochen Zink <jo...@nepatec.de> on 2008/06/26 09:23:44 UTC

MTOM Problem with Axis2

Hello,

I try to send an attachment with MTOM from a Client to a Server. I
traced the Message with tcpmon and see, that the message contains base64
Date directly in the body and not as a xop:include link to an
attachment. This happends with small attachments (34kb) and Big ons
(22mb) both.


On Client Site, I have enabled MTOM with


stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);

On server site, I set the enableMTOM Property to true.

The relevant Part of the WSDL:
<xs:element name="addAntragsdokument">
<xs:complexType>
<xs:sequence>
...
<xs:element minOccurs="0" name="pdfDokument"
nillable="true" type="xmime:base64Binary" />
</xs:sequence>
</xs:complexType>
</xs:element>



The Soap Message looks like, that MTOM is enabled because of
"Content-Type: application/xop+xml;" in HTTP Header. But as you can see,
there is no xop:include in the soap-body:

POST /avparchiveservice/services/AvpArchivService HTTP/1.1
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_0655E8454C89FC8F621214463338880;
type="application/xop+xml";
start="<0....@apache.org>";
start-info="text/xml"
SOAPAction: "urn:addMandantendokument"
User-Agent: Axis2
Host: localhost:8081
Transfer-Encoding: chunked

20e5
--MIMEBoundaryurn_uuid_0655E8454C89FC8F621214463338880
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0....@apache.org>
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsse:Security

xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
soapenv:mustUnderstand="1">
<wsu:Timestamp

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="Timestamp-7226213">
<wsu:Created>2008-06-26T06:55:38.687Z</wsu:Created>
<wsu:Expires>2008-06-26T07:00:38.687Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="UsernameToken-33402317">
<wsse:Username>test</wsse:Username>
<wsse:Password

Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">OC1+di1N3aFqUH6baAvd3maNh5w=</wsse:Password>
<wsse:Nonce>90q/U9DPl02opPiANdp1Nw==</wsse:Nonce>
<wsu:Created>2008-06-26T06:55:38.687Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>


<wsa:To>http://localhost:8081/avparchiveservice/services/AvpArchivService</wsa:To>
<wsa:MessageID>urn:uuid:0655E8454C89FC8F621214463338238</wsa:MessageID>
<wsa:Action>urn:addMandantendokument</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<ns1:addMandantendokument xmlns:ns1="http://avp.archivservice.awd.de">
<ns1:mandantenNr>1</ns1:mandantenNr>
<ns1:dokumentenName>Mandantendokument</ns1:dokumentenName>
<ns1:dateiName>testdokument.pdf</ns1:dateiName>
<ns1:dokumentenTyp>MANDANTEN_DOKUMENTE</ns1:dokumentenTyp>
<ns1:pdfDokument xmlns:ns2="http://www.w3.org/2005/05/xmlmime"
ns2:contentType="application/pdf">
JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovTWV


/R+yYtdo7I4j1vsZ04CFZGHCkxsHGwcEaSrUAjJ5IcI/n1qa+K7C72OWc0uq6D7IPONKvZZLFYd1701+WvF8u9//7m749fLPfuf+qWTz77dLn464VbavSH2pbU0oFKXi57+cXji6+W51LDrS/37/yCt35J+ZAbtRZoKZmrutBarMvV9cW9Tx+45dMHXGd58OkX3NjTxR3C8uMSl/vLxb3P+e23L6WP64vk3YFC5udnFw8uvtRvr17i25dXz+Xb9Y/gBOe3WLXRokft0SzhQDculO7gUuBBTQ4H4jxauLrgY/fYqRTy7jOecW29AqqGIkVz6Q3DFPoJAFUWtlA4
/NKymIPzz4JESKnnpBBpxy2t7lAnwcJsUxQoI09
2000
...
</ns1:addMandantendokument>
</soapenv:Body>


</soapenv:Envelope>3a--MIMEBoundaryurn_uuid_0655E8454C89FC8F621214463338880--0

Has anyone an Idea?

I'm using axis2 1.4 with addressing 1.4 and rampart 1.4 (Only
UsernameToken and Timestamp),

Thanks a lot! 
Regards
Jochen


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


Re: MTOM Problem with Axis2

Posted by Jochen Zink <jo...@nepatec.de>.
Okay, I found a bug: https://issues.apache.org/jira/browse/RAMPART-118

Is this only related to verison 1.4? I guess yes, while I have no xop
include tag :(

Regards
Jochen

Am Do 26.06.2008 09:23 schrieb Jochen Zink <jo...@nepatec.de>:

> Hello,
> 
> I try to send an attachment with MTOM from a Client to a Server. I
> traced the Message with tcpmon and see, that the message contains
> base64
> Date directly in the body and not as a xop:include link to an
> attachment. This happends with small attachments (34kb) and Big ons
> (22mb) both.
> 
> 
> On Client Site, I have enabled MTOM with
> 
> 
>
> stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE);
> 
> On server site, I set the enableMTOM Property to true.
> 
> The relevant Part of the WSDL:
> <xs:element name="addAntragsdokument">
> <xs:complexType>
> <xs:sequence>
> ...
> <xs:element minOccurs="0" name="pdfDokument"
> nillable="true" type="xmime:base64Binary" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> 
> 
> 
> The Soap Message looks like, that MTOM is enabled because of
> "Content-Type: application/xop+xml;" in HTTP Header. But as you can
> see,
> there is no xop:include in the soap-body:
> 
> POST /avparchiveservice/services/AvpArchivService HTTP/1.1
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_0655E8454C89FC8F621214463338880;
> type="application/xop+xml";
> start="<0....@apache.org>";
> start-info="text/xml"
> SOAPAction: "urn:addMandantendokument"
> User-Agent: Axis2
> Host: localhost:8081
> Transfer-Encoding: chunked
> 
> 20e5
> --MIMEBoundaryurn_uuid_0655E8454C89FC8F621214463338880
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <wsse:Security
> 
>
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> soapenv:mustUnderstand="1">
> <wsu:Timestamp
> 
>
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Timestamp-7226213">
> <wsu:Created>2008-06-26T06:55:38.687Z</wsu:Created>
> <wsu:Expires>2008-06-26T07:00:38.687Z</wsu:Expires>
> </wsu:Timestamp>
> <wsse:UsernameToken
> 
>
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="UsernameToken-33402317">
> <wsse:Username>test</wsse:Username>
> <wsse:Password
> 
>
> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">OC1+di1N3aFqUH6baAvd3maNh5w=</wsse:Password>
> <wsse:Nonce>90q/U9DPl02opPiANdp1Nw==</wsse:Nonce>
> <wsu:Created>2008-06-26T06:55:38.687Z</wsu:Created>
> </wsse:UsernameToken>
> </wsse:Security>
> 
> 
>
> <wsa:To>http://localhost:8081/avparchiveservice/services/AvpArchivService</wsa:To>
>
> <wsa:MessageID>urn:uuid:0655E8454C89FC8F621214463338238</wsa:MessageID>
> <wsa:Action>urn:addMandantendokument</wsa:Action>
> </soapenv:Header>
> <soapenv:Body>
> <ns1:addMandantendokument xmlns:ns1="http://avp.archivservice.awd.de">
> <ns1:mandantenNr>1</ns1:mandantenNr>
> <ns1:dokumentenName>Mandantendokument</ns1:dokumentenName>
> <ns1:dateiName>testdokument.pdf</ns1:dateiName>
> <ns1:dokumentenTyp>MANDANTEN_DOKUMENTE</ns1:dokumentenTyp>
> <ns1:pdfDokument xmlns:ns2="http://www.w3.org/2005/05/xmlmime"
> ns2:contentType="application/pdf">
> JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovTWV
> 
> 
>
> /R+yYtdo7I4j1vsZ04CFZGHCkxsHGwcEaSrUAjJ5IcI/n1qa+K7C72OWc0uq6D7IPONKvZZLFYd1701+WvF8u9//7m749fLPfuf+qWTz77dLn464VbavSH2pbU0oFKXi57+cXji6+W51LDrS/37/yCt35J+ZAbtRZoKZmrutBarMvV9cW9Tx+45dMHXGd58OkX3NjTxR3C8uMSl/vLxb3P+e23L6WP64vk3YFC5udnFw8uvtRvr17i25dXz+Xb9Y/gBOe3WLXRokft0SzhQDculO7gUuBBTQ4H4jxauLrgY/fYqRTy7jOecW29AqqGIkVz6Q3DFPoJAFUWtlA4
> /NKymIPzz4JESKnnpBBpxy2t7lAnwcJsUxQoI09
> 2000
> ...
> </ns1:addMandantendokument>
> </soapenv:Body>
> 
> 
>
> </soapenv:Envelope>3a--MIMEBoundaryurn_uuid_0655E8454C89FC8F621214463338880--0
> 
> Has anyone an Idea?
> 
> I'm using axis2 1.4 with addressing 1.4 and rampart 1.4 (Only
> UsernameToken and Timestamp),
> 
> Thanks a lot! 
> Regards
> Jochen
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


Beste Grüße/Best regards
Jochen Zink

_______________________________________________________
Dipl.-Inf. (FH) Jochen Zink
Softwareentwickler
nepatec GmbH & Co. KG
Hindenburgstr. 37 . 30175 Hannover
Fon: 0511/935.946.51 . Fax: 0511/935.946.57
Mail: jochen.zink@nepatec.de
Internet: http://www.nepatec.de

nepatec GmbH & Co. KG
Sitz Hannover . Amtsgericht Hannover . HRA 200338
Persönlich haftende Gesellschafterin:
nepatec Verwaltungs-GmbH . Amtsgericht Hannover
HRB 200954 . Geschäftsführer: Claudius Grieser .
Burkhard Gerlts . Jörg Neumann . Frank Nitze

Hinweis: http://www.nepatec.de/de/disclaimer.html 			


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