Hi all,

I'm new to Axis and I am trying to create a SOAP client to communicate with a vendor. They have supplied me with the WSDL and I ran WSDL2Java against it to create my stubs. There are custom headers, so I specified the '-a' option for WSDL2Java to produce a stub for the custom header as well.

My problem is that I don't know what to do with this custom header. I can create the object and populate it as need be, but how do I tell my code to use that header? The code is very simple - essentially these three lines:

MySoapLocator msl = new MySoapLocator();
MySoap ms = msl.getMySoap(new java.net.URL(URL));
ms.send(message);

I would expect to be able to do something like this:

ms.setHeader(myHeaderObject);

Before I perform the send. I have a feeling I am just thinking about the problem in the wrong way. Is there anybody on the list willing to enlighten me?

Thanks a bunch,
Mike

Reply via email to