my dog learned polymorphism*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Not able to access Secured Web service: " Watch "Not able to access Secured Web service: " New topic
Author

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 "http://abc.com?wsdl " 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.

http://abc.com?wsdl 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",
"weblogic.webservice.core.rpc.ServiceFactoryImpl");

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 "http://www.xmethods.net/ve2/index.po " 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

thnks
Abhijit.


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

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: http://aspose.com/file-tools
 
subject: Not able to access Secured Web service:
 
Similar Threads
Calling a SharePoint Web Service using dynamic invocation procedure with NTLM authentication?
Invoking WebService Implemented using VB 6.0 from a Java/J2EE Client
Invoking WebService Implemented using VB 6.0 from a Java/J2EE Client
Problem in passing parameters through java client to .Net WS
Help needed to call a web service after TAM authentication - (401)Unauthorized