How to override HTTP headers in a SOAP Request

Hi All

I have created a consumer in webMethods and the request fails with authentication error. I need to add Authorization to the HTTP header in SOAP request. I am using webMethods 8.0. Is there any way to modify/add Authorization value to a HTTP header in SOAP request.

I have tried to use custom handlers to do the same but it fails with class cast exception.

Thanks in advance

the consumer WSD has parameter of auth, you should put username/password there.

Hi Wang

Thanks for the response. I have tried to sent the Authorization information via auth doc in the web service connector and even then it fails.

I believe HTTP header authorization information is key value pair and not user name and password combination and i think it does not work because of the same.


what error are you getting?
The client code in WM will populate the username/password for you if you put them under auth.

I Hope, the default authentication method of sending the credentials from webservice consumer is Basic authentication.

So, If you are using different style of authentication like WSSE etc (Inside a soap Header), then i guess, the webservice consumer won’t be helpful. Instead, you need to use client http call(pub.client:http - i guess) for this.