aspose file tools*
The moose likes Web Services and the fly likes authentication required twice with JAX-WS web service client? 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 "authentication required twice with JAX-WS web service client?" Watch "authentication required twice with JAX-WS web service client?" New topic
Author

authentication required twice with JAX-WS web service client?

Jason Tyler
Greenhorn

Joined: Jun 18, 2012
Posts: 1
Hello,
I've just created my first JAX-WS web service client. Previously I used Axis2 in each of my projects.

I'm finding that the JAX-WS client is requiring authentication at 2 different places. I created an Axis2 stub for the same web service and it does not exhibit this behavior.

Here is my code (with necessary redactions):


If the WSDL is allowed to be retrieved anonymously, this code runs fine, with the system only asking for authentication at the second point. If anonymous WSDL access is disabled, I get a 401 Unauthorized error at the first noted point in the code. Again, I only have to provide credentials to the Axis2 stub once, no matter how the WSDL access is configured.

How can I either 1) code it such that credentials are passed only once, or, failing that, 2) provide credentials when the system requests the WSDL?

Thanks for any help.

Jason>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: authentication required twice with JAX-WS web service client?