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 wesleyalanking <we...@yahoo.com> on 2007/06/01 23:44:29 UTC

Receive XML not in envelope

I've been searching the web now for a couple days and haven't had much
luck, so I figured I would send a message to the user list to see if
someone might be able to help me out.

I've been through the
whole process of setting up a service using an
AbstractInOutSyncMessageReceiver and have had it working for a while.  

I
now have a need to receive just raw (not sure if that is the right word) XML and send a raw XML
response back.  I attempted to use similar logic as I did before but use a RawXMLINOutMessageReceiver, but I run into an issue because the
incoming XML is not wrapped inside a SOAP envelope.  Is there a way for
the AxisServlet to receive XML that is not inside a SOAP envelope.  Or
a way to force wrapping it into an envelope.  And then when writing
back to the user only send just the XML not inside an envelope.

Any help is very much appreciated.  Thanks.

~ Wes

PS: I'm currently running Axis2 1.1

Re: Receive XML not in envelope

Posted by robert lazarski <ro...@gmail.com>.
I'd send the xml as one of two ways: As base64 or an attachment. As an
attachment, the payload is about 30% smaller, See the mtom user guide for
more info.

HTH,
Robert

On 6/1/07, wesleyalanking <we...@yahoo.com> wrote:
>
> I've been searching the web now for a couple days and haven't had much
> luck, so I figured I would send a message to the user list to see if someone
> might be able to help me out.
>
> I've been through the whole process of setting up a service using an
> AbstractInOutSyncMessageReceiver and have had it working for a while.
>
> I now have a need to receive just raw (not sure if that is the right word)
> XML and send a raw XML response back.  I attempted to use similar logic as I
> did before but use a RawXMLINOutMessageReceiver, but I run into an issue
> because the incoming XML is not wrapped inside a SOAP envelope.  Is there a
> way for the AxisServlet to receive XML that is not inside a SOAP
> envelope.  Or a way to force wrapping it into an envelope.  And then when
> writing back to the user only send just the XML not inside an envelope.
>
> Any help is very much appreciated.  Thanks.
>
> ~ Wes
>
> PS: I'm currently running Axis2 1.1
>

Re: Receive XML not in envelope

Posted by keith chapman <ke...@gmail.com>.
Hi,

Seems like you want to use POX . Which version of axis2 are you using?

If your client is axis2 then set the following options.

options.setProperty(org.apache.axis2.Constants.Configuration.CONTENT_TYPE
,"application/xml");
options.setProperty(org.apache.axis2.Constants.Configuration.MESSAGE_TYPE
,"application/xml");

If the server receives a message with the contentType as "application/xml"
Axis2 (version 1.2) will wrap the message with a SOAP envelop.

Thanks,
Keith.

On 6/2/07, wesleyalanking <we...@yahoo.com> wrote:
>
> I've been searching the web now for a couple days and haven't had much
> luck, so I figured I would send a message to the user list to see if someone
> might be able to help me out.
>
> I've been through the whole process of setting up a service using an
> AbstractInOutSyncMessageReceiver and have had it working for a while.
>
> I now have a need to receive just raw (not sure if that is the right word)
> XML and send a raw XML response back.  I attempted to use similar logic as I
> did before but use a RawXMLINOutMessageReceiver, but I run into an issue
> because the incoming XML is not wrapped inside a SOAP envelope.  Is there a
> way for the AxisServlet to receive XML that is not inside a SOAP
> envelope.  Or a way to force wrapping it into an envelope.  And then when
> writing back to the user only send just the XML not inside an envelope.
>
> Any help is very much appreciated.  Thanks.
>
> ~ Wes
>
> PS: I'm currently running Axis2 1.1
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/