I think you should ask that from ODE first, if they know how to access
ServiceClient instances, then you know the rest.

Deepal

Christian Schouten wrote:
> Hi Deepal,
>
> Thanks, it sounds very logical and it is probably exactly what I need to
> first retrieve client, then context, then message. I am just wondering
> though how to retrieve the service client instance.
> I need to place my code in a JAR that is called automatically by ODE
> upon finding a reference in the BPEL (i.e.
> <bpel:from>prefix:functionName($thisReceive__requestRequestMsg.body/name
> space:wsdlField, "param")</bpel:from>). I do not start the server or
> call a service directly myself, I am simply placed in the middle.
> So I guess my first question to ask is, is there a standardized way to
> reach above into Axis2 or should I ask this question in an ODE-specific
> group?
>
> Met vriendelijke groet,
>  
> Christian C. Schouten
>
>
> -----Original Message-----
> From: Deepal jayasinghe [mailto:deep...@gmail.com] 
> Sent: woensdag 10 februari 2010 0:16
> To: axis-user@ws.apache.org
> Subject: Re: Location to call getCurrentMessageContext
>
> First get the service client instance, and then call the following
> method to get the OperationContext, once you have operation context you
> have access to both in and out messages contexts.
>
> getLastOperationContext
>
> Thanks,
> Deepal
>   
>> Dear all,
>>
>>  
>>
>> From within a webservice that runs on Axis2, I need to access some
>> soap header information (the <wsse:BinarySecurityToken> to be exact, I
>> need to find out which certificate was passed for client
>>     
> authentication).
>   
>>  
>>
>> Application architecture: I am running Intalio BPMS, which is Apache
>> ODE that seems to auto-create a webservice and its WSDL on Axis2
>> (without programming on my side). This runs on Tomcat.
>>
>>  
>>
>> I do not have access to the code generated by ODE or to the
>> integration between ODE and Axis2 (I think...) but I can place a JAR
>>     
> in
>   
>> ODE's classpath. Any (static) functions within that JAR are
>> automatically visible to ODE.
>>
>> In other words, I can for instance define a jar with a static function
>> f that accepts as input one of my wsdl parameters and outputs
>> something that can be used in following steps of the ODE-managed
>>     
> process.
>   
>> So far so good, no problems there since I've remained within the realm
>> of the data sent as input to the WSDL (i.e. only parameters from
>> inside the soap:body that are automatically available).
>>
>>  
>>
>> Now as mentioned I need to access the soap:header and there I've got a
>> problem since the bpel layer is happily unaware of the existence of
>> such a thing as the soap:header.
>>
>> After some googling I started to think that my best bet was to add a
>> jar/function in ode's classpath and to call
>> MessageContext.getCurrentMessageContext() from there (am I correct in
>> assuming this or is there a better alternative?).
>>
>> Unfortunately my first attempt stranded with a null coming back from
>> it. All functions are accessible/callable and also have the Axis2
>> jar's in the same classpath directory so that should be ok. My guess
>> is I'm in a different thread or context due to placing it in a
>> separate jar maybe but how do I find out if this is true? And how can
>> I access another thread's information if this is the problem? The
>> entire process spans a single (synchronous) soap request/response
>> dialog so I guess there should be a message context somewhere (as the
>> request comes in before the call to my new jar and the response is
>> sent out after the call to it).
>>
>>  
>>
>> Any help or pointers is more than appreciated,
>>
>>  
>>
>> Best,
>>
>>  
>>
>> Christian C. Schouten
>>
>>  
>>
>>  
>>
>>     
>
>
>   

-- 
Thank you!


http://blogs.deepal.org
http://deepal.org

Reply via email to