Hi,

There are two ways you can do the authentication. You can use HTTP headers
to send user name/passWord or you can send it in a SOAP header.

You can use whatever you prefer.

1)  When it comes to HTTP you can set these HTTP-headers with a comand on
client side as
  call.setUserName(user)
  call.setPassword(pass)

Then the authentication can be done at TomCat level( not sure how to do
this) or using handlers. If I have to do it I will write a handler and put
it into the request flow.

In this handler I can get user name and password from the messageContext
that is passed into the
    invoke(MessageContext msg) method of the handler.

2) If you chose to authentication using soap headers you can add a soap
header as call.addHeader  and authenticate using handlers. In thiscase you
would have to get headers from the messageContext and read the header
yourself

Cheers,
Dimuthu.


----- Original Message -----
From: Wermus Fernando
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 10:12 PM
Subject: I need to identify the client


I was thinking in idenfying my client with two methods


String login(String user, String pass)
bool logOut(String id)

And I need the id in the whole messages. I know that this "session id"
should be in the soap:header.
I 've read this in msdn but, I don't know how to do this.

I wanna know what methods you implement to solve this


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoap/html
/understandsoap.asp

The Header element, like the Body element, is a generic container for
control information. It may contain any number of elements from any
namespace (other than the SOAP namespace). Elements placed in the Header
element are referred to as header blocks. As with other protocols, header
blocks should contain information that influences payload processing. Hence,
this is the right place to put something like a credentials element that
helps control access to the operation:
<soap:Envelope
 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
 <soap:Header>
  <!-- security credentials -->
  <s:credentials xmlns:s="urn:examples-org:security">
   <username>dave</username>
   <password>evad</password>
  </s:credentials>
 </soap:Header>




Reply via email to