You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Markus Piff <ma...@gmail.com> on 2009/12/30 00:05:47 UTC

Accessing SOAP Headers

Hi,

I currently trying to access some WS-Addressing headers.
Is there any easy way to access those? The direct XPath expressions
don't seem to work (e.g.
/soapenv:Envelope/soapenv:Header/wsa:ReplyTo/wsa:Address/text()
doesn't select anything).

I simply want to extract the ReplyTo Address from the following
incoming message and copy this information to a variable.
Am I missing something (I just started with WS-BPEL), or why won't
this work? Any hint is highly appreciated :-).

Cheers,
Markus

----

<?xml version="1.0"
encoding="http://schemas.xmlsoap.org/soap/envelope/" standalone="no"?>
<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:8082/ode/processes/DILoanService</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://nothing.here.com/bla</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:BCE3921DCE27A8EBBC1262126971092</wsa:MessageID>
<wsa:Action>http://wso2.org/bps/samples/LoanService/getLoanOffer</wsa:Action>
</soapenv:Header>
<soapenv:Body>...</soapenv:Body>
</soapenv:Envelope>

Re: Accessing SOAP Headers

Posted by Markus Piff <ma...@gmail.com>.
Thx, that worked like a charm :-).

Cheers,
Markus

On Sat, Jan 2, 2010 at 10:00 PM, Łukasz Budnik <lu...@gmail.com> wrote:
> Hi Markus,
>
> Yes, there is a very simple way to do this. Mind that it's ODE
> specific way and is not WS-BPEL compliant. Try this:
>
> <bpws:copy>
>   <bpws:from variable="input" header="idProcessInstance" /></bpws:from>
>   <bpws:to variable="NuntiusIdProcessInstance" />
> </bpws:copy>
>
> From what I remember it was introduced in ODE 1.3.2.
>
> Cheers,
> Łukasz
> - -
> Nuntius - free WS-BPEL broker http://nuntius.eti.pg.gda.pl
>
> 2009/12/30 Markus Piff <ma...@gmail.com>:
>> Hi,
>>
>> I currently trying to access some WS-Addressing headers.
>> Is there any easy way to access those? The direct XPath expressions
>> don't seem to work (e.g.
>> /soapenv:Envelope/soapenv:Header/wsa:ReplyTo/wsa:Address/text()
>> doesn't select anything).
>>
>> I simply want to extract the ReplyTo Address from the following
>> incoming message and copy this information to a variable.
>> Am I missing something (I just started with WS-BPEL), or why won't
>> this work? Any hint is highly appreciated :-).
>>
>> Cheers,
>> Markus
>>
>> ----
>>
>> <?xml version="1.0"
>> encoding="http://schemas.xmlsoap.org/soap/envelope/" standalone="no"?>
>> <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:8082/ode/processes/DILoanService</wsa:To>
>> <wsa:ReplyTo>
>> <wsa:Address>http://nothing.here.com/bla</wsa:Address>
>> </wsa:ReplyTo>
>> <wsa:MessageID>urn:uuid:BCE3921DCE27A8EBBC1262126971092</wsa:MessageID>
>> <wsa:Action>http://wso2.org/bps/samples/LoanService/getLoanOffer</wsa:Action>
>> </soapenv:Header>
>> <soapenv:Body>...</soapenv:Body>
>> </soapenv:Envelope>
>>
>

Re: Accessing SOAP Headers

Posted by Łukasz Budnik <lu...@gmail.com>.
Hi Markus,

Yes, there is a very simple way to do this. Mind that it's ODE
specific way and is not WS-BPEL compliant. Try this:

<bpws:copy>
   <bpws:from variable="input" header="idProcessInstance" /></bpws:from>
   <bpws:to variable="NuntiusIdProcessInstance" />
</bpws:copy>

>From what I remember it was introduced in ODE 1.3.2.

Cheers,
Łukasz
- -
Nuntius - free WS-BPEL broker http://nuntius.eti.pg.gda.pl

2009/12/30 Markus Piff <ma...@gmail.com>:
> Hi,
>
> I currently trying to access some WS-Addressing headers.
> Is there any easy way to access those? The direct XPath expressions
> don't seem to work (e.g.
> /soapenv:Envelope/soapenv:Header/wsa:ReplyTo/wsa:Address/text()
> doesn't select anything).
>
> I simply want to extract the ReplyTo Address from the following
> incoming message and copy this information to a variable.
> Am I missing something (I just started with WS-BPEL), or why won't
> this work? Any hint is highly appreciated :-).
>
> Cheers,
> Markus
>
> ----
>
> <?xml version="1.0"
> encoding="http://schemas.xmlsoap.org/soap/envelope/" standalone="no"?>
> <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:8082/ode/processes/DILoanService</wsa:To>
> <wsa:ReplyTo>
> <wsa:Address>http://nothing.here.com/bla</wsa:Address>
> </wsa:ReplyTo>
> <wsa:MessageID>urn:uuid:BCE3921DCE27A8EBBC1262126971092</wsa:MessageID>
> <wsa:Action>http://wso2.org/bps/samples/LoanService/getLoanOffer</wsa:Action>
> </soapenv:Header>
> <soapenv:Body>...</soapenv:Body>
> </soapenv:Envelope>
>