• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

How to enable cached authentication details..??

Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am using Oracle Service Bus(OSB). I have two web services running in OSB. One importing schema and making use of it and other one without using schema. I have no problem to invoke the service that doesn't import schema. I am sending the username and password as given in the below code snippet.

weblogic.wsee.connection.transport.http.HttpTransportInfo httpInfo = new weblogic.wsee.connection.transport.http.HttpTransportInfo();
ABCServiceSoap_Service service = new ABCServiceSoap_Service_Impl("http://test1:6118/ABCAuthorizationService/ABCAuthorizationServiceProxyService?WSDL"

With the above code, the service client works fine and no issue. I could invoke the operations. But for the other service which imports schema, I am getting 401 error if i use the same code as above. The reason i notice is the authentication details i give is used to retrieve the WSDL only. For retrieving the schema import, again it expects username and password. How can i pass the username/pw to retrieve the schema? Is there some kind of cache where i can store the username/pw which will be used in subsequent requests or any other way to send authentication details?

The code snippet of proxy wsdl which refers the xmlschema from resource folder is as below.

<s2:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://test1:6118/ABCAuthorizationService/ABCAuthorizationServiceProxyService?SCHEMA%2FABCAuthorizationService%2FResource%2FXMLSchema" />

Below is the exception i get in eclipse.

Exception in thread "Main Thread" javax.xml.rpc.ServiceException: Failed to parse WSDL http://test1:6118/ABCAuthorizationService/ABCAuthorizationServiceProxyService?WSDL weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Server returned HTTP response code: 401 for URL: http://TEST1:6118/ABCAuthorizationService/ABCAuthorizationServiceProxyService?SCHEMA%2FABCAuthorizationService%2FResource%2FXMLSchema

Please correct me if my understanding is wrong.

Thanks in advance for your reply.

That is a really big piece of pie for such a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic