cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving error in rest adapter

0 Kudos

Hello Friends,

For the rest adapter I'm getting error "Error while receiving by HTTP (error code: Configuration error on Adapter-Framework(AFW)-Server, error text: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP POST call to http://XXXXXX not successful. Bad Request)

It was working fine earlier, now there is no change from SAP side as well as third party system and all of sudden this error is appearing. I tried processing payload in other rest testing tools like SOAPUI,Postman etc. it is working fine there. Only giving error when trying through SAP PI 7.4. Scenario is ECC->PROXY->REST. Tried doing PING , Telnet etc. they're also responding from PI Server. Can you pls help on what other steps I can do to troubleshoot this error ?

I've checked SAP Note 2546089 & 2161895, they're not relevant to our issue.

Thanks.

Former Member

Thank you for visiting SAP Community to get answers to your questions. Since you're new in asking questions here, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question now by selecting Actions, then Edit.

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS By personalizing your profile with a photo of you, you encourage readers to respond.

Best regards,

SAP Community moderator

Accepted Solutions (1)

Accepted Solutions (1)

Hi Pavan G,

Figured out the issue as earlier Custom header had space in the their end i.e. if Header name 1 was "HDR1" then it was going as "HDR1 " and server was accepting it earlier now it is not. so removed extra space from end and it is working.

Thanks

JR

babruvahana
Contributor

Hi jrogers65,

Good to know.

As I said earlier, the error bad request is due to incorrect data/spelling errors/ external system doesn't understand/accept the data coming from the PI system.

Regards,

Pavan G

Answers (2)

Answers (2)

babruvahana
Contributor

Hi jrogers65 ,

Please check the payload going out of PI system and execute the same payload using a REST client postman. Usually, Bad request is due to incorrect data/spelling errors/ external system doesn't understand/accept the data coming from the PI system.

Also, check the content-type and the conversions if any.

Hope, this helps.

Regards,

Pavan G

0 Kudos

Hello Pavan G,

Appreciate your prompt response on this.

As mentioned it was working fine, I checked payload in various other tools such as Postman,SOAPUI it is working fine everywhere.And there is no change in Conversion, Content-type. Content-type is being passed "application/json".

Inaddition, I've 3 servers DEV,QA & PRD. This problem is happening to only DEV system, others are continue to work fine.Just to remove possibility of issue in Payload, I copied working payload from QA and tried it in DEV but error is still the same. Third Party system is not receiving the request itself. so would like to know is there a tool where I can see detailed error where this is getting stuck and due to what reason ?

Note: All the system has same Message mapping,operation mapping,data type, only difference is API Link.

Thanks.

babruvahana
Contributor

Hi Jainvs,

Perform a CPA cache refresh and check it by running XPI inspector once.

Regards,

Pavan G

0 Kudos

Hello Pavan G,

I tried CPA cache refresh as well, results were no different. Will do the XPI inspector trace now.

Thanks

JR

0 Kudos

Hello Pavan G,

XPI Inspector trace file for http client gave this detail "HTTP Error 400. The request has an invalid header name". But it didn't indicate which header name.Also we verified the http header sent via SAP XI and in Postman there isn't any difference, not even in the character case.

Is there any other log where we can find which header name is giving problem ?

Thanks

JR

babruvahana
Contributor
0 Kudos

Hi, Jainvs,

Sorry for responding late.

I am sure if we can find any other log, could you check the http operation in the channel? And the URL, also I'd possible check with API provider that these header from your dev system are acceptable or not.

Else it's better to raise ticket with SAP.

Regards,

Pavan G

Hi Pavan G,

Not a problem, I appreciate your response. Thanks for the suggestion of XPI inspector it really helped us getting advance trace, and now we'll check with the Vendor on this. Since it's coming from Server I doubt SAP Support member will be able to troubleshoot,still we'll try to raise with them incase unable to find from Server team.

Thanks,

JR

Sriram2009
Active Contributor
0 Kudos

Hi Jainvs.

Refer the following SAP notes 2342356 & 2569953

Regards

SS

0 Kudos

Hi SS,

Thanks for your response on this.

I referred both the notes unfortunately couldn't find resolution for issue I'm facing.

Note 2342356 which gives information about condition in ICO, but there isn't any condition introduced, also log is enabled in stage BI which gives error stated in this post.

Note 2569953 which is asking to switch SOAP protocol from SOAP to XI. It is already XI , and it was working fine there isn't any changes done to any of the configuration and same configuration,message mapping , data type are used in QA, PRD and they're also working fine.

Thanks.

JR