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 Anne Thomas Manes <at...@gmail.com> on 2007/11/17 01:49:11 UTC

Re: How to get child elements from a SOAP XML response?

You may send only one invocation (expressed as the child element in a
SOAP body) in a single SOAP message. Axis2 will ignore any additional
child elements.

Anne

On Nov 16, 2007 4:59 PM, juliocest <ju...@gmail.com> wrote:
>
> Hi everybody!!!
>
> I would like to know how can I get child elements from a response message
> using AXIOM?
>
> For example: I make two invocations in a client program to a service
> provider, so I want to get all children elements from XML response. One by
> one.
>
> Thanks!
>
> Julio
> --
> View this message in context: http://www.nabble.com/How-to-get--child-elements-from-a-SOAP-XML-response--tf4824179.html#a13802491
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


Re: How to get child elements from a SOAP XML response?

Posted by juliocest <ju...@gmail.com>.
Hi Anne!

I will explain my problem:

I want get children elements from my soap message that I take care of in
OnMessage method:

Code below:

      public void onMessage(MessageContext msgContext) {
        	        	
        	//System.out.println("Fim nao-bloqueante: "+System.nanoTime());
        	fimnb = System.nanoTime();
        	double diferfinalnb =
(double)(fimnb-InvocaCliente.initnb)/1000000000;
        	String respostanb;
        	        	
        	OMElement resultadonb =
msgContext.getEnvelope().getBody().getBuilder().getDocumentElement();

        }

As I have the document element, How Can I obtain all children elements? 

Could you help me?

Thanks!!!

 

-- 
View this message in context: http://www.nabble.com/How-to-get--child-elements-from-a-SOAP-XML-response--tf4824179.html#a13809435
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: How to get child elements from a SOAP XML response?

Posted by Amila Suriarachchi <am...@gmail.com>.
get the soap body element like this
msgContext.getEnvelope().getBody().getFirstElement()

for more informaction read the tutorial

Amila.

On Nov 18, 2007 6:27 PM, Anne Thomas Manes <at...@gmail.com> wrote:
> See the AXIOM Tutorial: http://ws.apache.org/commons/axiom/OMTutorial.html
>
> Anne
>
>
> On Nov 17, 2007 9:37 AM, juliocest <ju...@gmail.com> wrote:
> >
> > Hi Anne!
> >
> > Assuming that my soap envelope contain :
> >
> >         <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> >                 <soapenv:Body>
> >                         <exemplo:fatorialResposta xmlns:exemplo="http://examplo1.org/exemplo1">
> >                                 <exemplo:greeting>Resultado do Fatorial: 720</exemplo:greeting>
> >                                 <exemplo:procvalorResposta>3.799E-5</exemplo:procvalorResposta>
> >                         </exemplo:fatorialResposta>
> >                 </soapenv:Body>
> >         </soapenv:Envelope>
> >
> > How can I obtain the children elements?
> >
> > Thanks!
> >
> > Júlio
> > --
> > View this message in context: http://www.nabble.com/How-to-get--child-elements-from-a-SOAP-XML-response--tf4824179.html#a13809717
> >
> > Sent from the Axis - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

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


Re: How to get child elements from a SOAP XML response?

Posted by Anne Thomas Manes <at...@gmail.com>.
See the AXIOM Tutorial: http://ws.apache.org/commons/axiom/OMTutorial.html

Anne

On Nov 17, 2007 9:37 AM, juliocest <ju...@gmail.com> wrote:
>
> Hi Anne!
>
> Assuming that my soap envelope contain :
>
>         <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>                 <soapenv:Body>
>                         <exemplo:fatorialResposta xmlns:exemplo="http://examplo1.org/exemplo1">
>                                 <exemplo:greeting>Resultado do Fatorial: 720</exemplo:greeting>
>                                 <exemplo:procvalorResposta>3.799E-5</exemplo:procvalorResposta>
>                         </exemplo:fatorialResposta>
>                 </soapenv:Body>
>         </soapenv:Envelope>
>
> How can I obtain the children elements?
>
> Thanks!
>
> Júlio
> --
> View this message in context: http://www.nabble.com/How-to-get--child-elements-from-a-SOAP-XML-response--tf4824179.html#a13809717
>
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


Re: How to get child elements from a SOAP XML response?

Posted by juliocest <ju...@gmail.com>.
Hi Anne!

Assuming that my soap envelope contain :

	<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
		<soapenv:Body>
			<exemplo:fatorialResposta xmlns:exemplo="http://examplo1.org/exemplo1">
				<exemplo:greeting>Resultado do Fatorial: 720</exemplo:greeting>
				<exemplo:procvalorResposta>3.799E-5</exemplo:procvalorResposta>
			</exemplo:fatorialResposta>
		</soapenv:Body>
	</soapenv:Envelope>

How can I obtain the children elements?

Thanks!

Júlio
-- 
View this message in context: http://www.nabble.com/How-to-get--child-elements-from-a-SOAP-XML-response--tf4824179.html#a13809717
Sent from the Axis - User mailing list archive at Nabble.com.


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