Skip to main content

developerWorks >  SOA and Web services  >  Forums  >  IBM WebSphere DataPower SOA Appliance  >  developerWorks

how to set and get context varaibles in datapower    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 1 - Pages: 1 - Last Post: Nov 4, 2009 5:44 PM Last Post By: PeterA
haranath

Posts: 1
Registered: Nov 04, 2009 11:15:18 AM
how to set and get context varaibles in datapower
Posted: Nov 04, 2009 11:24:04 AM
Click to report abuse...   Click to reply to this thread Reply
I have created one multi protocol gate way service which is making call to one loop back xml fire wall service.

It is takes the soap as the input message and gives soap output.consists of 2 transform actions(one is transform binary another is transform).

transform binary action takes the soap body part as input and gives back the string as the output which i am setting(means iam giving the context variable name in the action output) in the conetxt variable.

In the 2 nd transform action iam trign to take the conetxt variable as the input but it is neither getting the value nor setting it.

if any one knows how to set and get context variables please help us to solve the problem
PeterA

Posts: 45
Registered: Nov 26, 2008 01:54:15 PM
Re: how to set and get context varaibles in datapower
Posted: Nov 04, 2009 05:44:04 PM   in response to: haranath in response to: haranath's post
Click to report abuse...   Click to reply to this thread Reply
Hi,

You can set a context variable with the following:
<dp:set-variable name="'var://context/yourContext/yourVariableName'" value="string($someVar)"/>


and retrieve the value with the following:
<xsl:variable name="yourVar" select="dp:variable('var://context/yourContext/yourVariableName')" />

Point your RSS reader here for a feed of the latest messages in all forums