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 Rodrigo Ruiz <rr...@gridsystems.com> on 2006/05/23 12:44:46 UTC
[Axis 1] Does Axis 1.x WSDL2Java tool support MTOM?
Hi all,
I am trying to generate an "MTOM request" like the ones shown as
examples in the "Attachments Profile 1.0".
I want to generate a request like the following:
------=_Part_0_24763620.1148379760140
Content-Type: application/xop+xml; charset=utf-8; type="text/xml;
charset=utf-8"
Content-Id: <1214EF60AA198A197784D42933A320AF>
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<upload xmlns="http://www.example.org/test/">
<uploadRequest>
<name>test.txt</name>
<content>cid:5ABC2608829F6B1D0204C075AD19305F</content>
</uploadRequest>
</upload>
</env:Body>
</env:Envelope>
------=_Part_0_24763620.1148379760140
Content-Type: content/unknown
Content-Transfer-Encoding:
binaryContent-Id: <5ABC2608829F6B1D0204C075AD19305F>
Lorem ipsum ...
------=_Part_0_24763620.1148379760140--
But instead of this, I get this other envelope:
...
<env:Body>
<upload xmlns="http://www.example.org/test/">
<uploadRequest>
<name>test.txt</name>
<content></content>
</uploadRequest>
<content xmlns="">
<xop:Include href="cid:5ABC2608829F6B1D0204C075AD19305F" />
</content>
</upload>
</env:Body>
...
Is there any way to make the attachment reference to appear into the
request "content" field?
My original service had no WSDL. It was RPC/encoded and had a signature
like:
void upload(String name, DataHandler handler);
But now, the generated code translates the swaRef field into an URI
parameter, and the upload() method forces me to pass an UploadRequest
instance, and a separated DataHandler instance. I have found no way to
link the URI within UploadRequest with the DataHandler passed to the method.
Would it be possible to get a syntax like the following?
DataHandler handler = new DataHandler("file:/test.txt");
UploadRequest request = new UploadRequest("test.txt", handler);
service.upload(request);
I attach a simplified version of my current WSDL.
Thanks in advance,
Rodrigo Ruiz
--
-------------------------------------------------------------------
GRIDSYSTEMS Rodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorca mailto:rruiz@gridsystems.com
Baleares - España Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
-------------------------------------------------------------------
Re: [Axis 1] Does Axis 1.x WSDL2Java tool support MTOM?
Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
Thanks Anne, I just wanted to be sure :-)
Rodrigo
Anne Thomas Manes wrote:
> Axis 1.x does not support MTOM. Try Axis2.
>
> Anne
--
-------------------------------------------------------------------
GRIDSYSTEMS Rodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorca mailto:rruiz@gridsystems.com
Baleares - España Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
-------------------------------------------------------------------
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.0/346 - Release Date: 23/05/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis 1] Does Axis 1.x WSDL2Java tool support MTOM?
Posted by Anne Thomas Manes <at...@gmail.com>.
Axis 1.x does not support MTOM. Try Axis2.
Anne
On 5/23/06, Rodrigo Ruiz <rr...@gridsystems.com> wrote:
>
> Hi all,
>
> I am trying to generate an "MTOM request" like the ones shown as
> examples in the "Attachments Profile 1.0".
>
> I want to generate a request like the following:
>
> ------=_Part_0_24763620.1148379760140
> Content-Type: application/xop+xml; charset=utf-8; type="text/xml;
> charset=utf-8"
> Content-Id: <1214EF60AA198A197784D42933A320AF>
> <?xml version="1.0" encoding="UTF-8"?>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <env:Body>
> <upload xmlns="http://www.example.org/test/">
> <uploadRequest>
> <name>test.txt</name>
> <content>cid:5ABC2608829F6B1D0204C075AD19305F</content>
> </uploadRequest>
> </upload>
> </env:Body>
> </env:Envelope>
> ------=_Part_0_24763620.1148379760140
> Content-Type: content/unknown
> Content-Transfer-Encoding:
> binaryContent-Id: <5ABC2608829F6B1D0204C075AD19305F>
> Lorem ipsum ...
> ------=_Part_0_24763620.1148379760140--
>
>
> But instead of this, I get this other envelope:
>
> ...
> <env:Body>
> <upload xmlns="http://www.example.org/test/">
> <uploadRequest>
> <name>test.txt</name>
> <content></content>
> </uploadRequest>
> <content xmlns="">
> <xop:Include href="cid:5ABC2608829F6B1D0204C075AD19305F" />
> </content>
> </upload>
> </env:Body>
> ...
>
>
> Is there any way to make the attachment reference to appear into the
> request "content" field?
>
> My original service had no WSDL. It was RPC/encoded and had a signature
> like:
>
> void upload(String name, DataHandler handler);
>
>
> But now, the generated code translates the swaRef field into an URI
> parameter, and the upload() method forces me to pass an UploadRequest
> instance, and a separated DataHandler instance. I have found no way to
> link the URI within UploadRequest with the DataHandler passed to the
> method.
>
> Would it be possible to get a syntax like the following?
>
> DataHandler handler = new DataHandler("file:/test.txt");
> UploadRequest request = new UploadRequest("test.txt", handler);
> service.upload(request);
>
> I attach a simplified version of my current WSDL.
>
> Thanks in advance,
> Rodrigo Ruiz
> --
> -------------------------------------------------------------------
> GRIDSYSTEMS Rodrigo Ruiz Aguayo
> Parc Bit - Son Espanyol
> 07120 Palma de Mallorca mailto:rruiz@gridsystems.com
> Baleares - España Tel:+34-971435085 Fax:+34-971435082
> http://www.gridsystems.com
> -------------------------------------------------------------------
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 22/05/2006
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>