You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Denise Wu <wa...@gmail.com> on 2011/08/02 11:26:32 UTC

How to get xml string of axis2 object

Hi,

How to convert the input object of a webservice method into its xml
string representation?
Thank you,

Denise.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: How to get xml string of axis2 object

Posted by bhima santosh <sa...@gmail.com>.
wat is axis2 object

On Tue, Aug 2, 2011 at 3:00 PM, Denise Wu <wa...@gmail.com> wrote:

> Yes, but that's not my question.
> My question is about converting an axis2 object into its xml
> representation.
>
>
>
> On Tue, Aug 2, 2011 at 10:28 AM, bhima santosh <sa...@gmail.com>
> wrote:
> >
> > checkout testskillshome.com for xml to string conversion
> >
> > On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> How to convert the input object of a webservice method into its xml
> >> string representation?
> >> Thank you,
> >>
> >> Denise.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
>
>
>
> --
> Wadienil.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: How to get xml string of axis2 object

Posted by Denise Wu <wa...@gmail.com>.
I used the following code and it worked:

SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
             		
OMElement om = myAxisObiect.getOMElement(myAxisObiect.MY_QNAME, factory);
System.out.println(" xml string --> " +om.toStringWithConsume());


Thanks


On Tue, Aug 2, 2011 at 11:13 AM, bhima santosh <sa...@gmail.com> wrote:
> SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
>
>         OMElement crmAuthenticationTokenOMElement = factory
>                 .createOMElement(new QName(
>                         "serviceUrl",
>                         "serviceName"));
>
> On Tue, Aug 2, 2011 at 3:41 PM, Denise Wu <wa...@gmail.com> wrote:
>>
>> Hi Swapna,
>>
>> I need for that to get the OMElement from the object. Axis2 offers the
>> getOMElement(parentQName, factory) method.
>> My question is how to know the parameters 'parentQName' and 'factory'
>> values needed in my case.
>>
>> Thank you for your help,
>>
>>
>> On Tue, Aug 2, 2011 at 10:38 AM, swapna soni <ss...@nisum.com> wrote:
>> > Hi Denise,
>> >
>> >  If it is OMElement, you can just say obj.toString().
>> >
>> > Thanks,
>> > Swapna Soni.
>> >
>> > -----Original Message-----
>> > From: Denise Wu [mailto:wadienil@gmail.com]
>> > Sent: Tuesday, August 02, 2011 3:01 PM
>> > To: java-dev@axis.apache.org
>> > Subject: Re: How to get xml string of axis2 object
>> >
>> > Yes, but that's not my question.
>> > My question is about converting an axis2 object into its xml
>> > representation.
>> >
>> >
>> >
>> > On Tue, Aug 2, 2011 at 10:28 AM, bhima santosh <sa...@gmail.com>
>> > wrote:
>> >>
>> >> checkout testskillshome.com for xml to string conversion
>> >>
>> >> On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> How to convert the input object of a webservice method into its xml
>> >>> string representation?
>> >>> Thank you,
>> >>>
>> >>> Denise.
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>>
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Wadienil.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Wadienil.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>



-- 
Wadienil.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: How to get xml string of axis2 object

Posted by bhima santosh <sa...@gmail.com>.
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();

        OMElement crmAuthenticationTokenOMElement = factory
                .createOMElement(new QName(
                        "serviceUrl",
                        "serviceName"));

On Tue, Aug 2, 2011 at 3:41 PM, Denise Wu <wa...@gmail.com> wrote:

> Hi Swapna,
>
> I need for that to get the OMElement from the object. Axis2 offers the
> getOMElement(parentQName, factory) method.
> My question is how to know the parameters 'parentQName' and 'factory'
> values needed in my case.
>
> Thank you for your help,
>
>
> On Tue, Aug 2, 2011 at 10:38 AM, swapna soni <ss...@nisum.com> wrote:
> > Hi Denise,
> >
> >  If it is OMElement, you can just say obj.toString().
> >
> > Thanks,
> > Swapna Soni.
> >
> > -----Original Message-----
> > From: Denise Wu [mailto:wadienil@gmail.com]
> > Sent: Tuesday, August 02, 2011 3:01 PM
> > To: java-dev@axis.apache.org
> > Subject: Re: How to get xml string of axis2 object
> >
> > Yes, but that's not my question.
> > My question is about converting an axis2 object into its xml
> representation.
> >
> >
> >
> > On Tue, Aug 2, 2011 at 10:28 AM, bhima santosh <sa...@gmail.com>
> > wrote:
> >>
> >> checkout testskillshome.com for xml to string conversion
> >>
> >> On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> How to convert the input object of a webservice method into its xml
> >>> string representation?
> >>> Thank you,
> >>>
> >>> Denise.
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>>
> >>
> >>
> >
> >
> >
> > --
> > Wadienil.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
> >
>
>
>
> --
> Wadienil.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: How to get xml string of axis2 object

