[jboss-user] [JBossWS] - JBoss WS Pojos endpoint authentication
a.gazzarini
do-not-reply at jboss.com
Thu Jul 2 02:04:48 EDT 2009
Hi, I was trying to configure authentication for my pojo endpoint as described on http://www.jboss.org/community/wiki/JBossWS-SecureTransport.
Well, probelm is that my security constraints (web.xml) is protecting all resources (/*) including WSDL, so when I try to invoke the Service.getPort(...) method that invocation fails because credentials are provided later on BindingProvider as shown below:
| URL wsdlURL = new File("resources/jaxws/samples/context/WEB-INF/wsdl/TestEndpoint.wsdl").toURL();
| QName qname = new QName("http://org.jboss.ws/jaxws/context", "TestEndpointService");
| Service service = Service.create(wsdlURL, qname);
| port = (TestEndpoint)service.getPort(TestEndpoint.class);
|
| BindingProvider bp = (BindingProvider)port;
| bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
| bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
|
Note that authentication is correctly configured : If i try to access to WSDL using a browser I get the authentication POPUP (I configured BASIC authentication); after inserting credentials the WSDL is correctly displayed.
Could you help me?
Regards,
Andrea
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241356#4241356
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241356
More information about the jboss-user
mailing list