Friday, January 17, 2014

OSB Sample for XQuery Transformation with XQuery Custom Function

In this example we are doing two things
1. Tranform the payload as per the business service
2. XQuery function is applied to insert the string "Dollar" for the price starts with "$" example if price is "$100" then amountType will be inserted with string "Dollar" else string "Rupees" is passed.

Proxy Service Request Payload:
<exam:Items xmlns:exam="http://www.example.org">
    <exam:Item>
        <exam:price>$100</exam:price>
    </exam:Item>
</exam:Items>


Business Service Payload:
<soapenv:Envelope  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
</soap:Header>
<soapenv:Body>
<exam:products  xmlns:exam="http://www.example.org">
<exam:Item>
<exam:price>$100</exam:price>
<exam:amountType>Dollar</exam:amountType>
</exam:Item>
</exam:products>
</soapenv:Body>
</soapenv:Envelope>

Downlod OSB Proxy Sample Project

No comments:

Post a Comment