[jboss-user] [JBossWS] - Secure Webservice

iorlas do-not-reply at jboss.com
Wed May 16 06:38:36 EDT 2007


I am using JBoss-4.0.5.GA and have implemented a Webservice using 
annotations. The Webservice is protected by a SecurityDomain.

To access the webservice I have looked at the examples from the jbossws samples for jbossws-1.2.1.GA and tried to followed it as much as possible. Obvioulsy something isn't correct since I get a Authentication Failure even though I passes the correct username and password. The client code:

        System.setProperty(Provider.JAXWSPROVIDER_PROPERTY, "org.jboss.ws.core.jaxws.spi.ProviderImpl");
  |         URL wsdlURL = new URL(WSDL_LOCATION);        
  |         Service service = Service.create(wsdlURL, SERVICE_NAME);
  |         WebServiceEndPoint endPoint = null;
  |         endPoint = (WebServiceEndPoint) service.getPort(WebServiceEndPoint.class);
  |         BindingProvider bp = (BindingProvider) endPoint;
  |         bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "test");
  |         bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "test");
  |         String result = (String) endPoint.test("Gurka");
  |         System.out.println("The Server response is: " + result);

I am stomped what I am doing wrong?  I have pointed the JBossWS security domain to the correct database with a configuration that I know works for my EJBs. 

Is the error on the client or the server side?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046081#4046081

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046081

More information about the jboss-user mailing list