You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Riaz Shafi <Ri...@scisys.co.uk> on 2007/06/25 13:17:08 UTC

Get all content

 
Hi, 

>From a NotificationMessage what is the best way of getting all the
<wsnt:Message> content.

Thankyou for your help. 

Riaz


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


Re: Get all content

Posted by Daniel Jemiolo <da...@us.ibm.com>.




another option is using getMessageContentNames() to get the QNames and then
getMessageContent(QName) to get the Elements. This would save you the DOM
creation done in toXML().

Dan


Saurabh Dravid <sa...@in.ibm.com> wrote on 06/25/2007 08:33:36 AM:

> Hi,
>
> You can use the following code in your class that implements the
> NotificationMessageListener.
>
> public void process(NotificationMessage message) throws SoapFault
> {
>
>         Element messageXml = message.toXML();
>
>         // Next line will return all <wsnt:Message> elements
>         Element[] messageContents = XmlUtils.getElements(messageXml,
> WsnConstants.MESSAGE_QNAME);
>
> }
>
>
> thanks
>
> With best regards,
>
> Saurabh Dravid,
> Staff Software Engineer - Autonomic Computing,
> India Software Lab, IBM Software Group
> Embassy Golf Links, 'B' Block, 4th Floor, Bangalore
> Phone: +91-80-51055494, e-mail: sadravid@in.ibm.com
> About India Software Lab
>
>
>
>
>
> "Riaz Shafi" <Ri...@scisys.co.uk>
> 25/06/2007 16:47
> Please respond to
> muse-user@ws.apache.org
>
>
> To
> <mu...@ws.apache.org>
> cc
>
> Subject
> Get all <wsnt:Message> content
>
>
>
>
>
>
>
> Hi,
>
> From a NotificationMessage what is the best way of getting all the
> <wsnt:Message> content.
>
> Thankyou for your help.
>
> Riaz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
>

Re: Get all content

Posted by Saurabh Dravid <sa...@in.ibm.com>.
Hi,

You can use the following code in your class that implements the 
NotificationMessageListener.

public void process(NotificationMessage message) throws SoapFault 
{
 
        Element messageXml = message.toXML();
 
        // Next line will return all <wsnt:Message> elements
        Element[] messageContents = XmlUtils.getElements(messageXml, 
WsnConstants.MESSAGE_QNAME); 

}


thanks

With best regards,

Saurabh Dravid,
Staff Software Engineer - Autonomic Computing,
India Software Lab, IBM Software Group
Embassy Golf Links, 'B' Block, 4th Floor, Bangalore
Phone: +91-80-51055494, e-mail: sadravid@in.ibm.com
About India Software Lab 





"Riaz Shafi" <Ri...@scisys.co.uk> 
25/06/2007 16:47
Please respond to
muse-user@ws.apache.org


To
<mu...@ws.apache.org>
cc

Subject
Get all <wsnt:Message> content






 
Hi, 

>From a NotificationMessage what is the best way of getting all the
<wsnt:Message> content.

Thankyou for your help. 

Riaz


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