cancel
Showing results for 
Search instead for 
Did you mean: 

Http Header for External Webservice

0 Kudos

We are trying to login to external webserver from PI. The web service requires authentication information set in HTTP header(not SOAP header).

The Authentication details are as follows, and it exceeds a length of 200 chars (around 240 )

X-ABC-Authentication: <ABCCredentials><Username>xxx</Username><Password>yyy</Password><IntegratorKey>zzz</IntegratorKey></ABCCredentials>

Could anyone please suggest on how to achieve this.

We have tried 2 options :

  1. Receiver SOAP Axis using DynConfig for http header :  As the lenght of the header is > 200, the Dynamic Config parameter does not get reflected.
  2. Rcv Plain HTTP adapter : Gives an ICM_Connection 400 error.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I was able to achieve it using module parameter in SOAP Axis adapter. Hence closing the thread.

iaki_vila
Active Contributor
0 Kudos

Hi Sneha,

I'm glad to hear you solve your issue. Could you do a blog or to feedback this thread with the solution?. This scenario is usual and you can help a lot of people.

Regards.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sneha,

Can you please share which parameter and how you have used it to get it working ?

Hope to hear from you soon.

Many Thanks,

Mudassir

0 Kudos

We may not be able to go for Java Mapping.

Is there a way, we can achieve this using SOAP /Axis adapter ?

former_member184720
Active Contributor
0 Kudos

You don't need to go for a java mapping. Simply write a UDF to set these dynamic headers.

iaki_vila
Active Contributor
0 Kudos

Hi Sneha,

Is the tag <ABCCredentials> mandatory?

In http receiver you can set several tags but i think you can't set a hierarchical structure.

Like the last resource you can develop module adapter or at mapping level to do the request via java mapping and to do a dummy receiver.

To do the java mapping this link could be helpful Modifying HTTP headers using Java | W.T.F.

Regards.

former_member184720
Active Contributor
0 Kudos

What is your PI version?

0 Kudos

PI 7.3 Dual stack.

And all the tags mentioned in the AuthDetails are mandatory, due to which the lenght exceeds 200 chars

former_member184720
Active Contributor
0 Kudos

May be you can try using http_aae adapter -> "set adapter specific message attributes" -> HTTP Header Fields ?

If you want to save adapter-specific attributes in the message header of the HTTP message, choose Set Adapter-Specific Message Attributes .

  • If you want to copy the XI dynamic header values into HTTP headers, choose HTTP Header Fields and enter the HTTP header names in the corresponding fields namely HTTP Header Fields (Field 1 (HeaderFieldOne),....,Field 6 (HeaderFieldSix))

Reference :


Configuring the Java HTTP Adapter on the Receiver Channel - Advanced Adapter Engine - SAP Library