cancel
Showing results for 
Search instead for 
Did you mean: 

Rest Adapter- Pattern value replacement

former_member335553
Active Contributor
0 Kudos

Hi

I have a SOAP to REST Scenario with the REST receiver adapter with the following configurations.

1. Data format - XML

- As it is xml format, I had to use the AF_Modules/MessageTransformBean

with Transform.ContentType = application/xml in the modules tab to strip of the interface and interface namespace tags.

2. Dynamic endpoint URL

http://host:port/id/ordernumber

Source datatype has "id" which will not be passed to the Target application. Dynamic attributes have been set for this field and I am able to see the id value in the dynamic configuration. However the id value is not reflected in the rest receiver adapter processing . Under the parameters tab -->pattern value replacement, Adapter specific attribute is selected with the custom attribute

url pattern -

http://host:port/id/ordernumber

Pattern element name - id

Attribute Name - I get with an error "placeholder for id is missing or empty.

As it is a data format of XML, Have I got something to add up in the HTTP headers for the adapter to understand the attribute in the dynamic config.

The same is the case when I try to do an xpath for ordernumber . I end with error "XPath expression is incorrect". however when I test the XPATH in any editor, it is fine.

Please advise

Accepted Solutions (0)

Answers (2)

Answers (2)

Muniyappan
Active Contributor
0 Kudos

Hi Anusha,

for point 1, could you please share us the input and expected output xml.

you could play with XMLAnonymizerBean to handle this requirement.

https://help.sap.com/doc/saphelp_nwpi71/7.1/en-US/45/d169186a29570ae10000000a114a6b/content.htm?no_c...

https://answers.sap.com/questions/10984331/pi-74-afmodulesxmlanonymizerbean-remove-namespace.html

Regards,

Muni

JaySchwendemann
Active Contributor
0 Kudos

This is long gone probably, but answer for 2.

You'd probably give as {id} so http://host:port/{id}/ordernumber

Cheers

Jens