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