Skip to Content

REST to REST Sync Scenario Errors

Hi Experts,

We have a requirement where we need to work on REST to REST synchronous interface. I have done the configurations, but unable to get the expected results. This is my first REST based scenario so I have few points to be clarified here.

1) Sender Rest URL is hitting, but getting an error as mentioned below when the response is coming from the REST API in receiver channel-

Error while sending message to module processor: Sender Channel 'RESTSenderData' Catching exception calling messaging system: com.sap.aii.adapter.rest.ejb.parse.InvalidJSonContent: Invalid JSON message content used; Message: "Input is not valid JSON at character 848355 of

2) The API which is returning a response in JSON format(no parameter is required to be passed as an input). Just, GET function on the API should work?

3) Do I need to use some modules for conversion? Or, the parameters in the channel should work?

I am not sure, when I validated the JSON it is correct. But, this is not working as expected. PFA the configuration details which I am using.

SenderREST

ReceiverREST

Please suggest for any changes to be tried.

Thanks,
Nidhi Srivastava

senderrest.jpg (242.6 kB)
receiverrest.jpg (239.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Hi Nidhi,

    Did you succeed with the REST to REST Sync Scenario ?
    Could you help me, and send me a screenshot of your sender e receiver restadapter? I'm trying to define a similar "rest to rest" interface (with no payload in sender), to expose to user system and I'm no getting results.

    Márcio

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 26, 2017 at 02:01 AM

    how many fields are there in the input Jason? If no parameter required for target API you can simply use only be dummy field in the sender side.

    Or to start with basic use xml in sender side not Jason...

    Your error seems to be in sender side.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Nidhi Srivastava

      correct. there is not input in json. for constructing the message you just pass some dummy value in json.

      { "root": { "field": "dummy" } }

      so when the interface calls the receiver channels, this input payload will not have any meaning.whatever url is given in the receiver channel will be called.

      dummy values are for the sake of message construction to call right sender interface.

      1. can you test using xml with dummy values from sender.

      2. try test interface in from rwb/pimon--if this works then your issue belongs to sender channel