Hi there

I get the following error message when I try to run this test program in JBoss 
4.0.0DR4 ->
"The request failed with HTTP status 401: Unauthorized."

The example works well in JBoss 3.2.3 

Is there something that can be done about this ?? Has something changed in 4.0 or is 
this just an error that will be fixed in the final release ??

cheers
matt


Extract from the WebService Session Bean
/**
  |  * @ejb.bean        name = "HelloWorld"
  |  *          description = "simple HelloWorld Bean"
  |  *          display-name = "HelloWorld EJB"
  |  *          view-type = "remote"
  |  *          jndi-name = "ejb/jbossnet/HelloWorld"
  |  * 
  |  * @jboss-net.authentication domain="other"
  |  *                           validate-unauthenticated-calls="true"
  |  * 
  |  * @jboss-net.authorization domain="other"
  |  *                          roles-allowed="normal,extended"
  |  *                                          
  |  * 
  |  * @jboss-net.web-service urn="HelloWorldEJB"
  |  */
  | 
  | public class HelloWorldBean implements SessionBean {
  | 
  |     /**
  |      * 
  |      */
  |     public HelloWorldBean() {
  |             super();
  |     }
  | 
  |     /**
  |      * Default create Exception
  |      * @throws CreateException
  |      * @ejb.create-method 
  |      */
  |     public void ejbCreate() throws CreateException{
  |     }
  | 
  |     /**
  |      * HelloBean method
  |      * @param name
  |      * @return
  |      *
  |      * @jboss-net.web-method  
  |      * @jboss-net.wsdd-operation 
  |      * @ejb.permission role-name = "normal"
  |      * @ejb.interface-method view-type = "remote"
  |      */
  |     public String HelloBean(String name){
  |             return "Hello " + name;
  |     }

users.properties
admin=adminpwd

roles.properties
admin=normal,extended

web-service.xml
    <requestFlow name="HelloWorldEJBRequest">
  |       <handler type="java:org.jboss.net.axis.server.JBossAuthenticationHandler">
  |         <parameter name="securityDomain" value="java:/jaas/other"/>
  |             <parameter name="validateUnauthenticatedCalls" value="true"/>
  |       </handler>
  |       <handler type="java:org.jboss.net.axis.server.JBossAuthorizationHandler">
  |         <parameter name="securityDomain" value="java:/jaas/other"/>
  |         <parameter name="allowedRoles" value="normal,extended"/>
  |       </handler>
  |     </requestFlow>
  |     <responseFlow name="HelloWorldEJBResponse">
  |     </responseFlow>

c# client
        private void button_Click(object sender, EventArgs e)
  |         {
  |             localhost.HelloWorldService hws = new localhost.HelloWorldService();
  |             hws.PreAuthenticate = true;
  |             NetworkCredential login = new NetworkCredential("admin", "adminpwd");
  |             CredentialCache cache = new CredentialCache();
  |             cache.Add(new Uri(hws.Url), "Basic", login);
  |             hws.Credentials = cache;
  | 
  |             textBox.Text = hws.HelloBean("Test");
  |         }

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

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


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to