If you have generated client proxy properly it will have header elements as a 
method input parameter and then you can have it.

for implicit header wsdl to java does not generate it. To resolve this you have 
to enable -exsh switch.
(true/false)  Enables or disables processing of implicit SOAP headers (i.e. 
SOAP headers defined in the wsdl:binding but not wsdl:portType section.) 
Default is false.

HTH
Manoj

-----Original Message-----
From: Anupama Vaid [mailto:[email protected]]
Sent: Wednesday, April 29, 2009 4:08 PM
To: [email protected]
Subject: Generating SecurityHeader from client

I am trying to get a security header generated in my SOAP request as
below but without any luck



  <soap:Header>

    <SecureHeader xmlns="http://tempuri.org/service";>

      <UserName>username</UserName>

      <Password>password</Password>

    </SecureHeader>

  </soap:Header>



I used wsdl2java -client to generate client code. I see that the
generated code has ObjectFactory.java with a method
'createSecureHeader()' and also a SecureHeader.java, but can't figure
out how to use it. Any help?



Thanks,

Anu

Reply via email to