• Post Reply Bookmark Topic Watch Topic
  • New Topic

Password Authentication Problem for JAXR Connection  RSS feed

 
Prasad Lakkavaram
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I registered with IBM UDDI test registry with user name and password and tried to connect to it using a servlet with the following code:
----------
javax.naming.InitialContext jndiEnc=new javax.naming.InitialContext();
ConnectionFactory factory= (ConnectionFactory) jndiEnc.lookup("java:comp/env/eis/JAXR");
Connection connection=factory.createConnection();

PasswordAuthentication credential = new PasswordAuthentication(userName, password.toCharArray());
Set credentials = new HashSet();
credentials.add(credential);
connection.setCredentials(credentials);
-------------------
I could get the connection but while setting the credential I got the following error:
--------
com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed
--------
at line "connection.setCredentials(credentials)
-----
I gave the same user-id and password that I gave for UDDI test registry . Can any one guide me.I am not sure whether the attributes I set for the JAXR Resource Adapter are correct. I used the following:
---
AuthMethod: UDDI_GET_AUTHTOKEN
HttpsProxyPort:8181
HttpProxyPort:8080
HttpProxyHost:localhost
HttpsProxyHost:localhost
LifeCycleManagerURL:https://uddi.ibm.com/testregistry/publishapi
QueryManagerURL:http://uddi.ibm.com/testregistry/inquiryapi
---
I would really appreciate if any one could provide some hints,
Thanks in advance
Prasad
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!