cancel
Showing results for 
Search instead for 
Did you mean: 

PI Receiver Rest Service Returns Status Code 500

Former Member
0 Kudos

Hello Experts,

I have a PI Scenario as follows:

ECC calls-> PI Proxy -> Rest Service (setup in Communication Channel as Receiver)

When I run the rest service outside of PI with content-type set as “application/x-www-form-urlencoded” it works fine. But after configuring it in PI and testing I am getting status code 500 indicating failure to call service. The call in the logs seems fine. I do notice the Message Headers don’t reflect my content-type change but that might be because it is setting it dynamically before making the post?

Does anyone know the solution or missing key in this setup?

Thank you!

Below are screenshots of the scenario:

The REST Service is called by using POST, given 4 parameters

The content-type is application/x-www-form-urlencoded.

Below is some details from the adapter engine that show message headers.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member194786
Active Contributor
0 Kudos

Hi Emilio,

I would suggest you to host a service on SOAPUI on your local system and route SAP PI messages to that. That way you can compare both HTTP headers and body that you are sending to the external application.

Also, for HTTP header manipulation, you can try setting the content-Type from the rest channel itself,instead of using dynamic configuration. Here is how I have done that:

Regards,

Sanjeev

mate_moricz
Advisor
Advisor
0 Kudos

Hi Emilio,

Can you share the exact error message? There were several fixes released for the REST adapter so the exact error message would provide a great starting point. Also if you perform an XPI Inspector trace you should be able to see at what step of the message processing is failing exactly. Can you share that too?

Regards,
Mate

Former Member
0 Kudos

Here is the error log from xpi inspector:

2016-06-20 10:32:40.626RESTOUT_HTTP_ERRORInternal Server Error
2016-06-20 10:32:40.695MP: exception caught with cause {0}com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP POST call to http://abc.com:8000/WebService/rest/update_operation/Date?DocNo=212&CompanyCode=XYZ15&Year=2016&info... not successful. Internal Server Error
2016-06-20 10:32:40.741AFW_ERRORHTTP POST call to http://abc.com:8000/WebService/rest/update_operation/Date?DocNo=212&CompanyCode=XYZ15&Year=2016&info... not successful. Internal Server Error
2016-06-20 10:32:40.782REQUEST_DELIVER_ERROR_FAILEDREST_http://sap.com/xi/XI/System; com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP POST call to http://abc.com:8000/WebService/rest/update_operation/Date?DocNo=212&CompanyCode=XYZ15&Year=2016&info... not successful. Internal Server Error
2016-06-20 10:32:40.836STATUS_SET_SUCCESSFAIL
mate_moricz
Advisor
Advisor
0 Kudos

Hi Emilio,

Can you also share the current SP and patch level for the XIAF and MESSAGING component?

Regards,
Mate

Former Member
0 Kudos

SAP_XIAF

  1. sap.com

SAP AG

  1. 1000.7.31.17.8.20160203024807

MESSAGING

  1. sap.com

SAP AG

  1. 1000.7.31.17.13.20160203024731

thanks