Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Not able to access Secured Web service:

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 " " 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

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.
    Bookmark Topic Watch Topic
  • New Topic