Skip to Content
0

Insert value from Request message to Response message using GetPayloadValueBean

Aug 31, 2017 at 02:38 PM

220

avatar image

Hi Experts,

I have configured the module in Receiver soap channel. while i’m executing it's throwing error like "GetPayloadValueBean: Value cannot be null:" not able to find the exact functionality of the module “GetPayloadValueBean and PutPayload value bean”.

My scenario is like (file-soap-file) using Sync and Async bridge its works fine. In same scenario i want to use "GetPayloadValueBean".

Soap Receiver Channel:

In parameters value i tried with test double quotes also "test"

Error log:

I have used the below blog and created a scenario in 7.5 single stack

https://blogs.sap.com/2013/03/20/insert-value-from-request-message-to-response-using-getpayloadvaluebean-and-putpayloadvaluebean/

Please help me if there is any configuration changes.

Thanks and Regards,

Md.Thouheed

1.png (24.7 kB)
2.png (53.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

avatar image
Former Member Aug 31, 2017 at 04:39 PM
-1

Please follow what Raghuraman and Manoj suggested.

Additionally, you need to mention requestresponsebean and responseonewaybean in sender CC not in receiver CC.

Thanks and Regards,

Apu

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Not Necessarily they can be placed in reciever too.

1
Raghuraman S Aug 31, 2017 at 02:49 PM
0

Check if the XML is having value and also try removing parameter value for remove parameter.

Please share the sample XML if possible.

Show 7 Share
10 |10000 characters needed characters left characters exceeded

Hi Raghuraman,

Sample XML payload:

<?xml version="1.0" encoding="UTF-8"?> <ns0:mt_req xmlns:ns0="http://file2soapsync"> <Currency_ip> <Req_No>1</Req_No> <FromCurrency>INR</FromCurrency> <ToCurrency>EUR</ToCurrency> </Currency_ip> </ns0:mt_req>

0
Mohammad Thouheed

Mohammad,

The xmlns parameter value is wrong which does not match with your xml you should have it as :

Parameter Name : xmlns

Parameter Value : xmlns:ns0="http://file2soapsync";

Br,

Manoj

0

Hi Manoj,

Thanks for replying, but still its throwing error like MP: exception caught with cause com.sap.aii.af.lib.mp.module.ModuleException: GetPayloadValueBean: Value cannot be null: /p1:mt_req/Currency_ip/Req_No

I'm not getting any idea in parameter value which value i can pass there,now i'm passing "test" is it correct?

Thanks and Regards,

Md.Thouheed

0
Mohammad Thouheed

Can you please give the exact xml after your mapping because in the earlier reply i see you have ns0 as prefix and now i see p1.

0

What i shared earlier sample XML Payload is exact only, now i'm taken Xpath in receiver determination.

After Mapping Sample XML Payload:

http://www.webserviceX.NET/"> 1 INR EUR

0

It worked ?Share the XML after mapping.

0

I'm not sure about PI processing behavour, but it seems to me that namespace prefix in XPath just should match the prefix in xmlns definition.

But Manoj is right. Try to use the same prefix as used in your actual XML payload.

Regards, Evgeniy.

0
Manoj K Sep 01, 2017 at 09:05 AM
0

I just tried with Below XMl and it works fine for me , so i am suspecting either you are providing the wrong xml or the node is not there in the XML.

And also try to use a different module key for each module in your case , you are using "Payload" for all three module so try to use a unique module key for each one of them

When i delete the node in XML

Module Config:

XML which i tested:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_req xmlns:ns0="http://file2soapsync">
<Currency_ip>
<Req_No>1</Req_No>
<FromCurrency>INR</FromCurrency>
<ToCurrency>EUR</ToCurrency>
</Currency_ip>
</ns0:mt_req>

get.png (13.1 kB)
get1.png (16.0 kB)
module.png (10.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Manoj K Aug 31, 2017 at 04:15 PM
0

Hi Mohammad,

Check if you have any value in the XML for that particular field ?

Br,

Manoj

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi Manoj,

My actually scenario is like jdbc-soap-jdbc using sync and Async bridge, i created two ICO's :

1. ICO: JDBC(Async) to soap(Sync) here soap receiver channel we using this all bean's.

2. ICO: Soap(Asyn) to JDBC(Asyn)

Because there is no primary key to update the record to database so we planning to use this as a link between request and response. Not necessary for sending this to soap(webservice) again once coming back to response and add req_no field and send to receiver jdbc.

Is it work to use “GetPayloadValueBean and PutPayload value bean”.

Thanks and Regards,

Md.Thouheed

0
Mohammad Thouheed

Why not go with Dynamic Configuration Bean ?

I recently did a similar interface :

IDOC--->SOAP(RR Beans with Dynamic ConfigBean)

SOAP-->IDOC

0

Thanks Manoj,

I will try, please share any reffernce blog are link its very help full.

0
Mohammad Thouheed

Refer this blog

0
avatar image
Former Member Feb 21 at 04:44 PM
0

Hi Mohmmad,

you can use get://Req_No instead of get:/ns0:mt_req/Currency_ip/Req_No, it should work.

I have problem with PutPayloadValueBean, did you complete the scenario?

br

Domenico

Share
10 |10000 characters needed characters left characters exceeded