Skip to Content
avatar image
Former Member

error while reading url value from rest sender adapter

Hi All,

We are developing the interface where need to read the value from the URL by using rest sender adapter but facing issue in consuming the value .

Error:

cannot create target element. Not able to pass the value to the attribute

Adapter config:

end point: /rest/sapecc/v1/frankolicense/licensenumber

Pattern: /{licensenumber}

dynamic attribute: rest service/URL pattern/licensenumber

rest operation: http operation

general: JSON/http content type header

Mapping:

namespace(http://sap.com/xi/XI/System/REST) first input to getasma (UDF), Second input licensenumber.

Note: License number will be passed to the URL

Example:http://Host:Port/RESTAdapter/rest/sapecc/v1/frako/licensenumber/520501

I have gone through lot of posts related to the same requirement but helpless.

Thanks & Regards,

kiran.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 08, 2017 at 10:03 AM

    if you dont mind could you pleas share you channel configuration(dynamic conifig) and UDF dynamic config code?

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 08, 2017 at 10:09 AM

    Hi Kiran,

    If I understand your issue correctly, you've problem in configuring the REST endpoint in channel and retrieving it in mapping. Try with below approach.

    http://Host:Port/RESTAdapter/rest/sapecc/v1/frako/licensenumber/520501

    Channel Selection Tab
    SpecifyEndpoint-->rest
    RestResources Tab
    URL Pattern-->/sapecc/v1/frako/licensenumber/{licNo}
    XI dynamic Attribute
    Dynamic Attribute-->custom Attribute
    CustomAttributeName-->licNo
    ValueSource-->URL Pattern element
    Pattern Element-->licNo

    After receiving the message, verify the dynamic attributes of the message and see if you are getting the URL correctly or not by checking the attribute "path" of http://sap.com/xi/XI/System/REST . Then, in message mapping write a UDF to read this path and map it as required.

    ---Priyanka

    Add comment
    10|10000 characters needed characters exceeded