cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver adapter REST for PI7.4 single stack

Former Member
0 Kudos

Dear All,

I have a scenario where the sender adapter IDOC_AAE , the receiver adapter is REST.  I send data to third-party system via BD10. The payload data is not the data format of json. Would you please tell me the reasons?

Appreciate your support.

The REST CC include errors. internal server error.

REST configuration:

Many thanks & best regards,

Hubery

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Hubery,

  • Do you want request payload to JSON or XML??
  • The URL which you are using is wrong, you used the WSDL URL, is the web service soap web service?? Use proper end point for the service.
  • First of all check the service REST or SOAP.

Regards,

Praveen.

Former Member
0 Kudos

Dear Praveen,

This is asynchronous interface. The sender system SAP ECC is the data format of xml, but the receiver system must be the data format of json. How to configure it. Please point out.

Thank you so much.

Hubery

former_member182412
Active Contributor
0 Kudos

Hi Hubery,

The payload is json format only but the entire xml contain in one element called json.

Can you provide after mapping payload?

But the endpoint URL is wrong configure proper end point.

Regards,

Praveen.

Former Member
0 Kudos

Dear Praveen,

For first questions about json. I understand, the receiving structure has only one fields. That is why the payload is above.

For second questions, the URL address(WebService) come from third-party system. You mean I need to configure the endpoint? If so,how to change the third-party system. What the endpoint mean for third-party system. The third-party system is java system.

Many thanks & best regards,

Hubery

former_member186851
Active Contributor
0 Kudos

Hello Hubrey,

Endpoint should like something like below (just an example)

http://www.thomas-bayer.com/sqlrest/CUSTOMER/


guess the one you mentioned in channel is place holder of WSDL.

Former Member
0 Kudos

Yes, Raghuraman, the URL address for above screenshot is the WebService of third-party system.

I know the sender adapter REST need to configure the endpoint. But for receiver adapter REST I not clear .

Do you have any example for receiver adapter REST? I cannot find it via google. I guess

Many thanks & best regards,

Hubery

former_member182412
Active Contributor
0 Kudos

did you test the URL using any other client like postman? Once you tested successful then configure the url in PI

former_member186851
Active Contributor
0 Kudos

Hello Hubrey,

Check the below link

Former Member
0 Kudos

In fact, for my interface, I do not need to configure the variables. I mean the WebService the third-party deploy put to view REST URL. Is that OK?

Many thanks & best regards,

Hubery

Former Member
0 Kudos

But  how to receive the data for the third-party system? I mean the WebService the third-party deploy put to view REST URL. Is that OK?

For my interface, I do not need to configure the any variables.


I do not understand

Thank you for your reply, Praveen.

Many thanks & best regards,

Hubery

former_member182412
Active Contributor
0 Kudos

Hi Hubery,

  • Ask the third party what is rest end point URL and configure it in PI
  • And also ask the sample payload which they accept
  • Then compare the payload after the mapping in PI verses provided payload.

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Guess Praveen gave the clues.

You can test the payload and URL once you receive,using SOAP UI or Postman.

Former Member
0 Kudos

Dear Praveen,

How to build the data type ? You know that the WebService for the  third-party system based on the data format json. How to map the structure. Because the data format is not available when importing the file. I cannot map it via message mapping.

Many thanks & best regards,

Hubery

former_member186851
Active Contributor
0 Kudos

Hello Hubrey,

Get the endpoint for WS team and try using the Payload which you have in the message monitoring the once which is JSON format.

former_member182412
Active Contributor
0 Kudos

Hi Hubery,

  • You can create normal data type based on the expected receiver structure.
  • Up to REST adapter the format is XML only
  • So you can do normal message mapping
  • When it reach to REST adapter it will convert from XML to JSON format.

Regards,

Praveen.

Former Member
0 Kudos

Yes, Praveen,You are right. I have a try today. It is OK.

Thank you for your always following.

Many thanks & best regards,

Hubery

former_member182412
Active Contributor
0 Kudos

Hi Hubery,

Why the above reply was helpful? He said same thing what i said before, by making this as helpful you are encouraging people to give duplicate answers. Can you please remove it.

Regards,

Praveen.

Former Member
0 Kudos

Dear Praveen,

Please do not misunderstanding. I am aware of it. I have already removed it.

Thank you for your reminder.

Best regards,

Hubery

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Hello Hubrey,

Select the request data format as XML.

Former Member
0 Kudos

Dear Raghuraman,

This is asynchronous interface. The receiver system need the data format of json. How should I change it. Please point out .

Many thanks & best regards,

Hubery

former_member186851
Active Contributor
0 Kudos

Hello Hubrey,

As praveen suggested could be the problem with endpoint.Check the points mentioned by him.

And for converting XML to JSON the below SAP document describes the various points

Advanced Adapter Engine - SAP Library