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 mule_user <sg...@aol.com> on 2009/10/06 15:57:19 UTC
Consume XML using Axis2 without creating Java objects
Please advise what are my choices for the situation below:
I receive XML as the input. I have no need (nor, have any intention) of
creating any Java object out of the incoming XML. Could you please explain
how can the incoming XML be consumed using using Axis 2? I may want to apply
XSLT on the XML. But I have no need (nor have any desire) to create any Java
object.
Following are my questions:
1. What do I have to do to just consume the incoming XML? Please explain the
steps needed for doing so using Axis2. In other words, I have no need (nor
any desire) to convert the XML into a corresponding Java object. I just want
to process the XML object as it comes. I may run XSLT on the incoming XML. I
just want to consume that XML without going through the overhead of creating
additional Java objects.
2. Or, do I still have to execute wsdl2Java and use the generated
client/stub Java classes for processing the XML?
--
View this message in context: http://www.nabble.com/Consume-XML-using-Axis2-without-creating-Java-objects-tp25769238p25769238.html
Sent from the Axis - User mailing list archive at Nabble.com.
Re: Consume XML using Axis2 without creating Java objects
Posted by Amila Suriarachchi <am...@gmail.com>.
On Tue, Oct 6, 2009 at 7:27 PM, mule_user <sg...@aol.com> wrote:
>
> Please advise what are my choices for the situation below:
>
> I receive XML as the input. I have no need (nor, have any intention) of
> creating any Java object out of the incoming XML. Could you please explain
> how can the incoming XML be consumed using using Axis 2? I may want to
> apply
> XSLT on the XML. But I have no need (nor have any desire) to create any
> Java
> object.
>
> Following are my questions:
> 1. What do I have to do to just consume the incoming XML? Please explain
> the
> steps needed for doing so using Axis2. In other words, I have no need (nor
> any desire) to convert the XML into a corresponding Java object. I just
> want
> to process the XML object as it comes. I may run XSLT on the incoming XML.
> I
> just want to consume that XML without going through the overhead of
> creating
> additional Java objects.
>
> 2. Or, do I still have to execute wsdl2Java and use the generated
> client/stub Java classes for processing the XML?
>
Have a look at here to understand how you can write a custom message
receiver[1]. At your message
receiver you can get the xmlstream without building the message using this
method
inMessage.getEnvelope().getBody().getFirstElement().getXMLStreamReaderWithoutCaching()
thanks,
Amila.
[1] http://wso2.org/library/articles/extending-axis2
>
>
> --
> View this message in context:
> http://www.nabble.com/Consume-XML-using-Axis2-without-creating-Java-objects-tp25769238p25769238.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/
Re: Consume XML using Axis2 without creating Java objects
Posted by Sagara Gunathunga <sa...@gmail.com>.
Hi,
It's is not required thing to use wsdl2Java tool for this. You can
write your service method so that it will take OMElement as an
argument and return type also OMElement together with
RawXMLINOnlyMessageReceiver. Further it is possible to use Axiom API
to consume the Xml within the service method.
please refer this user guide [1]
[1] - http://ws.apache.org/axis2/1_5/quickstartguide.html#axiom
Thanks,
On Tue, Oct 6, 2009 at 7:27 PM, mule_user <sg...@aol.com> wrote:
>
> Please advise what are my choices for the situation below:
>
> I receive XML as the input. I have no need (nor, have any intention) of
> creating any Java object out of the incoming XML. Could you please explain
> how can the incoming XML be consumed using using Axis 2? I may want to apply
> XSLT on the XML. But I have no need (nor have any desire) to create any Java
> object.
>
> Following are my questions:
> 1. What do I have to do to just consume the incoming XML? Please explain the
> steps needed for doing so using Axis2. In other words, I have no need (nor
> any desire) to convert the XML into a corresponding Java object. I just want
> to process the XML object as it comes. I may run XSLT on the incoming XML. I
> just want to consume that XML without going through the overhead of creating
> additional Java objects.
>
> 2. Or, do I still have to execute wsdl2Java and use the generated
> client/stub Java classes for processing the XML?
>
>
> --
> View this message in context: http://www.nabble.com/Consume-XML-using-Axis2-without-creating-Java-objects-tp25769238p25769238.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://people.apache.org/~sagara/