Reposting 1 last time just in case anyone knows anything about using
attachments with operationStyle of "message" and can offer any comments.

Thanks,

       ...ant

Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.
---------------------- Forwarded by Anthony Elder/UK/IBM on 19/12/2002
17:30 ---------------------------





Anthony Elder/UK/IBM@IBMGB on 17/12/2002 19:51:12

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:

Subject:    Is it possible to use MIME attachments with a Call
       operationStyle of "message"?





I'm having trouble using AXIS 1.0 invocations with operationStyle set to
"message" and sending or receiving MIME attachments. Can anyone say if this
something that is supported in AXIS 1.0 or point me to what I'm doing wrong
and how to achieve this?

If I use the call setOperationStyle to "message" and add an AttachmentPart
on the out-going request by using the Call  addAttachmentPart method, then
the attachment content is sent, but there is no href to the attachment
included in the SOAP body. I've included an example message of this below.

Conversely, if the response to a message I've sent with operationStyle set
to "message" includes an attachment,  I can get a SOAPBodyElement object
from the AXIS response which includes the href for the attachment, but I
can't see how I can turn that it to something that represents the
attachment such as a DataHandler object. An example of a response message
I'd like to get a dataHandler out of is also included below.

Any help with this would be much appreciated.

Thanks,

   ...ant


Request message with missing href:

POST /soap/servlet/rpcrouter HTTP/1.0Content-Type: multipart/related; type
="text/xml"; start="<C94B22A7BE91C527CD66D37CC64484A4>";    boundary="
----=_Part_0_903542386.1040150209288"
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.0
Host: localhost:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://webservices.eraserver.net/ShortZipCode";
Content-Length: 806

------=_Part_0_903542386.1040150209288
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <C94B22A7BE91C527CD66D37CC64484A4>
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

    <soapenv:Body>
        <ShortZipCode xmlns="http://webservices.eraserver.net/";>
            <accessCode>9999</accessCode>
            <address>607 Trinity</address>
            <city>Austin</city>
            <state>TX</state>
        </ShortZipCode>
    </soapenv:Body>

</soapenv:Envelope>
------=_Part_0_903542386.1040150209288
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <35DCB58E369A6B17C2EBEB115DC6E29D>
Hello Mark!
------=_Part_0_903542386.1040150209288--


response message:

<?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
     xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
     xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
        <SOAP-ENV:Body>            <ns1:stringToDataHandlerResponse
             xmlns:ns1="http://mime/";
             SOAP-ENV:encodingStyle
="http://schemas.xmlsoap.org/soap/encoding/";>
                <return href
="cid:829847775.1040143576812.apache-soap.55n405h"/>
            </ns1:stringToDataHandlerResponse>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

------=_Part_424_826390751.1040143576812
Content-Type: application/octet-stream
Content-Transfer-Encoding: 8bit
Content-ID: <829847775.1040143576812.apache-soap.55n405h>

The owl and the pussy cat went to sea in a beautiful pea-green boat,
------=_Part_424_826390751.1040143576812--


Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.




Reply via email to