File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Not able to access Secured Web service: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Not able to access Secured Web service: " Watch "Not able to access Secured Web service: " New topic

Not able to access Secured Web service:

K Abhijit
Ranch Hand

Joined: Mar 03, 2008
Posts: 88
I have one WSDL( which it starts with https)say " " which if i try to open in IE, asks for the network uid/pwd using typical windows dialog box... i can open the wsdl after entering crdential details. url is just symbolic, being client's production webservice, I am not able to reveal its true url and pwd...

i need to acces the same web service ..

i tried with jax-rpc clinet approach.

i have generated clinet jar-classes (by saving that wsdl locally and using clinet-gen utility).
created client jar and try to invoke through normal JAX-RPC invokation; but it failed to access that webservice..

as it was secured web service; i tried with diff ways to deal with it afetr googling

one first way tried was setting credentials in stub.. ie.

websvc.SearchService_Impl tempService = new websvc.SearchService_Impl();

websvc.Search_Stub stub = (websvc.Search_Stub ) tempService.getSearch();

stub._setProperty(Stub.USERNAME_PROPERTY, "user");
stub._setProperty(Stub.PASSWORD_PROPERTY, "pwd");

but it failed...

second approach i tried was setting crdeentials in call interface

System.setProperty( "javax.xml.rpc.ServiceFactory",

Call call = service.createCall();
call.setProperty(Call.USERNAME_PROPERTY, "user");
call.setProperty(Call.PASSWORD_PROPERTY, "pwd");

but this approach also failed in invokation...

when the same service in invoked from net framework using same credentials, it get properly serviced with good response.

using both above said approach, i could invoke webservices(but no secured one) published on " " site... ie. there is no flaw in the steps i am following for invokations.

i tried to google on this, and found many different articles/ ways / theories which confused me more..somthing like need security certificate etc..

keeping the fact that i don't have strong concepts on secured web services, can anyone suggest me how can i access the webservice ?

also on thing i need to confirm; the authentication window (while opening wsld throgh IE) i get; is it a network authentication or its a webservice authntication ?

can anybody help me in solving this jargon


“The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'.”
lakshmi desai

Joined: Feb 28, 2008
Posts: 16
You need to have a security certificate installed in your jre cacerts and provide the username and password for webservice authentication in your client code. when you try to access the wsdl, it asks for the username and password for webservice authentication.hope this helps.
I agree. Here's the link:
subject: Not able to access Secured Web service:
It's not a secret anymore!