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 "Masin, Valerie" <VJ...@docharbor.com> on 2007/04/11 21:37:23 UTC

[AXIS2] MTOM is not sending binary data as references for array of DataHandlers

One of my datatypes is an array of DataHandlers (DataHandler[]). (I got
the wsdl to generate this by setting my base64Binary's maxOccurs to
unbounded)
 
<element name="documents" nillable="false" minOccurs="1"
maxOccurs="unbounded" type="base64Binary"/>
 
When I use MTOM I had expected to see each of these base64Binary objects
as separate references to entities outside the soap message. However,
when viewing the soap message with tcpmon, they are being sent 'by
value' even though it is clear that mtom is enabled. If I don't use an
array then I get exactly what I expected.
 
Here is what I see (fixed up for clarity). Under <ns1:documents> the
document (which is only 8 bytes) is embedded in the message rather than
referencing outside. I was counting on being able to use MTOM to send
more than one binary on the wire. Is it not possible to do this?
Thanks, Valerie
 
POST /webservices2_0d/services/DocHarborServices HTTP/1.1
SOAPAction: "urn:compositeCreateDocument"
User-Agent: Axis2
Host: us00wl00.devportal.net:30004
Content-Length: 2390
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159;
type="application/xop+xml";
start="<0....@apache.org>";
start-info="text/xml"; charset=UTF-8
 
--MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159
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/
<http://schemas.xmlsoap.org/soap/envelope/> ">
  <soapenv:Header />
  <soapenv:Body>
    <ns1:compositeCreateDocument
xmlns:ns1="urn:webservices.docharbor.com">
 
<ns1:credential><ns1:username>apiuser</ns1:username></ns1:credential>
 
<ns1:users><ns1:username>user1</ns1:username><ns1:customerName>cust1</ns
1:customerName></ns1:users>
      <ns1:documents>MTIzLS0tLTENCg==</ns1:documents>
      <ns1:documents>MTIzLS0tLTINCg==</ns1:documents>
    </ns1:compositeCreateDocument></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159--

Re: [AXIS2] MTOM is not sending binary data as references for array of DataHandlers

Posted by Thilina Gunarathne <cs...@gmail.com>.
Thanks :)..

On 4/17/07, Masin, Valerie <VJ...@docharbor.com> wrote:
> I submitted Jira 2541, with an attached wsdl and test client. Sorry it
> took so long.
> -- Valerie
>
> -----Original Message-----
> From: Thilina Gunarathne [mailto:csethil@gmail.com]
> Sent: Wednesday, April 11, 2007 11:20 PM
> To: axis-user@ws.apache.org
> Subject: Re: [AXIS2] MTOM is not sending binary data as references for
> array of DataHandlers
>
> Sounds like a bug to me... Please log a JIRA.. If possible include your
> WSDL and a test case...
>
> Thilina
>
> On 4/12/07, Masin, Valerie <VJ...@docharbor.com> wrote:
> >
> >
> > One of my datatypes is an array of DataHandlers (DataHandler[]). (I
> > got the wsdl to generate this by setting my base64Binary's maxOccurs
> > to unbounded)
> >
> > <element name="documents" nillable="false" minOccurs="1"
> > maxOccurs="unbounded" type="base64Binary"/>
> >
> > When I use MTOM I had expected to see each of these base64Binary
> > objects as separate references to entities outside the soap message.
> > However, when viewing the soap message with tcpmon, they are being
> > sent 'by value' even though it is clear that mtom is enabled. If I
> > don't use an array then I get exactly what I expected.
> >
> > Here is what I see (fixed up for clarity). Under <ns1:documents> the
> > document (which is only 8 bytes) is embedded in the message rather
> > than referencing outside. I was counting on being able to use MTOM to
> > send more than one binary on the wire. Is it not possible to do this?
> > Thanks, Valerie
> >
> > POST /webservices2_0d/services/DocHarborServices HTTP/1.1
> > SOAPAction: "urn:compositeCreateDocument"
> > User-Agent: Axis2
> > Host: us00wl00.devportal.net:30004
> > Content-Length: 2390
> > Content-Type: multipart/related;
> > boundary=MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159;
> > type="application/xop+xml";
> > start="<0....@apache.org>";
> > start-info="text/xml"; charset=UTF-8
> >
> > --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159
> > 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 />
> >   <soapenv:Body>
> >     <ns1:compositeCreateDocument
> > xmlns:ns1="urn:webservices.docharbor.com">
> >
> > <ns1:credential><ns1:username>apiuser</ns1:username></ns1:credential>
> >
> >
> <ns1:users><ns1:username>user1</ns1:username><ns1:customerName>cust1</ns
> 1:customerName></ns1:users>
> >       <ns1:documents>MTIzLS0tLTENCg==</ns1:documents>
> >       <ns1:documents>MTIzLS0tLTINCg==</ns1:documents>
> >
> > </ns1:compositeCreateDocument></soapenv:Body></soapenv:Envelope>
> > --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159--
>
>
> --
> Thilina Gunarathne  -  http://www.wso2.com -
> http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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


RE: [AXIS2] MTOM is not sending binary data as references for array of DataHandlers

Posted by "Masin, Valerie" <VJ...@docharbor.com>.
I submitted Jira 2541, with an attached wsdl and test client. Sorry it
took so long.
-- Valerie

-----Original Message-----
From: Thilina Gunarathne [mailto:csethil@gmail.com] 
Sent: Wednesday, April 11, 2007 11:20 PM
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] MTOM is not sending binary data as references for
array of DataHandlers

Sounds like a bug to me... Please log a JIRA.. If possible include your
WSDL and a test case...

Thilina

On 4/12/07, Masin, Valerie <VJ...@docharbor.com> wrote:
>
>
> One of my datatypes is an array of DataHandlers (DataHandler[]). (I 
> got the wsdl to generate this by setting my base64Binary's maxOccurs 
> to unbounded)
>
> <element name="documents" nillable="false" minOccurs="1"
> maxOccurs="unbounded" type="base64Binary"/>
>
> When I use MTOM I had expected to see each of these base64Binary 
> objects as separate references to entities outside the soap message. 
> However, when viewing the soap message with tcpmon, they are being 
> sent 'by value' even though it is clear that mtom is enabled. If I 
> don't use an array then I get exactly what I expected.
>
> Here is what I see (fixed up for clarity). Under <ns1:documents> the 
> document (which is only 8 bytes) is embedded in the message rather 
> than referencing outside. I was counting on being able to use MTOM to 
> send more than one binary on the wire. Is it not possible to do this?
> Thanks, Valerie
>
> POST /webservices2_0d/services/DocHarborServices HTTP/1.1
> SOAPAction: "urn:compositeCreateDocument"
> User-Agent: Axis2
> Host: us00wl00.devportal.net:30004
> Content-Length: 2390
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159;
> type="application/xop+xml";
> start="<0....@apache.org>";
> start-info="text/xml"; charset=UTF-8
>
> --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159
> 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 />
>   <soapenv:Body>
>     <ns1:compositeCreateDocument 
> xmlns:ns1="urn:webservices.docharbor.com">
>
> <ns1:credential><ns1:username>apiuser</ns1:username></ns1:credential>
>
>
<ns1:users><ns1:username>user1</ns1:username><ns1:customerName>cust1</ns
1:customerName></ns1:users>
>       <ns1:documents>MTIzLS0tLTENCg==</ns1:documents>
>       <ns1:documents>MTIzLS0tLTINCg==</ns1:documents>
>
> </ns1:compositeCreateDocument></soapenv:Body></soapenv:Envelope>
> --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159--


--
Thilina Gunarathne  -  http://www.wso2.com -
http://thilinag.blogspot.com

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


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


Re: [AXIS2] MTOM is not sending binary data as references for array of DataHandlers

Posted by Thilina Gunarathne <cs...@gmail.com>.
Sounds like a bug to me... Please log a JIRA.. If possible include
your WSDL and a test case...

Thilina

On 4/12/07, Masin, Valerie <VJ...@docharbor.com> wrote:
>
>
> One of my datatypes is an array of DataHandlers (DataHandler[]). (I got the
> wsdl to generate this by setting my base64Binary's maxOccurs to unbounded)
>
> <element name="documents" nillable="false" minOccurs="1"
> maxOccurs="unbounded" type="base64Binary"/>
>
> When I use MTOM I had expected to see each of these base64Binary objects as
> separate references to entities outside the soap message. However, when
> viewing the soap message with tcpmon, they are being sent 'by value' even
> though it is clear that mtom is enabled. If I don't use an array then I get
> exactly what I expected.
>
> Here is what I see (fixed up for clarity). Under <ns1:documents> the
> document (which is only 8 bytes) is embedded in the message rather than
> referencing outside. I was counting on being able to use MTOM to send more
> than one binary on the wire. Is it not possible to do this?
> Thanks, Valerie
>
> POST /webservices2_0d/services/DocHarborServices HTTP/1.1
> SOAPAction: "urn:compositeCreateDocument"
> User-Agent: Axis2
> Host: us00wl00.devportal.net:30004
> Content-Length: 2390
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159;
> type="application/xop+xml";
> start="<0....@apache.org>";
> start-info="text/xml"; charset=UTF-8
>
> --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159
> 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 />
>   <soapenv:Body>
>     <ns1:compositeCreateDocument xmlns:ns1="urn:webservices.docharbor.com">
>
> <ns1:credential><ns1:username>apiuser</ns1:username></ns1:credential>
>
> <ns1:users><ns1:username>user1</ns1:username><ns1:customerName>cust1</ns1:customerName></ns1:users>
>       <ns1:documents>MTIzLS0tLTENCg==</ns1:documents>
>       <ns1:documents>MTIzLS0tLTINCg==</ns1:documents>
>
> </ns1:compositeCreateDocument></soapenv:Body></soapenv:Envelope>
> --MIMEBoundaryurn_uuid_66DC1A499FD08057761176316581159--


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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