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 "Punnoose, Roshan" <pu...@bah-systems.com> on 2006/09/13 17:59:34 UTC

[Axis2] AXIOM XmlStreamReader

I have an XmlStreamReader and I want to get the OMElement from it and
add it to another OMElement. However, since I am using the
StAXOMBuilder, it always returns the XmlStreamReader contents as a
OMElementImpl, and I can't add an OMElementImpl to another
OMElementImpl. Is there anyway to get the XmlStreamReader as an
OMNodeImpl instead?

Roshan Punnoose
Phone: 301-497-6039

-----Original Message-----
From: Sergey GMAIL [mailto:zagr.serg@gmail.com] 
Sent: Wednesday, September 13, 2006 11:55 AM
To: Michele Mazzucco
Subject: Re[2]: [Axis2] Axis and session management tutorial

Hello, Michele.

MM> hmmm.., I'm sorry, but I'm using services in application scope.

MM> Maybe the following links could help:
MM> http://www-128.ibm.com/developerworks/edu/os-dw-os-ag-onbank1.html
MM> http://www.ibm.com/developerworks/edu/os-dw-os-ag-onbank2.html
MM> http://www.ibm.com/developerworks/edu/os-dw-os-ag-onbank3.html


MM> Regards,
MM> Michele

MM> Sergey GMAIL wrote:
>> Hello, Michele.
>> 
>> MM> http://www.developer.com/java/web/article.php/3620661
>> 
>> MM> Michele
>> 
>> MM> Vyacheslav Yakovenko wrote:
>>>> Hi All!
>>>>
>>>> I'm interesting how can I organize a session management in Axis2?
For
>>>> example I need to receive a SESSIONID from container after
successful
>>>> user login store it in somewhere and check it during ws-calls. Can
>>>> anybody recommend any good tutorial about this subject?
>>>>
>>>> Any hints will be helpful too.
>>>>
>>>> Thanks,
>>>> Vaclav
>>>>
>> 
>> MM>
---------------------------------------------------------------------
>> MM> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> MM> For additional commands, e-mail: axis-user-help@ws.apache.org
>> 
>>   Do you have a test source code with using session management in
>>   Axis2, send me, please.
>>   Thanks.
>> 

MM>
---------------------------------------------------------------------
MM> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
MM> For additional commands, e-mail: axis-user-help@ws.apache.org

Thanks.

-- 
WBR,
 Sergey                          mailto:zagr.serg@gmail.com


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


Re: [Axis2] AXIOM XmlStreamReader

Posted by Eran Chinthaka <ch...@opensource.lk>.
Punnoose, Roshan wrote:
> I have an XmlStreamReader and I want to get the OMElement from it and
> add it to another OMElement. However, since I am using the
> StAXOMBuilder, it always returns the XmlStreamReader contents as a
> OMElementImpl, and I can't add an OMElementImpl to another
> OMElementImpl. Is there anyway to get the XmlStreamReader as an
> OMNodeImpl instead?
Seems you have a slight misunderstanding. You should never see
OMElementImpl and/or OMNodeImpl classes and you should always work with
the factory and AXIOM api.

IIUC, you want to create an OMElement out of an XMLStreamReader and the
created OMElement to another OMElement. Here is how you can do it.

OMElement myOMElement = new
StAXOMBuilder(xmlStreamReaderInstance).getDocumentElement();
parentElement.addChild(myOMElement);

HTH.

-- Chinthaka