Title: Message
Interesting approach - try to send the XML as an attachment! That's a good workaround for me to keep in mind. However, I still prefer to send the XML in the SOAP body. This allows me to include the associated schema in the WSDL and then clients could choose to deserialize the body however they think is appropriate. So the question still remains - is there any way to insert my own XML into the SOAP body - without Axis having to transform it to SOAPBodyElement and back.
 
Thanks.
Naresh
 
-----Original Message-----
From: Ghershony, Arie [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 12:04 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Accessing the XML in the SOAP message body directly

  hi,
I did an example of a clinet attach a document, then receive the same document back from the server. what showld be different in the code if a client want to receive the document from the the service only. 
 
this is the piece of  code to add an attachment:  what showld be different if it is only receiving a file instead of attaching and receiving?
 
if(doTheDIME)
            call.setProperty(call.ATTACHMENT_ENCAPSULATION_FORMAT,
              call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);
 

        Object ret = call.invoke( new Object[] {
                    dhSource
                }
            ); //Add the attachment.
 
 
thanks,
Aria
-----Original Message-----
From: Naresh Bhatia
Sent: Friday, February 21, 2003 7:44 PM
To: [EMAIL PROTECTED]
Subject: Accessing the XML in the SOAP message body directly

I am using the Axis "Message" style service to populate the SOAP body myself. My payload originates in an XML file, which I read into a SOAPBodyElement. When I invoke the call, Axis obviously reconverts the SOAPBodyElement into XML and sends it out to the server:

        SOAPBodyElement[] params = new SOAPBodyElement[1];
        params[0] = new SOAPBodyElement(new FileInputStream("message.xml"));
        ...
        Vector resultElements = (Vector)call.invoke(params);

Is there any way to avoid these unnecessay conversions from XML to SOAPBodyElement and back? There is a similar problem with the returned result - I don't want Axis to convert the XML returned in the response message, I want to access the XML directly. Ah, and of course, the same problem on the server side! Where do I start?

Thanks,
Naresh

Reply via email to