cancel
Showing results for 
Search instead for 
Did you mean: 

PutPayloadValueBean - Fault messages

adityavempati
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

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.

adityavempati
Participant
0 Kudos

Thank you Evgeniy.


I'll try this and let you know if it worked.

Regards,

Aditya

adityavempati
Participant
0 Kudos

XPath like this: "//YourFieldName" or "//YourFieldName(1)". - Didnt' work.


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


Thank you.



Answers (1)

Answers (1)

former_member262051
Participant
0 Kudos

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.