Hi Senuwan,

In order to pass the value of a property from insequence to outsequence,
you can try with the property scope as "default/synapse".

So that you can modify your insequence and outsequence as follows.

<inSequence>
<class name="org.wso2.sample.JWTRoleReader">
                  <property name="JWT_JSON_Array" value="literal"/>
               </class>
               <property expression="get-property('role_name')"
                         name="Role"
                         scope="transport"/>
               <property expression="get-property('transport','Role')"
                         name="myPropertyInDefault"
                         scope="default"/>
</insequence>
<outsequence>
<property expression="get-property('default', 'myPropertyInDefault')"
                         name="myPropertyInTransport"
                         scope="transport"/>
</outsequence>

So that you can use "get-property('transport','myPropertyInTransport')" to
retrieve the value in outsequence.

Please refer https://stackoverflow.com/a/13378163 for further convenience.

Regards,
Buddhimala


On Wed, Nov 22, 2017 at 10:42 AM, Rukshan Premathunga <[email protected]>
wrote:

> Hi Senuwan,
>
> You can add required property to message context inside the class
> mediator. So that you can read them back in out-sequence.
>
> Thanks and Regards
>
> On Wed, Nov 22, 2017 at 10:09 AM, Senuwan Withana <[email protected]>
> wrote:
>
>> Hi Team,
>>
>>
>> I have created the below class mediator to call my JWTRoleReder, in
>> Sequence .
>>
>>     <class name="org.wso2.sample.JWTRoleReader">
>>                   <property name="JWT_JSON_Array" value="literal"/>
>>                </class>
>>
>>
>> However I could not able to pass above details into the outSequence .
>> Kindly suggest solutions?
>>
>> Thanks.
>> *Senuwan Withana*
>> Software Engineer - Support Team | WSO2
>>
>> Email : [email protected]
>> Mobile: 94773212853
>> Web: http://www.wso2.com
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074 <+94%2071%20182%202074>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 


*Buddhimala Ranasinghe*
Software Engineer-Support Team | WSO2
Emil: [email protected]
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to