1 Reply Latest reply on Nov 12, 2008 10:33 AM by Peter Johnson

    the generated java file has errors when using wsprovide

    Feng Qian Newbie

      Hi guys,
      I used wsprovide in the bin folder of jboss as 4.2.2GA to generate wsdl and java files.
      the class is :

      package echo;
      
      @javax.jws.WebService
      public class Echo
      {
       public String echo(String input)
       {
       return input;
       }
      }


      the command line : wsprovide.bat -ktw echo.Echo

      the generated files have a wsdl and two java files.
      A java file is : EchoResponse.java
      package echo.jaxws;
      
      import javax.xml.bind.annotation.XmlAccessType;
      import javax.xml.bind.annotation.XmlAccessorType;
      import javax.xml.bind.annotation.XmlElement;
      import javax.xml.bind.annotation.XmlRootElement;
      import javax.xml.bind.annotation.XmlType;
      
      @XmlRootElement(namespace = "http://echo/", name = "echoResponse")
      @XmlType(namespace = "http://echo/", name = "echoResponse")
      @XmlAccessorType(XmlAccessType.FIELD)
      public class EchoResponse {
      
       @XmlElement(namespace = "", name = "return")
       private String return;
      
       public String getReturn() {
       return this.return;
       }
      
       public void setReturn(String return) {
       this.return = return;
       }
      
      }



      the return is key of java, but in the java file , return is used to the name of a variable. This is big issue.