You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Christian Schouten <C....@duthler.nl> on 2010/02/11 11:12:22 UTC

How to access (Axis2) ServiceClient instance?

Dear all,

I am running Intalio|BPMS, which is Apache ODE on top of Axis2.
Now, in my BPEL process I need to access the SOAP envelope's header (to
be specific, I need to access the <wsse:BinarySecurityToken> element).

After some searching, I came to the conclusion that the best way seems
to be to create a static function in a JAR file (referencable as
<bpel:from>prefix:functionName($thisReceive__requestRequestMsg.body/name
space:wsdlField, "param")</bpel:from>) that can retrieve the
ServiceClient instance, then get the OperationContext, then get the
MessageContext in which I can get the Header and find an element. I've
succeeded in creating JARs and referencing functions from an ODE process
problem-free. IMHO, since the entire ODE process is within a single
request/response dialog, the security information should be available
somewhere.

Question 1: Do you agree that this is the way to go or can anybody
suggest an alternative way of obtaining the WS-Security information?

Question 2: Once I'm in the JAR called through ODE, how can I reference
the (Axis2) ServiceClient instance?

Any help is most appreciated,

Best regards,
 
Christian C. Schouten

Re: How to access (Axis2) ServiceClient instance?

Posted by Rafal Rusin <ra...@gmail.com>.
ODE has extension for accessing headers:
       <assign>
           <copy>
                <from variable="myVar" header="ConversationId"/>
                <to variable="faultInput" header="ConversationId"/>
           </copy>
       </assign>

Example is here:
http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel

On 12 February 2010 12:29, Renat Zubairov <re...@sopera.de> wrote:
> Hello Christian,
>
> I could suggest another way to access the header information, it's a kind of recommended way to do it in ODE however in case of sending heeaders. Since BPEL can't access headers directly you could try to transform the header information you are interested in, in the IL into a separate message part.
>
> Renat
>
>
> On 11.02.10 11:12, "Christian Schouten" <C....@duthler.nl> wrote:
>
> Dear all,
>
> I am running Intalio|BPMS, which is Apache ODE on top of Axis2.
> Now, in my BPEL process I need to access the SOAP envelope's header (to
> be specific, I need to access the <wsse:BinarySecurityToken> element).
>
> After some searching, I came to the conclusion that the best way seems
> to be to create a static function in a JAR file (referencable as
> <bpel:from>prefix:functionName($thisReceive__requestRequestMsg.body/name
> space:wsdlField, "param")</bpel:from>) that can retrieve the
> ServiceClient instance, then get the OperationContext, then get the
> MessageContext in which I can get the Header and find an element. I've
> succeeded in creating JARs and referencing functions from an ODE process
> problem-free. IMHO, since the entire ODE process is within a single
> request/response dialog, the security information should be available
> somewhere.
>
> Question 1: Do you agree that this is the way to go or can anybody
> suggest an alternative way of obtaining the WS-Security information?
>
> Question 2: Once I'm in the JAR called through ODE, how can I reference
> the (Axis2) ServiceClient instance?
>
> Any help is most appreciated,
>
> Best regards,
>
> Christian C. Schouten
>
>


Regards,
-- 
Rafał Rusin
http://rrusin.blogspot.com
http://www.touk.pl
http://top.touk.pl

RE: How to access (Axis2) ServiceClient instance?

Posted by Christian Schouten <C....@duthler.nl>.
Thanks a lot! This sounds like just what I need.
Tried it and I'm getting header info into my soap response!
(Unfortunately I can't get it to work properly just yet because of a bug in Intalio, but that doesn't change my gratitude)

Thanks,
 
Christian C. Schouten
 

-----Original Message-----
From: Rafal Rusin [mailto:rafal.rusin@gmail.com] 
Sent: vrijdag 12 februari 2010 13:30
To: user@ode.apache.org
Subject: Re: How to access (Axis2) ServiceClient instance?

ODE has extension for accessing headers:
       <assign>
           <copy>
                <from variable="myVar" header="ConversationId"/>
                <to variable="faultInput" header="ConversationId"/>
           </copy>
       </assign>

Example is here:
http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel

On 12 February 2010 12:29, Renat Zubairov <re...@sopera.de> wrote:
> Hello Christian,
>
> I could suggest another way to access the header information, it's a kind of recommended way to do it in ODE however in case of sending heeaders. Since BPEL can't access headers directly you could try to transform the header information you are interested in, in the IL into a separate message part.
>
> Renat
>
>
> On 11.02.10 11:12, "Christian Schouten" <C....@duthler.nl> wrote:
>
> Dear all,
>
> I am running Intalio|BPMS, which is Apache ODE on top of Axis2.
> Now, in my BPEL process I need to access the SOAP envelope's header (to
> be specific, I need to access the <wsse:BinarySecurityToken> element).
>
> After some searching, I came to the conclusion that the best way seems
> to be to create a static function in a JAR file (referencable as
> <bpel:from>prefix:functionName($thisReceive__requestRequestMsg.body/name
> space:wsdlField, "param")</bpel:from>) that can retrieve the
> ServiceClient instance, then get the OperationContext, then get the
> MessageContext in which I can get the Header and find an element. I've
> succeeded in creating JARs and referencing functions from an ODE process
> problem-free. IMHO, since the entire ODE process is within a single
> request/response dialog, the security information should be available
> somewhere.
>
> Question 1: Do you agree that this is the way to go or can anybody
> suggest an alternative way of obtaining the WS-Security information?
>
> Question 2: Once I'm in the JAR called through ODE, how can I reference
> the (Axis2) ServiceClient instance?
>
> Any help is most appreciated,
>
> Best regards,
>
> Christian C. Schouten
>
>


Regards,
-- 
Rafał Rusin
http://rrusin.blogspot.com
http://www.touk.pl
http://top.touk.pl



Re: How to access (Axis2) ServiceClient instance?

Posted by Renat Zubairov <re...@sopera.de>.
Hello Christian,

I could suggest another way to access the header information, it's a kind of recommended way to do it in ODE however in case of sending heeaders. Since BPEL can't access headers directly you could try to transform the header information you are interested in, in the IL into a separate message part.

Renat


On 11.02.10 11:12, "Christian Schouten" <C....@duthler.nl> wrote:

Dear all,

I am running Intalio|BPMS, which is Apache ODE on top of Axis2.
Now, in my BPEL process I need to access the SOAP envelope's header (to
be specific, I need to access the <wsse:BinarySecurityToken> element).

After some searching, I came to the conclusion that the best way seems
to be to create a static function in a JAR file (referencable as
<bpel:from>prefix:functionName($thisReceive__requestRequestMsg.body/name
space:wsdlField, "param")</bpel:from>) that can retrieve the
ServiceClient instance, then get the OperationContext, then get the
MessageContext in which I can get the Header and find an element. I've
succeeded in creating JARs and referencing functions from an ODE process
problem-free. IMHO, since the entire ODE process is within a single
request/response dialog, the security information should be available
somewhere.

Question 1: Do you agree that this is the way to go or can anybody
suggest an alternative way of obtaining the WS-Security information?

Question 2: Once I'm in the JAR called through ODE, how can I reference
the (Axis2) ServiceClient instance?

Any help is most appreciated,

Best regards,

Christian C. Schouten