1 Reply Latest reply on Feb 6, 2006 6:57 AM by thomas.diesler

    JBoss has problem with stub generated from wscompile

    ki9r9

      I am running have a web serivce client running on JBoss 4.0.2. The wsdl is pretty big so I won't include in this post. Basically, there is a method in web service server for checking if the service is well or not. This method returns a boolean.

      public boolean isAlive()

      I used Sun's wscompile to generate the stub classes from the wsdl. One of the stub classes is the response class, IsAliveResponse.java. This is the generated stub class:
      public class IsAliveResponse {
       protected boolean isAliveReturn;
      
       public IsAliveResponse() {
       }
      
       public IsAliveResponse(boolean isAliveReturn) {
       this.isAliveReturn = isAliveReturn;
       }
      
       public boolean isIsAliveReturn() {
       return isAliveReturn;
       }
      
       public void setIsAliveReturn(boolean isAliveReturn) {
       this.isAliveReturn = isAliveReturn;
       }
      }
      


      I was getting a SAXException for bad types whenever the server responded to the isAlive request. I traced into JBoss' Axis sources and found that JBoss' Axis was looking for a getter as it was trying to determined if the boolean result is convertable into the IsAliveResponse. As you can see, this generated class does not have a getter. I also have a standalone client that uses Sun's jaxrpc jars. The stand-alone client did not have any problem with the generated stub class or with associating the result to the stub class. Is this a bug in JBoss' Axis with boolean result type? Or is it an added feature in Suns' code to recognize the isxxxx() as a getter? Is there a work around other than adding a getter method to the generated stub classes?

      /CT

        • 1. Re: JBoss has problem with stub generated from wscompile
          thomas.diesler

          In our marshall testsuite we have a simmilar response structure

          package org.jboss.test.webservice.marshalltest;
          
          
          public class MarshallEndpoint_echoBoolean_ResponseStruct {
           protected boolean result;
          
           public MarshallEndpoint_echoBoolean_ResponseStruct() {
           }
          
           public MarshallEndpoint_echoBoolean_ResponseStruct(boolean result) {
           this.result = result;
           }
          
           public boolean isResult() {
           return result;
           }
          
           public void setResult(boolean result) {
           this.result = result;
           }
          }
          


          You can try the latest from Branch_4_0 or modify the test such that it shows the issue