Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2067

Dynamic URL for REST Receiver

$
0
0

Hi Experts,

 

I have a requirement to create a dynamic endpoint URL  for REST receiver.

 

I know that we can replace the different placeholders in the URL using XPATH Values or custom values .

 

I also understand we can populate custom attributes in dynamic config ASMA and substitute variables in curly braces.

 

In my case I need a different REST URL to be built dynamically everytime a call is made with specific Input conditions.

 

I need the REST URL to behave in the below fashion.

 

If both input fields are passed then

 

https://testurl.com/webservice/invoices?id={id}&updated_since={updated_since}

 

 

If the values are not passed then the URL should pick all invoices and URL should change like below

 

 

https://testurl.com/webservice/invoices/

 

 

If only id is supplied then the URL should be

 

 

https://testurl.com/webservice/invoices?id={id}

 

 

I tried passing blank values for id and Updated_since fields in mapping , but I am receiving a response failure message

" com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Node.getNodeType() of a null object loaded from local variable 'resultNode' "

 

 

Can you please provide your valuable suggestions .

 

Regards,

Nick


Viewing all articles
Browse latest Browse all 2067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>