3 Replies Latest reply on Mar 7, 2007 5:18 PM by monowai

    NullPointerException with JBossWS1.0.4GA and JBoss 4.0.5

      I have installed JBossAS 4.0.5GA and JBossWS's latest release I found on the site 1.0.4.GA. I followed the installation instructions given in install.txt under JBossWS.

      In order to install JBossWS the following steps are necessary:

      1.) Copy lib/jbossws-client.jar to $JBOSS_HOME/client/
      2.) Unzip lib/jbossws.sar to $JBOSS_HOME/server/default/deploy/
      3.) Replacing jboss-xml-binding.jar

      You need to manually replace the jboss-xml-binding.jar in the $JBOSS_HOME/client and $JBOSS_HOME/lib directories.
      The compatible release can be found here: http://repository.jboss.com/jboss/jbossxb/1.0.0.CR7


      On running wstools for my wsdl files I get following exception -
      Exception in thread "main" java.lang.NullPointerException
      at java.io.File.(File.java:194)
      at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(Too
      lsHelper.java:282)
      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 wstools.xml looks like this -

      <?xml version="1.0"?>
      <configuration xmlns="http://www.jboss.org/jbossws-tools">
       <global>
       <package-namespace package="org.jbpm.bpel.tutorial.hello"
       namespace="http://jbpm.org/examples/hello" />
       <package-namespace package="org.jbpm.bpel.tutorial.hello"
       namespace="http://www.eclipse.org/alf/schema/EventBase/1" />
       </global>
       <wsdl-java file="file://D:/jbpm-bpel-1.1.Beta3/examples/hello/target/resources/web/wsdl/hello-service.wsdl">
       <mapping file="jaxrpc-mapping.xml" />
       </wsdl-java>
      </configuration>
      


      The reason for having full path there is to make sure that the problem wasn't related to relative path which was 'wsdl/hello-service.wsdl'

      My hello.wsdl looks like this -
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="http://jbpm.org/examples/hello"
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:tns="http://jbpm.org/examples/hello"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:evt="http://www.eclipse.org/alf/schema/EventBase/1">
      
      
       <import namespace="http://www.eclipse.org/alf/schema/EventBase/1" location="resources/xml/ALFEventManagerSOAP.wsdl" />
       <!-- characterizes the relationship between the greeter and its caller -->
       <plt:partnerLinkType name="Greeter-Caller">
       <plt:role name="Greeter">
       <plt:portType name="evt:ALFServiceFlowWithReply" />
       </plt:role>
       <!-- the Caller does not provide services to the Greeter,
       this is why we omit the "Caller" role -->
       </plt:partnerLinkType>
      
       </definitions>
      


      and my ALFEventManagerSOAP.wsdl is located under that relative path 'resources/xml'.

      Please let me know what is wrong here. Is my configuration file right?
      From the error and the source code it fails on this line
      if (wsdlURL == null)
       {
       File wsdlFile = new File(w2jc.wsdlLocation);
       if (wsdlFile.exists())
       {
       wsdlURL = wsdlFile.toURL();
       }
       }
      

      Line where it says new File so I guess something is wrong with my configuration and it cannot file wsdl files correctly?

      Thank you,
      Meghana