Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to access Secured Web service:

 
K Abhijit
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
lakshmi desai
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic