Skip to Content
avatar image
Former Member

Unable to get response message format as JSON in Proxy to REST sync scenarioa

HI Friends,

I am using SAP PO 7.4 SP12. I am working on synchronous(Proxy->PO->REST) scenario using SAP REST Adapter. But, I am not getting the response from rest client.

When i try to send request it was successfully reached to REST Client and the response also generated at their end as below format but we are unable to capture that response to PO.

Request :

<?xml version="1.0" encoding="UTF-8"?> <ns0:MT_SAP_Project_Sender xmlns:ns0="urn::XXXX:SAPtoThirdParty_POC">

<Project> <PSPID>R000009000000000</PSPID>

<POST1>Project Definition R.000</POST1>

<VERNR>90000002</VERNR>

<VERNA>90000003</VERNA>

</Project>

</ns0:MT_SAP_Project_Sender>

Response:

{"Project":{"ID":"R000009000000000","Text":"Test POC success"}}

We received below error in PO.

INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code> <SAP:P1>Configuration error on Adapter-Framework(AFW)-Server</SAP:P1> <SAP:P2>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_Project_ThirdParty_SAP_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:MT_SAP_Project_resp/Project. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD</SAP:P2>

Please find the Empty payload screen and configuration snap (attached ) that I have done to get response as JSON.

Need your valuable comments.

Thanks in advance.

Regards,

Ravi Aalla

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 23 at 05:42 PM

    Hi Avii,

    I have the same error. How did you fix it? Thanks for the help.

    Add comment
    10|10000 characters needed characters exceeded