5 Replies Latest reply on May 22, 2007 2:43 PM by Tejas Jani

    wstools error from WSDL to Java

    Tejas Jani Newbie

      Trying to generate java artifacts from wsdl, using wstools, I get the following error:

      $ ./wstools.sh -config C:/test/wstools-config.xml -dest C:/test/
      =========================================================================
      
      WSTools Environment
      
      JBOSS_HOME: D:\dtsource\main\deploy\servers\jboss-4.0.5.GA1
      
      JAVA: /d/dtsource/main/thirdparty/tool/jdk/windows/jdk1.5.0/bin/java
      
      JAVA_OPTS:
      
      =========================================================================
      
      Exception in thread "main" java.lang.NullPointerException
      at java.io.File.<init>(File.java:194)
      at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:308)
      at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
      at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
      
      


      My environment is JBossWS 1.0.4 on JBoss 4.0.5GA running on Java 5

      what am I missing ?

        • 1. Re: wstools error from WSDL to Java
          trivedi kumar Newbie

          Can you provide me the wstools-config.xml file contents?

          Thanks,
          Trivedi

          • 2. Re: wstools error from WSDL to Java
            Tejas Jani Newbie

            Here is the wstools-config.xml file: (both the wsdl and xsd files are in the same location)

            <?xml version="1.0" encoding="UTF-8"?>
            <jbos:configuration xmlns:jbos="http://www.jboss.org/jbossws-tools">
             <jbos:global>
             <jbos:package-namespace namespace="http://demandtec.com/integration/schema.xsd" package="test.types"/>
             <jbos:package-namespace namespace="http://www.w3.org/2004/11/xmlmime" package="test"/>
             <jbos:package-namespace namespace="http://demandtec.com/integration/schema" package="test"/>
             <jbos:package-namespace namespace="http://www.w3.org/2001/XMLSchema" package="test"/>
             </jbos:global>
             <jbos:wsdl-java location="C:\test\HEBService_Full_.wsdl" parameter-style="bare">
             <jbos:mapping file="test-mapping.xml"/>
             <jbos:webservices ejb-link="" append="false"/>
             </jbos:wsdl-java>
            </jbos:configuration>
            


            • 3. Re: wstools error from WSDL to Java
              Oskar Carlstedt Novice

              Hello!!

              You shall use forward slashes instead of the backslash in the windows path, i.e. change C:\test\HEBService_Full_.wsdl to C:/test/HEBService_Full_.wsdl

              Kind Regards
              Oskar

              • 4. Re: wstools error from WSDL to Java
                trivedi kumar Newbie

                Hello,
                Instead of Location, use file as mentioned below:

                <wsdl-java file="docreg.wsdl"

                Thanks,
                Trivedi

                • 5. Re: wstools error from WSDL to Java
                  Tejas Jani Newbie

                  Thanks, here is the final file that seems to work

                  <?xml version="1.0" encoding="UTF-8"?>
                  <jbos:configuration xmlns:jbos="http://www.jboss.org/jbossws-tools">
                   <jbos:global>
                   <jbos:package-namespace namespace="http://demandtec.com/integration/schema.xsd" package="com.demandtec.ws.types"/>
                   <jbos:package-namespace namespace="http://www.w3.org/2004/11/xmlmime" package="test"/>
                   <jbos:package-namespace namespace="http://demandtec.com/integration/schema" package="com.demandtec.ws"/>
                   <jbos:package-namespace namespace="http://www.w3.org/2001/XMLSchema" package="test"/>
                   </jbos:global>
                   <jbos:wsdl-java file="C:\test\HEBService_Full.wsdl" parameter-style="bare">
                   <jbos:mapping file="test-mapping.xml"/>
                   <jbos:webservices ejb-link="" append="false"/>
                   <jbos:webservices servlet-link="testImpl" append="false"/>
                   </jbos:wsdl-java>
                  </jbos:configuration>