Skip to Content
author's profile photo Former Member
Former Member

PutPayloadValueBean - Fault messages

Hi there,

Below is the requirement and I want to avoid ccBPM and hence using GetPayloadValueBean, RemovePayloadValueBean and PutPayloadValueBean.

IDoc comes out from ECC, SAP PI receives it and makes a sync SOAP call to target system. SAP PI recieves the response (could be a success or fault). SAP PI must send this data to ECC in the form of IDoc. While sending the response IDoc, PI must include request IDoc number in the response.

I have two response mappings. One for success, and the other for fault (both the structures are different).

All fine until GetPayloadValueBean and RemovePayloadValueBean are executed. Problem with PutPayloadValueBean. It is working only for one of the scenarios, either success or fault. Not both. If i use put:/<path> twice as shown below, I am getting MP: exception caught with cause java.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Node.appendChild(org.w3c.dom.Node) of a null object loaded from local variable 'template_parent'

If I use this for just success mapping or just the fault, it works.

All the namespaces used here are declared properly in xmlns.

Please suggest.

Regards,

Aditya Vempati

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Aug 11, 2016 at 12:13 PM

    Hi Aditya!

    As far as you have two messages with different structure you get this error because only one XPath exists for each message type.

    I've never tried this but if you have the same field name in both of your messages you can try with XPath like this: "//YourFieldName" or "//YourFieldName(1)".

    Another option is to put your value to DC in request mapping and get it back from DC in response mapping.

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 27, 2019 at 03:38 PM

    HI,

    I am also stuck with the same error . But unable to find fix it.

    Error:java.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Node.appendChild(org.w3c.dom.Node) of a null object loaded from local variable 'template_parent'

    Please help me on this.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.