[jboss-user] [JBossWS] - SAAJ API & basic authentication (AS 4.0.4)
mhae
do-not-reply at jboss.com
Thu Sep 7 16:09:06 EDT 2006
I secured my web service with basic authentication and I'm trying to
use the SAAJ API to access it:
//System.setProperty("http.basic.username", "user");
//System.setProperty("http.basic.password", "pass");
URL endpointUrl = new URL(endpoint);
SOAPMessage response = connection.call(message, endpointUrl);
connection.close();
Using the system property approach works but I was wondering if
there is a better way to pass the username/password information?
Sun's reference implementation (http://java.sun.com/webservices/docs/1.6/saaj/saaj-security.html)
states that I should be using http://USER:PASSWORD@HOST:PORT/FILE
but this doesn't work.
Looking at the implementation (/webservice/src/main/org/jboss/ws/soap/SOAPConnectionImpl.java), it seems that I could pass an EndpointInfo object into the call method but this class seems to be a server class.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970203#3970203
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970203
More information about the jboss-user
mailing list