How to extract unique data from payload and send in Header in API gateway

In API gate way, I want to extract the unique data from payload and sent it to native API in the form of headers.

For now I used request processing → custom extension to extract the value payload , place it in a temp variable and pass it to routing-> custom http header.

below is my xml

I am able to extract family |${request.payload.xpath[//rib:ApplicationMessages/rib:ApplicationMessage/rib:family]}|
but not supplier by using
${request.payload.xpath[//rib:ApplicationMessages/rib:ApplicationMessage/rib:payloadXml/VendorDesc/ns1:VendorHdrDesc/ns1:supplier]}

How to extract data from inner xml which is present in payload.
Below details are added in req processing → custom extension.

Thank you,
Vaishnavi

For now I used request processing → custom extension to extract the value payload , place it in a temp variable and pass it to routing-> custom http header.

below is my xml

I am able to extract family |${request.payload.xpath[//rib:ApplicationMessages/rib:ApplicationMessage/rib:family]}|
but not supplier by using
${request.payload.xpath[//rib:ApplicationMessages/rib:ApplicationMessage/rib:payloadXml/VendorDesc/ns1:VendorHdrDesc/ns1:supplier]}

How to extract data from inner xml which is present in payload.
Below details are added in req processing → custom extension.

Hi Vaishnavi,

From the looks of it, I think it doesn’t work because XPath is not applied to the CDATA. You can also explore other options like XSLT Transformation or Invoke webMethods IS or Custom Extension to achieve this.

Regards,
Vallab

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.