cancel
Showing results for 
Search instead for 
Did you mean: 

REST Adapter polling

maheswarareddykonda
Active Contributor
0 Kudos

Hi Experts,

I am working Rest sender polling adapter,

the requirement is depending on dynamic URL i suppose to poll the data and send to ECC server.

URL : https://XXXXXXXXXXX.com/scripts/XXXXXXXmx.dll?cid=4477&pw=44sap77&compat_level=1&packet_id=0

here packet_id should be always increased in each transaction by 1 and initially 0.

Note: i have read this document ,though seems that explains more on incremental for timestamp.

can any please help me how to achieve this requirement , thanks in advance

-Maheswara

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Mahesh,

Check the section Option 2: Incremental request based on response content in above blog.

If you have these elements in your response message.

Select Incremental Type as Response Content , The below config you can use it in REST adapter.

Regards,

Praveen.

maheswarareddykonda
Active Contributor
0 Kudos

thanks Praveen for reply,

actually this is poll right, i am getting confuse here

can you please explain some more about why we are thinking about response?

also NextPacketID and PreviousPackID - are they need to be in request structure while we do polling?

flow is: REST(poll depending on PacketID) to SAP(proxy)

former_member182412
Active Contributor
0 Kudos

Hi Mahesh,

I mean if you call the rest service with GET request then the service will give you the response(REST adapter polling is HTTP GET Operation)  and that response you are sending to ECC. So these two values must be there in REST API response(NextPacketID is stored in incrementalToken variable and will be used in the next call) in order to use them in incremental Requests, check below sap help for this.


Setting up Incremental Requests

For REST APIs that allow incremental requests, the adapter allows to store the timestamp of the latest call or a custom value (specified by an XPath expression or a JSON element). The value will be stored between the calls and can be referenced in the REST URL as a placeholder with name incrementalToken.

Finally the URL will be https://XXXXXXXXXXX.com/scripts/XXXXXXXmx.dll?cid=4477&pw=44sap77&compat_level=1&packet_id={incrementalToken}

Regards,

Praveen.

maheswarareddykonda
Active Contributor
0 Kudos

Thanks again Praveen,

i will make that and will let you know.

Answers (0)