Note/SAP XI/PI

Request 값을 Response에서 사용 (java mapping, UDF 사용가능)

sungwonpekr 2013. 5. 22. 11:12

  • Request code
  1.  
  2. TransformationInput in; // input payload
  3.  
  4. String msgID = in.getInputHeader().getMessageId();

    getTrace().addWarning("msgID : " + msgID);

  5.  
  6. // 전달할 데이터 
  7. String data = ""; 
  8.  
  9. // set to dynamic config:
  10. DynamicConfiguration conf = in.getDynamicConfiguration();
  11. DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", msgID);
  12. if (conf != null) {
  13. conf.put(key, data);
  14. }

 

 

  • Response code

  1. TransformationInput in;

     

    String data = "";

     

    String reqMsgID = in.getInputHeader().getRefToMessageId();


    // set to dynamic config:

    DynamicConfiguration conf = in.getDynamicConfiguration();

    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", reqMsgID);

     

    if (conf != null) {

    data = conf.get(key);

    }