axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rave, Mark" <>
Subject RE: Arbitrary Authenitcation Types (based on SOAP Headers)
Date Fri, 10 Feb 2006 19:25:50 GMT
I don't know if this is what you are asking but it can't hurt to offer it.  I used WSDL2Java
to generate the stubs and I also had to have authentication information in the SOAP header,
this is how I did it but it might not be the best way:

  SomethingService service = new SomethingServiceLocator();

  Something svc = service.getSomethingSOAPPort();

  SomethingSoapBindingStub stub = (SomethingSoapBindingStub)svc;
  SOAPHeaderElement she = new SOAPHeaderElement("namespace", "AuthInfo");
  SOAPElement ut = she.addChildElement("UserToken");
  SOAPElement un = ut.addChildElement("UserName");
  SOAPElement pw = ut.addChildElement("Password");

When I make the call something like this is generated:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC=""
xmlns:xsi="" xmlns:xsd=""

Hope this helps.

-----Original Message-----
From: []On Behalf Of Scott McCoy
Sent: Friday, February 10, 2006 2:06 PM
Subject: Re: Arbitrary Authenitcation Types (based on SOAP Headers)

I didn't get a response to this, so I thought I'd re-post it.

I just want a handler, before my handler, to get some values from the header and have the
ability to stop the request.

How does that happen?

On 2/8/06, Scott McCoy <> wrote:
Hello All,
    I have a specification that demands I use a SOAP Header element for credential verification,
and from a technical perspective it needs to be highly reusable, with a technical requirement
that it preceeds and stops processing of the SOAP Body.  I've found what seems to be just
the ticket, which is simply adding a component via the < requestFlow/> element in WSDL
or WSDD...But the problem I'm having is that I'm having difficulty finding documentation on
doing this. 

    Essentially, I have the following (mock) request envelope:

<Envelope xmlns="?soap">
        <authenticate username="..." password="..."/> 
            <order accountid=".." cardid=".." amount=".."/>
            <order accountid=".." cardid=".." amount=".."/> 

    Nevermind the details of the SOAP Body, handlers for this are easily generatable by WSDL2Java,
but how do I deal with the SOAP Header in a respectible and logical fasion (Axis 1.3) ?

    Scott S. McCoy


This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information. If you have received it in error, please notify the sender
immediately and delete the original. Any other use of the email by you is prohibited.

Espanol - Deutsch - Nederlands - Francais - Italiano - Norsk - Svenska:

View raw message