cancel
Showing results for 
Search instead for 
Did you mean: 

Header values needs to send

Former Member
0 Kudos

Hi All,

I have scenario (IDOC to SOAP) I am sending data and I am getting successful message in PI but from client side getting error below mentioned.

HTTP/1.0" 500 225 "-" "SAP-Messaging-com.sap.aii.af.sdk.xi/1.0505"

But through SOAP UI we can send the data successfully if we add header info below mentioned

but question is where we can give these Header and value details in SAP side.

I have mentioned SOAP adopter like below.

Cheers

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Charan,


But through SOAP UI we can send the data successfully if we add header info below mentioned

This is not a part of the SOAP Header but rather HTTP Header. You can add the subdomain as a part of the HTTP Header by checking Variable header in the ASMA part of the channel. You then need to enter it in XIHeaderName1 (Technical Name: XHeaderName1), something like this

The value of subdomain which is distributor, can only be set by using dynamic configuration.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for your reply.

Can you explain how we can add distributor value in dynamic configuration.

Can you send if you have any.

cheers

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Charan,

You use dynamic configuration in a UDF to achieve your requirement. A sample code might be:


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

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

conf.put(key,"distributor");

Regards,

Mark

Former Member
0 Kudos

HI Mark,

Thanks for your reply.

It's not working using this.

Can we send HTTP header request with SOAP Adopter?

Cheers

iaki_vila
Active Contributor
0 Kudos

Hi Charan,


Can we send HTTP header request with SOAP Adopter?

AFAIK you can't change HTTP header from SOAP adapter, but you can change it with dynamic configuration + http adapter, check William Li's blog 

Regards.

former_member184720
Active Contributor
0 Kudos

>>>>but question is where we can give these Header and value details in SAP side.


If you would like to add a custom soap header in SAP PI then all options are discussed here -


"AddSOAPHeaderBean" module

0 Kudos

Hi Charan,

Please check if the additional details that you need to provide is part of SOAP or Http header.

1. If it is SOAP header, then you can achieve it using  "AddSOAPHeaderBean" module in SOAP adapter.

2. Else if it is HTTP header, then you can achieve it using SOAP axis adapter.

Former Member
0 Kudos

Hi Hareesh,

Tried with given option but getting error below mentioned.

SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error

Cheers