web services - Securing SOAP webservice, wildfly, authentication error -


i've got jax-ws webservice need secure. when start wildfly seems load nicely, when try send request via soapui tool, server returns error body element - unauthorized. relevant parts of code below.

webservice itself:

@webservice @stateless @rolesallowed("testrole") @securitydomain("test-domain") public class test {      @webmethod     @webresult(name = "helloresponse")     public string sayhello(@webparam(name = "username") string name) {         return "hello " + name;     } } 

standalone.xml:

<security-domain name="test-domain" cache-type="default">     <authentication>         <login-module code="org.jboss.security.auth.spi.userrolesloginmodule"             flag="required">              <module-option name="userproperties" value="test-domain-users.properties" relative-to="jboss.server.config.dir"/>             <module-option name="rolesproperties" value="test-domain-roles.properties" relative-to="jboss.server.config.dir"/>         </login-module>     </authentication> </security-domain> 

jboss-web.xml:

<jboss-web>     <security-domain>test-domain</security-domain> </jboss-web>  

test-domain-users.properties , test-domain-roles.properties this: testuser=testpassword, testuser=testrole


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -