Anne
On 5/23/06, Rodrigo Ruiz <[EMAIL PROTECTED]> 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="" />
</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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
