axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodrigo Ruiz <rr...@gridsystems.com>
Subject [Axis 1] Does Axis 1.x WSDL2Java tool support MTOM?
Date Tue, 23 May 2006 10:44:46 GMT
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
-------------------------------------------------------------------

Mime
View raw message