Ajiht, thanks for the pointers. With this knowledge, it will be easy to augment the axis2 generated stub with the necessary setHeader method.

Anne, the option to move the headers to the body is not feasible for a third party wsdl. There are different headers there. Esp. for the headers dealing with session management, I might consider writing a handler for.

Anne Thomas Manes wrote:

It's more appropriate to manipulate headers using a handler.
If your application needs access to the information in the Header, you should consider moving that information to the Body.

Anne

On 9/27/05, *Ajith Ranabahu* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Gregor,
    Well the stubs do not expose any method to work with the headers.
    But the  Axis2 stubs have direct access to the envelope. So you
    can set the headers directly in the envelpe if you want. Moreover
    the stub base class has some utility methods to set arbitrary
    headers to the envelope.
    So unfortunaltely(?) you'll have to modify the stub if you are in
    need of adding a custom header !


    On 9/27/05, * Gregor Urbanek* < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

        Hi  everyone ,

        in Axis1, working with a wsdl2java generated stub, I could set
        a Soap
        header as follow

        ...
          wsdl2JavaGeneratedStubObject.setHeader( "serviceNameLocalPart",
        "headerName",  headerObject );
        ...

        Afaik, it appears that the Axis2 generated Stubs does not have
        the
        appropriate setHeader method. Is there a workaround for this?


        Cheers
        Gregor




-- Ajith Ranabahu

Reply via email to