cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture SOAP Header Response message in PI

Former Member
0 Kudos

Hi All,

scenario is Proxy to SOAP (axis framework) synchronous.

We are on PI 7.3 JAVA only version.

we had requirement to capture a field value in response message, the message is coming in soap header .

we need to capture this and pass it on to ecc.

we are using option keep xi headers in CC.

can some please share inputs on how to achieve this.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Jan,

we had requirement to capture a field value in response message, the message is coming in soap header .

we need to capture this and pass it on to ecc.

we are using option keep xi headers in CC.

can some please share inputs on how to achieve this.

At first I thought if Axis can run in no soap mode but then searched SAP Note 1039369 - FAQ XI Axis Adapter question 43. Can I extract element and attribute values from some SOAP headers? There is an example there.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks for the response....

I checked the FAQ and its goo d to know that we can achive this using com.sap.aii.axis.soap.HeaderExtractionHandler

My queries regarding practically implementing this is:

we need to pass the value in a perticular field in SOAP Response to a filed in reciever.

We are not using any dynamic config in response mapping in syncronous call.

Now to achive this do we need to add some udf/dynamic config in response mapping?

if we need to add dynamic coding in response what parameters do i need to adjust within dynamic config code.?

any inputs in this areas are appreciated.

Thanks.

anupam_ghosh2
Active Contributor
0 Kudos

Hi  Jan,

               Could you post structure of the response and the element you want to extract.

Regards

Anupam

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Jan,

What happens if you just use the native SOAP Adapter (not Axis) and then run in no-soap mode? If the response is there, you can just extract it via java/xslt mapping.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

I had to use Axis to meet security mechanisms...i am trying to achive this by adding addional module config ExtractHandler as suggest by you in FAQ.

The point where I am struck is in response mapping can I use just Dynamic Config UDF and map it to the filed in response structure?? since it is coming in response.??

Thanks in advance.

Former Member
0 Kudos

Hi Jan,

To achieve this you have create a map in dynamic configuration. you can set the header values from response in the map and read it using UDF.

To achieve this you need to follow below steps.

In module configuration create a module key dcres.

module configuration:-

dcres     handler.type      java:com.sap.aii.axis.xi.XI30DynamicConfigurationHandler

dcres     key.1               read urn:csda-gov-au:dynamic_variables values{}

dcres     type.1              java.lang.map

dcres     value.1             hevar

Now you have to read the value from header and place it in dynamic variable.

In module configuration create a module key heext.

heext     handler.type          java:com.sap.aii.axis.soap.HeaderExtractionHandler

heext     name.1                 hevar{var1}

heext     namespaces          ns1 http://namespace/messages

heext     path.1                   ns1:record/ns1:sumaryResponse/ns1:field1

you have to provide namespace and path of the field in module configuration.

Now you can use below udf to read from dynamic configuration.

DynamicConfiguration conf =(DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

String value = ResultList.SUPPRESS;

if (conf != null) {

  DynamicConfigurationKey key =DynamicConfigurationKey.create(ns, "values{var1}");

  value = ((String)conf.get(key));

  }

return(value);

Regards,

Ranjeet.

Answers (1)

Answers (1)

former_member201264
Active Contributor
0 Kudos

Hi Jan,

Here you did not mentioned which value you want pass to ECC from SOAP Response header.

Any way check this and use whatever the field you need to capture from this available parameters.

Define Adapter-Specific Message Properties 

  1.   Select the Advanced tab page.
  2.   To process adapter-specific attributes in the message header of the XI message, select Use Adapter-Specific Message Properties and Variable Transport Binding

The following attributes are evaluated in the XI message header:

Server URL (technical name: TServerLocation)

You can set the entire URL.

    •   Authentication key (technical name: TAuthKey)
    •   Proxy URL (technical name: TProxyLocation)
    •   Proxy authentication key (technical name: TProxyAuthKey)
    •   SOAP action (technical name: THeaderSOAPACTION)
  1.   If you want to transfer header fields, select Variable Header

The technical names of the fields are XHeaderName1, XHeaderName2, and XHeaderName3.

The parameters are included in the HTTP request under the names specified here.

The attribute namespace for the adapter is http://sap.com/xi/XI/System/SOAP.

For More Details see this link:  Configuring the Receiver SOAP Adapter

Regards,

Sreeni.