cancel
Showing results for 
Search instead for 
Did you mean: 

Using Soap Header info in a java mmaping

0 Kudos

HI Expert.

I'm developing a synchronous interface in SAP PI 7.1 ir order to consume a web serice via SOAP.

That web service is sending back to PI a xml that contain some encrypted tags.

Them, to decrypt the xml I did a java mapping. This java mapping needs to use some info allowed in HEADER part in the xml SOAPENV.

I tested the java mapping with eclipse and one xml example and worked fine, so I generated de .jar file and import in PI.

The problem is that in PI the .jar doesn't work!!!!!!

I'm thinking that only the BODY part is arriving to the java mapping and them, that doesn't work because nedds to use some HEADER info.

Is it true??? I mean, when I selected in Operation Mapping my .jar file (like java class), only the BODY part of the whole message (SOAP ENV) is passing thougth the java mapping???

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi again.

Thanks Udo and Rajesh for your answers.

The problem is that if "do not use SOAP envelope" is on, the service doesn't work because Security parameters are available too.

So, I don't know what to do!!! :-(((

I need to use the java mapping to decrypt the message and use the header info into that.

Thanks a lot.

udo_martens
Active Contributor
0 Kudos

Hi,

if you switch on "Do not use SOAP envelope" the envelope will not appear in the request. That's all what is gonna be changed. No other parameters are concerned. Therefore you need to create the envelope, may be including some parameters, in the mapping. Most easy is that with a xsl mapping in addtion to your existing mapping. Just build the envelope manually and put inside the xsl:copy-of expression to include the xml payload.

Regards,

Udo

Former Member
0 Kudos

I am not pretty sure ..if there is no value added to the header request and response to the Webservice...

then check the option of enabling dont use soap envelope at the SOAP Adapter level...

HTH

Rajesh

udo_martens
Active Contributor
0 Kudos

Hi,

Cant you switch on the box "Do not use SOAP envelope"?

You would need to create the SOAP envelope in the request mapping, but you would receive the envelope in the response mapping - as you need it.

Regards,

Udo