You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Todd Chisholm <to...@gmail.com> on 2011/07/29 02:08:49 UTC
Async ODE to axis2 client - manipulating headers
Hi everyone,
I'm trying to call a very simple but asynchronous BPEL process (that just
performs an echo) from an Axis2 client. The problem (well, one of them) is
that the axis2 client needs a RelatedTo element in the returned SOAP message
header. The value should be the same as the MessageID in the request
header.
I used the method from http://ode.apache.org/headers-handling.html to try to
copy from the incoming header to the outgoing header. The result was odd:
the RelatedTo element ended up in the body, not the header.
The pertinent bpel snippet:
<bpel:assign validate="no" name="AssignHeader">
<bpel:copy>
<bpel:from variable="input" header="MessageID"/>
<bpel:to variable="output" header="RelatesTo"/>
</bpel:copy>
</bpel:assign>
Any idea how to get RelatesTo to end up in the header? I'm using ODE 2.0,
beta2.
Thanks for any insight!
Todd
The incoming message from Axis2:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://localhost:8080/ode/processes/AsyncEchoLower</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://192.168.1.101:6060/axis2/services/anonService2/
</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:8A82155AEF614372A21311896079731</wsa:MessageID>
<wsa:Action>initiate</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<tns:AsyncEchoLowerRequest xmlns:tns="AsyncEchoLower">
<tns:input>Test</tns:input>
</tns:AsyncEchoLowerRequest>
</soapenv:Body>
</soapenv:Envelope>
and the outgoing message from ODE:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<addr:To xmlns:addr="http://www.w3.org/2005/08/addressing">
http://192.168.1.101:6060/axis2/services/anonService2/</addr:To>
<addr:Action xmlns:addr="http://www.w3.org/2005/08/addressing
">AsyncEchoLower/onResult</addr:Action>
<addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing">
<addr:Address>http://www.w3.org/2005/08/addressing/none</addr:Address>
</addr:ReplyTo>
<addr:MessageID xmlns:addr="http://www.w3.org/2005/08/addressing
">urn:uuid:D5361A8392F955CAD11311896082247</addr:MessageID>
<odesession:callback xmlns:odesession="
http://www.intalio.com/type/session">
<addr:Address xmlns:addr="http://www.w3.org/2005/08/addressing">
http://localhost:8080/ode/processes/AsyncEchoLower</addr:Address>
<odesession:session>hqejbhcnphr6h0n5t5hthq</odesession:session>
</odesession:callback>
</soapenv:Header>
<soapenv:Body>
<AsyncEchoLowerResponse xmlns="AsyncEchoLower">
<result>Test</result>
</AsyncEchoLowerResponse>
<RelatesTo xmlns="http://www.w3.org/2005/08/addressing
">urn:uuid:8A82155AEF614372A21311896079731</RelatesTo>
</soapenv:Body>
Re: Async ODE to axis2 client - manipulating headers
Posted by Denis Weerasiri <dd...@gmail.com>.
On Fri, Jul 29, 2011 at 5:38 AM, Todd Chisholm <to...@gmail.com>wrote:
> Hi everyone,
>
> I'm trying to call a very simple but asynchronous BPEL process (that just
> performs an echo) from an Axis2 client. The problem (well, one of them) is
> that the axis2 client needs a RelatedTo element in the returned SOAP
> message
> header. The value should be the same as the MessageID in the request
> header.
>
> I used the method from http://ode.apache.org/headers-handling.html to try
> to
> copy from the incoming header to the outgoing header. The result was odd:
> the RelatedTo element ended up in the body, not the header.
>
> The pertinent bpel snippet:
>
> <bpel:assign validate="no" name="AssignHeader">
> <bpel:copy>
> <bpel:from variable="input" header="MessageID"/>
> <bpel:to variable="output" header="RelatesTo"/>
> </bpel:copy>
> </bpel:assign>
>
I've tried this. It works in ODE 1.3.5
>
> Any idea how to get RelatesTo to end up in the header? I'm using ODE 2.0,
> beta2.
>
> Thanks for any insight!
> Todd
>
>
> The incoming message from Axis2:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <wsa:To>http://localhost:8080/ode/processes/AsyncEchoLower</wsa:To>
> <wsa:ReplyTo>
> <wsa:Address>http://192.168.1.101:6060/axis2/services/anonService2/
> </wsa:Address>
> </wsa:ReplyTo>
> <wsa:MessageID>urn:uuid:8A82155AEF614372A21311896079731</wsa:MessageID>
> <wsa:Action>initiate</wsa:Action>
> </soapenv:Header>
> <soapenv:Body>
> <tns:AsyncEchoLowerRequest xmlns:tns="AsyncEchoLower">
> <tns:input>Test</tns:input>
> </tns:AsyncEchoLowerRequest>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> and the outgoing message from ODE:
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Header>
> <addr:To xmlns:addr="http://www.w3.org/2005/08/addressing">
> http://192.168.1.101:6060/axis2/services/anonService2/</addr:To>
> <addr:Action xmlns:addr="http://www.w3.org/2005/08/addressing
> ">AsyncEchoLower/onResult</addr:Action>
> <addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing">
> <addr:Address>http://www.w3.org/2005/08/addressing/none
> </addr:Address>
> </addr:ReplyTo>
> <addr:MessageID xmlns:addr="http://www.w3.org/2005/08/addressing
> ">urn:uuid:D5361A8392F955CAD11311896082247</addr:MessageID>
> <odesession:callback xmlns:odesession="
> http://www.intalio.com/type/session">
> <addr:Address xmlns:addr="http://www.w3.org/2005/08/addressing">
> http://localhost:8080/ode/processes/AsyncEchoLower</addr:Address>
> <odesession:session>hqejbhcnphr6h0n5t5hthq</odesession:session>
> </odesession:callback>
> </soapenv:Header>
> <soapenv:Body>
> <AsyncEchoLowerResponse xmlns="AsyncEchoLower">
> <result>Test</result>
> </AsyncEchoLowerResponse>
> <RelatesTo xmlns="http://www.w3.org/2005/08/addressing
> ">urn:uuid:8A82155AEF614372A21311896079731</RelatesTo>
> </soapenv:Body>
>
--
Thanks,
Denis
----------------------------------------------------------
*Denis Weerasiri*
*
*
<http://wso2.com/>**** <http://wso2.com/>*site: **
https://sites.google.com/site/ddweerasiri/*<https://sites.google.com/site/ddweerasiri/>
*blog: **http://ddweerasiri.blogspot.com* <http://ddweerasiri.blogspot.com/>
*
twitter: **http://twitter.com/ddweerasiri* <http://twitter.com/ddweerasiri>*
linked-in: **http://lk.linkedin.com/in/ddweerasiri*<http://lk.linkedin.com/in/ddweerasiri>
Re: Async ODE to axis2 client - manipulating headers
Posted by Waruna Ranasinghe <wa...@gmail.com>.
Hi Todd,
Can you try with ODE 1.3.5?
ODE 2.0 is no longer maintained and ODE 1.3.5 is the latest stable build.
Thanks,
Waruna
On 29 July 2011 12:08, Todd Chisholm <to...@gmail.com> wrote:
> Hi everyone,
>
> I'm trying to call a very simple but asynchronous BPEL process (that just
> performs an echo) from an Axis2 client. The problem (well, one of them) is
> that the axis2 client needs a RelatedTo element in the returned SOAP
> message
> header. The value should be the same as the MessageID in the request
> header.
>
> I used the method from http://ode.apache.org/headers-handling.html to try
> to
> copy from the incoming header to the outgoing header. The result was odd:
> the RelatedTo element ended up in the body, not the header.
>
> The pertinent bpel snippet:
>
> <bpel:assign validate="no" name="AssignHeader">
> <bpel:copy>
> <bpel:from variable="input" header="MessageID"/>
> <bpel:to variable="output" header="RelatesTo"/>
> </bpel:copy>
> </bpel:assign>
>
> Any idea how to get RelatesTo to end up in the header? I'm using ODE 2.0,
> beta2.
>
> Thanks for any insight!
> Todd
>
>
> The incoming message from Axis2:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <wsa:To>http://localhost:8080/ode/processes/AsyncEchoLower</wsa:To>
> <wsa:ReplyTo>
> <wsa:Address>http://192.168.1.101:6060/axis2/services/anonService2/
> </wsa:Address>
> </wsa:ReplyTo>
> <wsa:MessageID>urn:uuid:8A82155AEF614372A21311896079731</wsa:MessageID>
> <wsa:Action>initiate</wsa:Action>
> </soapenv:Header>
> <soapenv:Body>
> <tns:AsyncEchoLowerRequest xmlns:tns="AsyncEchoLower">
> <tns:input>Test</tns:input>
> </tns:AsyncEchoLowerRequest>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> and the outgoing message from ODE:
>
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Header>
> <addr:To xmlns:addr="http://www.w3.org/2005/08/addressing">
> http://192.168.1.101:6060/axis2/services/anonService2/</addr:To>
> <addr:Action xmlns:addr="http://www.w3.org/2005/08/addressing
> ">AsyncEchoLower/onResult</addr:Action>
> <addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing">
> <addr:Address>http://www.w3.org/2005/08/addressing/none
> </addr:Address>
> </addr:ReplyTo>
> <addr:MessageID xmlns:addr="http://www.w3.org/2005/08/addressing
> ">urn:uuid:D5361A8392F955CAD11311896082247</addr:MessageID>
> <odesession:callback xmlns:odesession="
> http://www.intalio.com/type/session">
> <addr:Address xmlns:addr="http://www.w3.org/2005/08/addressing">
> http://localhost:8080/ode/processes/AsyncEchoLower</addr:Address>
> <odesession:session>hqejbhcnphr6h0n5t5hthq</odesession:session>
> </odesession:callback>
> </soapenv:Header>
> <soapenv:Body>
> <AsyncEchoLowerResponse xmlns="AsyncEchoLower">
> <result>Test</result>
> </AsyncEchoLowerResponse>
> <RelatesTo xmlns="http://www.w3.org/2005/08/addressing
> ">urn:uuid:8A82155AEF614372A21311896079731</RelatesTo>
> </soapenv:Body>
>
--
-----------------------------------------------------
Regards,
Waruna Ranasinghe
mob: 0724318285
blog: http://warunapw.blogspot.com
twitter: http://twitter.com/warunapww
http://lk.linkedin.com/in/waruna
www.facebook.com/waruna.ranasinghe