[jboss-user] [EJB 3.0] - Re: EJB3.0 annotation security and webservices.

webmarck do-not-reply at jboss.com
Mon Oct 30 06:00:00 EST 2006


Thanks for your reply,

I followed the guide as much as possible, but unfortunately I haven?t been able to get it work yet.

I have modified my server bean so it uses the same security domain as the webservice  just to make things simple.

@SecurityDomain("JBossWS")
  | ?
  | @RolesAllowed("friend")
  | public void setName(String name);
  | 

I have modified the client as the example says.

  | URL url = new URL("http://localhost:8080/test/MyBean?wsdl");
  | QName qname = new QName("http://test.niro.dk/jaws", "MyService");
  | ServiceFactory factory = ServiceFactory.newInstance();
  | Service service = factory.createService(url, qname);
  | My myTest = (My)service.getPort(My.class);
  | Stub stub = (Stub) myTest;
  | stub._setProperty(Stub.USERNAME_PROPERTY, "kermit");
  | stub._setProperty(Stub.PASSWORD_PROPERTY, "thefrog");
  | myTest.setName("test");
  | 

Think I am getting close now because now I get a 

10:42:38,125 ERROR [SOAPFaultExceptionHelper] SOAP request exception
  | javax.ejb.EJBAccessException: Authentication failure
  | 	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:99)
  | 	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:70)
  | 	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
  | 
  | 


I can see the guide wants me to set a 

          <auth-method>BASIC</auth-method>

But the version of jboss.xml (http://www.jboss.org/j2ee/schema/jboss_5_0.xsd) doesn?t contain that tag.

Anybody have a good idea on what to do now?


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

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



More information about the jboss-user mailing list