Hi Dushantha,

Since I have GET, POST,PUT, DELETE methods in my proxy, do you say the
above-suggested method will work for GET. I have tried it but could not
achieve it.
And if I am correct, your example is about POST or PUT method.
Could you please let me know whether I can use the same way for all four
methods or only specific to POST method.

Thank you.


On Wed, Nov 15, 2017 at 3:10 PM, Dushantha Batuwita <[email protected]>
wrote:

> please refer to the above answers
>
> Regards
>
> On Wed, Nov 15, 2017 at 2:35 PM, Dushantha Batuwita <[email protected]>
> wrote:
>
>> Hi Buddhimala
>> Accessing the JSON payload parameters and retrieving those within the
>> proxy service can be achieved with the <args> element of the Payload
>> factory mediator according to your scenario.
>> Setting already retrieved parameters to the predefined soap structure is
>> accomplished within the <format> element.
>>
>> suppose that we need to access the following JSON structure
>>
>> {
>>     "orderLine": {
>>
>>         "ordername": "Cooking Item",
>>         "orderid": "123456",
>>         "product": {
>>
>>             "productname": "coconutoil",
>>             "productgrade": "drade1",
>>             "productcolour": "white"
>>
>>         }
>>     }
>> }
>>
>>
>> and retrieve the values in order to set to the soap structure given
>> bellow within the payload factory is as follows refer to document[1] for
>> further details
>> <payloadFactory media-type="xml">
>>         <format>
>>             <soapenv:Envelope
>>                 xmlns:ser="http://service.sample.oasis.com";
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
>> http://dto.service.sample.oasis.com/xsd";>
>>                 <soapenv:Header/>
>>                  <soapenv:Body>
>>                     <ser:addOrderLineRecord>
>>                         <ser:orderLine>
>>                             <xsd:product>
>>                                 <xsd:productname>$1</xsd:ordername>
>>                                 <xsd:productgrade>$2</xsd:orderid>
>>                                 <xsd:productcolour>$3</xsd:productcolour>
>>                             </xsd:product>
>>                             <xsd:ordername>$4</xsd:ordername>
>>                             <xsd:orderid>$5</xsd:orderid>
>>
>>                         </ser:orderLine>
>>                     </ser:addOrderLineRecord>
>>                 </soapenv:Body>
>>             </soapenv:Envelope>
>> </format>
>> <args>
>>             <arg *evaluator="json"*
>> *expression="$.orderLine.product.productname"*/>
>>             <arg evaluator="json" expression="$.orderLine.produc
>> t.productgrade"/>
>>             <arg evaluator="json" expression="$.orderLine.produc
>> t.productcolour"/>
>>             <arg evaluator="json" expression="$.orderLine.ordername"/>
>>             <arg evaluator="json" expression="$.orderLine.orderid"/>
>> </args>
>> </payloadFactory>
>>
>> NOTE: when you set the $n parameter to be couches to follow the order in
>> which the args are defined. i.e. the first line of the arg refer to $1..
>> and etc
>>
>> Regards
>>
>> On Wed, Nov 15, 2017 at 2:32 PM, Buddhimala Ranasinghe <
>> [email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I need to pass a json payload from an API to ESB proxy service. In ESB,
>>> I'm using parameters in the passed JSON payload inside payloadFactory
>>> mediator in my ESB which will be sent towards a secured SOAP BE. Can you
>>> please guide me on this? I need to know how could those parameters can be
>>> addressed inside my proxy service.
>>>
>>> Regards,
>>> Buddhimala
>>>
>>> --
>>>
>>>
>>> *Buddhimala Ranasinghe*
>>> Software Engineer-Support Team | WSO2
>>> Emil: [email protected]
>>> Mobile:+94771563138 <+94%2077%20156%203138>
>>> 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
>>>
>>>
>>
>>
>> --
>> *Dushantha Nayanajith Chandima Batuwita*
>> Software Engineer Support | WSO2
>> [email protected]
>> mobile : 0094777453010
>>
>
>
>
> --
> *Dushantha Nayanajith Chandima Batuwita*
> Software Engineer Support | WSO2
> [email protected]
> mobile : 0094777453010
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

*Piriya Sivalingam*

*Software Engineer - Support Team*

*WSO2*
*Mobile : +94 77 8462039*

[image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to