on 05-11-2015 11:12 AM
Hi Experts
I am currently working on an SOAP to REST synchronous interface and am using SAP rest adapter at receiver side.
the requirement is when we perform the POST operation ..record must be suppose to created and send back the unique number to PI server.
but interface is working till the creating the record at target side and not sending back unique number.
below is the error log in PI:
11.05.2015 08:24:08.424 | message.Information | Preparing message content |
11.05.2015 08:24:08.452 | message.Information | Calling server: {1} |
11.05.2015 08:24:08.821 | message.Information | Server returned code: 201 |
11.05.2015 08:24:08.822 | message.Information | REST call finished |
11.05.2015 08:24:08.822 | message.Information | Processing result |
11.05.2015 08:24:08.830 | message.Error | Transmitting the message using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Logging message failed, due to Failed to log msg 181bd100-f7b7-11e4-937c-0000185d0526(OUTBOUND). Reason: java.lang.NullPointerException |
11.05.2015 08:24:08.838 | message.Error | Message status set to FAIL |
11.05.2015 08:24:08.839 | message.Error | Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Logging message failed, due to Failed to log msg 181bd100-f7b7-11e4-937c-0000185d0526(OUTBOUND). Reason: java.lang.NullPointerException |
Note: As we know since this is synchronous, two message logs must be created one is request and second one for response ..but here that is not happening .its creating only one log which is for the request message and nothing is coming for response.
Please can you help where its going wrong.
Thanks and Regards,
Maheswarareddy
I have this issue too. I am also using a REST receiver adapter and have created the message structure based on the XML response I get to the HTTP POST.
The incorrect message type in response looks to be the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Might be a stupid question but have you made sure that all your design and config is correct? Is the answer is yes.
Would suggest try and running it from SOAPUI and see what response you get back?
You might be getting a blank response (It will fail) because you are expecting some sort of response.
Test with SOAPUI and ask the guys on the Restful side to make sure that they are sending a response back and if they have programmed it to be Sync. Just make sure of all of these and then we can maybe go and look on the SAP PI NWA Logs to see what is happening.
Regards,
Jannus Botha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Botha,
Thanks for reply..
i have used "Google Postman " tool for test the message ..here successfully working post method and sends back blank message and i could see one unique number(ID) under http header , which PI need to send back to Sender system.
can u please help me,since "ID" coming back using tool(postman),why the same not coming when we run the interface in PI
also why two logs not created in PI one is for Request and and another for response.
P.S: Interface configuration made perfectly fine.
Thanks & Regards,
Maheswarareddy
Hi,
Ok that is strange. On what PI system are on on? Just make sure that all the data en config and design is correct. Also make sure that the network is allowing traffic in and out on the server.
It says that is failing to log the message because of Java Null pointer exception. Run a message again and the the error will be generate on the developer logs in NWA. Please send me those logs.
Regards,
Jannus Botha
Hi,
That error doesnt look good.It seems the payload that gets sent back cannot because convert in the adapter. That can be because that you might have the incorrect structure in your response message. Just double check that you do have the correct message.
It says that it cannot generate the header mapping. Have you switch on your logging to log everything?
Regards,
Jannus Botha
Hi Jannus Botha,
the fact is even i am not sure what is the structure for response messages and created one field for response structure ,i hope this is not an problem ,i am expecting mapping exception if that structure is wrong..once i get mapping exception i can see what data is coming from receiver system.. so that i could be created structure as per that response..
Coming to logging ...can you please tell me where exactly i should switch on log for everything?
Thanks & Regards,
Maheswarareddy
Hi Praveen,
I tried as you suggested configuration..but i could not see response message Log..
please find the below msg log screenshot.
once i click on Open message..below is the screenshot..
i have checked all logs ...those all are related to request message only, not Response ..
I hope you got what i am expecting
if you see my first post which i pasted error logs...there you can see below line
11.05.2015 08:24:08.822 | message.Information | REST call finished |
this means request msg is processing correctly(also checked in receiver server) and along with having 2 more lines which i am thinking related to response one..
my confusion is why those 2 line added in request log instead create two msg logs for request and response.
Thanks & Regards,
Maheswarareddy
Hi Jannus Botha,
Thank you..i will defiantly get back once i get response structure..
Also i am 100% sure that approach which i tried wrong structure for response is not an issue,that must be fail with mapping exception..
here i am thinking why that response log does not creating..
Thanks & Regards,
Maheswarareddy
Hi Maheswarareddy,
What is your PI version and SP level? Are you logging raw JSON according to below SAP Note.
http://service.sap.com/sap/support/notes/2079486
May be it is failing to log response raw JSON step?
Regards,
Praveen.
Hello,
I am having the exact same issue. I have a synchronous call to a REST receiver which responds with an empty body payload. If I am setting the response format to JSON, PI fails while trying to do the JSON conversion. If I set the response format to "XML", PI fails with the error "Transmitting the message using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Logging message failed, due to Failed to log msg ea53b2b5-8890-11e5-9e88-00000084d992(OUTBOUND). Reason: java.lang.NullPointerException".
I don't really expect anything (not even header information) back from the recipient, but I cannot set the channel to EO and asynchronous service interfaces because in this case I don't get errors back if the receiver cannot process the request message.
Is there any work around how we can receive empty payload message so that PI can consume it? I would just want to wrap an XML root element around which doesnt contain any elements using the REST adapter.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.