1 Reply Latest reply on Mar 10, 2008 11:10 AM by Karl-Christian Pammer

    JBoss 4.0.4GA - Error generating Web Service Consumer code

    Suraphel Mendaye Newbie

      Hello,

      I have been trying to generate a web service consumer code in JBoss4.0.4 GA form WSDL that has dot-net service endpoint. However, using wstools ant task I got the following error..

       [wstools] java.lang.NullPointerException
       [wstools] at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:2
      84)
       [wstools] at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:3
      33)
       [wstools] at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:355)
       [wstools] at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:174
      )
       [wstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGenera
      tion(ToolsHelper.java:326)
       [wstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
       [wstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
       [wstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
       [wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
      va:288)
       [wstools] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       [wstools] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
       [wstools] at java.lang.reflect.Method.invoke(Method.java:585)
       [wstools] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchU
      tils.java:105)
       [wstools] at org.apache.tools.ant.Task.perform(Task.java:348)
       [wstools] at org.apache.tools.ant.Target.execute(Target.java:357)
       [wstools] at org.apache.tools.ant.Target.performTasks(Target.java:385)
       [wstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
      a:1329)
       [wstools] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
      
       [wstools] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
      faultExecutor.java:41)
       [wstools] at org.apache.tools.ant.Project.executeTargets(Project.java:1181
      )
       [wstools] at org.apache.tools.ant.Main.runBuild(Main.java:698)
       [wstools] at org.apache.tools.ant.Main.startAnt(Main.java:199)
       [wstools] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
       [wstools] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
      
      BUILD FAILED
      c:\ws-test\EnNet\ws_client_build.xml:102: Error running jbossws:
      
      Total time: 7 seconds
      

      --------------------------------------------------------------------------
      Configuration file (wstolls-config.xml)

      
      <?xml version="1.0" encoding="UTF-8"?>
      <configuration
       xmlns="http://www.jboss.org/jbossws-tools"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation=
       "http://www.jboss.org/jbossws-tools
       http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
       <wsdl-java file="http://192.168.0.160:8090/wsdl/IEnNET?wsdl">
       <!--
       <mapping file="jaxrpc-mapping.xml" />
       -->
       </wsdl-java>
      </configuration>
      



      --------------------------------------------------------------------------------------

      The same error happen when I use wstools.bat, look below..

      C:\WS-Test\EnNet>c:\dev\jboss\jboss-4.0.4.GA\bin\wstools -config wstools-config.
      xml -dest dest
      ========================================================================="
      .
       WSTools Environment
      .
       JBOSS_HOME: c:\DEV\JBoss\jboss-4.0.4.GA\bin\\..
      .
       JAVA: C:\Program Files\Java\jdk1.5.0_13\bin\java
      .
       JAVA_OPTS:
      .
      ========================================================================="
      .
      Exception in thread "main" java.lang.NullPointerException
       at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:284)
       at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:333)
       at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:355)
       at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:174)
       at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(Too
      lsHelper.java:326)
       at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
       at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
       at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
      


      Can someone help on this issue please?

      Thanks,
      Surafel