Posted by Denise Wu <wa...@gmail.com>.
Hi Swapna,

I need for that to get the OMElement from the object. Axis2 offers the
getOMElement(parentQName, factory) method.
My question is how to know the parameters 'parentQName' and 'factory'
values needed in my case.

Thank you for your help,


On Tue, Aug 2, 2011 at 10:38 AM, swapna soni <ss...@nisum.com> wrote:
> Hi Denise,
>
>  If it is OMElement, you can just say obj.toString().
>
> Thanks,
> Swapna Soni.
>
> -----Original Message-----
> From: Denise Wu [mailto:wadienil@gmail.com]
> Sent: Tuesday, August 02, 2011 3:01 PM
> To: java-dev@axis.apache.org
> Subject: Re: How to get xml string of axis2 object
>
> Yes, but that's not my question.
> My question is about converting an axis2 object into its xml representation.
>
>
>
> On Tue, Aug 2, 2011 at 10:28 AM, bhima santosh <sa...@gmail.com>
> wrote:
>>
>> checkout testskillshome.com for xml to string conversion
>>
>> On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> How to convert the input object of a webservice method into its xml
>>> string representation?
>>> Thank you,
>>>
>>> Denise.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>
>>
>
>
>
> --
> Wadienil.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>



-- 
Wadienil.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


RE: How to get xml string of axis2 object

Posted by swapna soni <ss...@nisum.com>.
Hi Denise,

  If it is OMElement, you can just say obj.toString().

Thanks,
Swapna Soni.

-----Original Message-----
From: Denise Wu [mailto:wadienil@gmail.com] 
Sent: Tuesday, August 02, 2011 3:01 PM
To: java-dev@axis.apache.org
Subject: Re: How to get xml string of axis2 object

Yes, but that's not my question.
My question is about converting an axis2 object into its xml representation.



On Tue, Aug 2, 2011 at 10:28 AM, bhima santosh <sa...@gmail.com>
wrote:
>
> checkout testskillshome.com for xml to string conversion
>
> On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:
>>
>> Hi,
>>
>> How to convert the input object of a webservice method into its xml
>> string representation?
>> Thank you,
>>
>> Denise.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>



-- 
Wadienil.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: How to get xml string of axis2 object

Posted by Denise Wu <wa...@gmail.com>.
Yes, but that's not my question.
My question is about converting an axis2 object into its xml representation.



On Tue, Aug 2, 2011 at 10:28 AM, bhima santosh <sa...@gmail.com> wrote:
>
> checkout testskillshome.com for xml to string conversion
>
> On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:
>>
>> Hi,
>>
>> How to convert the input object of a webservice method into its xml
>> string representation?
>> Thank you,
>>
>> Denise.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>



-- 
Wadienil.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: How to get xml string of axis2 object

Posted by bhima santosh <sa...@gmail.com>.
checkout testskillshome.com for xml to string conversion

On Tue, Aug 2, 2011 at 2:56 PM, Denise Wu <wa...@gmail.com> wrote:

> Hi,
>
> How to convert the input object of a webservice method into its xml
> string representation?
> Thank you,
>
> Denise.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

AW: How to get xml string of axis2 object

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Assumption: If your so called "input object" is of type org.apache.axiom.om.OMElement, then you can look for the toString() method builds the OM Node Tree in Memory and then converts to an xml-string. But it dependes what object type arrives at the service or the client.
Josef

-----Ursprüngliche Nachricht-----
Von: Denise Wu [mailto:wadienil@gmail.com] 
Gesendet: Dienstag, 2. August 2011 11:27
An: java-dev@axis.apache.org; java-user@axis.apache.org
Betreff: How to get xml string of axis2 object

Hi,

How to convert the input object of a webservice method into its xml
string representation?
Thank you,

Denise.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org