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 Anil Chukkapalli <an...@gmail.com> on 2007/04/26 19:49:53 UTC

[Axis2] How to get result after calling OperationClient.execute(true)

hi

 I am using Axis2 OperationClient API with MTOM. I got the result back as i
can see using TCPMon is there a standard way to access the result after we
get the message context and the SOAP envelope.

Thanks
Anil

Re: [Axis2] How to get result after calling OperationClient.execute(true)

Posted by Thilina Gunarathne <cs...@gmail.com>.
Ooops.. :)

http://www.jaxmag.com/itr/online_artikel/psecom,id,726,nodeid,147.html


On 4/28/07, Anil Chukkapalli <an...@gmail.com> wrote:
> See the Accessing Element Information in the XML past of this [1]
> article to figure out how to traverse the OM Tree..
>
> I think you missed the hyperlink and have the [1] instead, can you update
> the actual hyperlink
>
> Thanks
> Anil
>
>
> On 4/27/07, Thilina Gunarathne <cs...@gmail.com> wrote:
> >
> > >It would be great if i can get a code snippet of a standard way of
> extracting
> > > the MTOM byte array from the SOAPEnvelope
> > You will need to navigate to the element containing the binary data,
> > and then to the OMText child of that element..You can use the axiom
> > API's for that..
> >
> > See the Accessing Element Information in the XML past of this [1]
> > article to figure out how to traverse the OM Tree..
> >
> > You can use the OMText.getDataHandler()  on the above OMText object to
> > access the binary data...
> >
> > Thanks,
> > Thilina
> > --
> > Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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


Re: [Axis2] How to get result after calling OperationClient.execute(true)

Posted by Anil Chukkapalli <an...@gmail.com>.
See the Accessing Element Information in the XML past of this [1]
article to figure out how to traverse the OM Tree..

I think you missed the hyperlink and have the [1] instead, can you update
the actual hyperlink

Thanks
Anil

On 4/27/07, Thilina Gunarathne <cs...@gmail.com> wrote:
>
> >It would be great if i can get a code snippet of a standard way of
> extracting
> > the MTOM byte array from the SOAPEnvelope
> You will need to navigate to the element containing the binary data,
> and then to the OMText child of that element..You can use the axiom
> API's for that..
>
> See the Accessing Element Information in the XML past of this [1]
> article to figure out how to traverse the OM Tree..
>
> You can use the OMText.getDataHandler()  on the above OMText object to
> access the binary data...
>
> Thanks,
> Thilina
> --
> Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2] How to get result after calling OperationClient.execute(true)

Posted by Thilina Gunarathne <cs...@gmail.com>.
>It would be great if i can get a code snippet of a standard way of extracting
> the MTOM byte array from the SOAPEnvelope
You will need to navigate to the element containing the binary data,
and then to the OMText child of that element..You can use the axiom
API's for that..

See the Accessing Element Information in the XML past of this [1]
article to figure out how to traverse the OM Tree..

You can use the OMText.getDataHandler()  on the above OMText object to
access the binary data...

Thanks,
Thilina
-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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


Re: [Axis2] How to get result after calling OperationClient.execute(true)

Posted by Anil Chukkapalli <an...@gmail.com>.
Hi Deepal

 What i meant was after you get result how do we extract the result from
Soap Envelope. The data is in the form of a byte[] in result in one of the
elements. How do we know what is the element, i used tcpmon to find out my
element was CheckOutItemResult but is there  a standard way to extract the
file as i can see it enclosed in the element (SerivceName+"Result"). It
would be great if i can get a code snippet of a standard way of extracting
the MTOM byte array from the SOAPEnvelope

SOAPEnvelope response = inMsgtCtx.getEnvelope();


Thanks
Anil

On 4/26/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>
> Hi Anil,
>
> You get get the OperationContext from the operation client and from that
> you can get the response message context. Once you have the message
> context , you can get the SOAPEnvelop from the MC.
>
> Have a look at "Working with OperationClient" section in the following
> article for more infor.
>
> http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html
>
>
> Thanks
> Deepal
>
> > hi
> >
> >  I am using Axis2 OperationClient API with MTOM. I got the result back
> > as i can see using TCPMon is there a standard way to access the result
> > after we get the message context and the SOAP envelope.
> >
> > Thanks
> > Anil
>
>
> --
> Thanks,
> Deepal
> ................................................................
> "The highest tower is built one brick at a time"
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2] How to get result after calling OperationClient.execute(true)

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Anil,

You get get the OperationContext from the operation client and from that
you can get the response message context. Once you have the message
context , you can get the SOAPEnvelop from the MC.

Have a look at "Working with OperationClient" section in the following
article for more infor.
http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html


Thanks
Deepal

> hi
>
>  I am using Axis2 OperationClient API with MTOM. I got the result back
> as i can see using TCPMon is there a standard way to access the result
> after we get the message context and the SOAP envelope.
>
> Thanks
> Anil


-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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