aspose file tools*
The moose likes Web Services and the fly likes How do you define in your code which key/passw to associate with which application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How do you define in your code which key/passw to associate with which application" Watch "How do you define in your code which key/passw to associate with which application" New topic
Author

How do you define in your code which key/passw to associate with which application

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
This is my first client to a secure web service using axis2. Using



To create the appropriate soap envelope. My question is how do you define in your code which key/password to associate with which application? Confused since this is the first time dealing with web services. Thank you for your time.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
SOAP Extensions.

Key and/or password data should be passed as SOAP Headers. This is how you extend SOAP. By creating SOAP headers which are handled by Handlers, either client-side or server-side.

In regards to "code", you write the "code" of the Handler classes and you write the "code" which creates, sends and receives the reply of the SOAP Envelope.

Handlers are configured for web services in the services deployment descriptor. How this is actually accomplished depends upon which SOAP Engine you are using.
[ November 06, 2008: Message edited by: James Clark ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
The standard way to secure a web service is to use WS-Security. While it's possible to use that programmatically through API calls, all SOAP stacks I've seen also allow it to be configured outside of the code in config files. For Axis2, this is implemented by its Rampart module.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do you define in your code which key/passw to associate with which application