2

I am trying to use a third party web service which is exposed through a WSDL. I am generating stubs using wsdl2java (axis) tool.

Now when I am using the same service (the same wsdl) through a SOAP client (SOUP UI Pro) it asks for authentication header info for all APIs (aprt from the normal args).

But in proxy classes (stubs) I am not seeing any API asking for this authentication header info argument.

I am not sure how to send the authentication header info with a SOAP request.

FYI: WSDL2Java is generating the Authentication header info class also, but none of the API is asking for this object argument.

Josh
  • 10,961
  • 11
  • 65
  • 108
shantanu
  • 1,748
  • 3
  • 19
  • 34
  • Looks like I have written in complex language. Let's make it simple. **All I need is to send Authentication info(user-name, password) while calling third party web-service API(which is exposed through wsdl).** Because without this I won't be able to access that API. – shantanu Nov 21 '11 at 13:40

1 Answers1

4

Finally I got the answer.

Actually there is two types of header (defined in WSDL).

  1. Implicit.
  2. Explicit.

In case of explicit header generated stubs takes header as an argument but in case of implicit header we need to bind the header at the client side.

Explained nicely here (worked for me.)

Piotr Nowicki
  • 17,914
  • 8
  • 63
  • 82
shantanu
  • 1,748
  • 3
  • 19
  • 34