Skip to Content

Copy value from Request message to Response message_JDBC to SOAP synchronous

Hi,

The scenario is JDBC(Request & ResponseBeans) to SOAP synchronous scenario.

Need to copy and send the "RequestNumber" - "00001" from request message to response message inorder to store in database table for further database operations.

The "RequestNumber" is not mapped to target structure(SOAP request) , Only PONumber is mapped ..but we need to copy/capture in the response message.

we wont get the PONumber - 4714758 in the response message. So we need to get the RequestNumber from request message and to be sent to Database system.

Request Message:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_POStatus_Request xmlns:ns0="http://Test">

<Records>

<RequestNumber>0001</RequestNumber>

<PONumber>4714758</PONumber>

</Records>

</ns0:MT_POStatus_Request>

Response Message to DB:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_POStatus_Response xmlns:ns0="http://Test">

<DB_Table>

<action>Insert</action>

<Access>

<RequestNumber>0001</RequestNumber>

<POStatusNumber>Processed</POStatus>

</Access>

</ns0:MT_PONumber_S>

Thanks,

Ravi

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jul 15, 2020 at 10:19 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 16, 2020 at 04:13 AM

    Hi,

    I tried with below Dynamic Configuration UDF in Request mapping & Response mapping but not getting the value in the response message.

    UDF in request mapping:

    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keySource = DynamicConfigurationKey .create(" http://sap.com/xi/XI/System/SOAP"," SessionKey");
    if (conf != null) {
    conf.put(keySource,var1);
    }return var1;

    UDF in response mapping:

    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keySource = DynamicConfigurationKey .create("http://sap.com/xi/XI/System/SOAP","SessionKey");
    return conf.get(keySource);

    Am i missing any steps or code to get the value in the response message.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 16, 2020 at 06:37 AM
    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.