2 Replies Latest reply on Mar 14, 2008 4:29 AM by Thomas Diesler

    NullPointer in JavaToWSDL conversion using wstools

    Senthil Vinayagam Newbie

      We are in the process of moving from JBoss 3.2.6 to 4.0.4GA. We have a session bean which we currently expose as webservice using Apache-Axis. From the reading on the jboss website I guess we should be moving to JbossWS. When I try to use the wstools and follow the supplied jsr109ejb example. I get the following error.

      C:\jbossws-samples-1.0.1.GA\photopoint>ant
      Buildfile: build.xml
      
      init:
      [available] DEPRECATED - <available> used to override an existing property.
      [available] Build file should not reuse the same property name for different v
      alues.
       [echo] basedir = C:\jbossws-samples-1.0.1.GA
       [echo] jboss.home = C:/jboss-4.0.4.GA
       [echo] tomcat.home = ${tomcat.home}
       [echo] java.home = C:\jdk1.5.0_06\jre
       [echo] node0 = 93022W
      
      
      compile:
      
      copy-resources:
      
      generate-sources:
       [wstools] log4j:WARN No appenders could be found for logger (org.jboss.ws.tool
      s.WSTools).
       [wstools] log4j:WARN Please initialize the log4j system properly.
       [wstools] java.lang.NullPointerException
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaPro
      perties(SchemaTypeCreator.java:570)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(S
      chemaTypeCreator.java:331)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTyp
      eCreator.java:272)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:131)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:126)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.createFieldPartic
      le(SchemaTypeCreator.java:592)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaPro
      perties(SchemaTypeCreator.java:577)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(S
      chemaTypeCreator.java:331)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTyp
      eCreator.java:272)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:131)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:126)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.createFieldPartic
      le(SchemaTypeCreator.java:592)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaPro
      perties(SchemaTypeCreator.java:577)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(S
      chemaTypeCreator.java:331)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTyp
      eCreator.java:272)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:131)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:126)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(S
      chemaTypeCreator.java:290)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTyp
      eCreator.java:272)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:131)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:126)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.createFieldPartic
      le(SchemaTypeCreator.java:592)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaPro
      perties(SchemaTypeCreator.java:577)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(S
      chemaTypeCreator.java:331)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTyp
      eCreator.java:272)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:131)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:126)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(S
      chemaTypeCreator.java:290)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTyp
      eCreator.java:272)
       [wstools] at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(Sche
      maTypeCreator.java:131)
       [wstools] at org.jboss.ws.tools.JavaToXSD.generateForSingleType(JavaToXSD.
      java:109)
       [wstools] at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateType(Java
      ToWSDLHelper.java:555)
       [wstools] at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateTypesForX
      SD(JavaToWSDLHelper.java:141)
       [wstools] at org.jboss.ws.tools.JavaToWSDL11.handleJavaToWSDLGeneration(Ja
      vaToWSDL11.java:245)
       [wstools] at org.jboss.ws.tools.JavaToWSDL11.generate(JavaToWSDL11.java:16
      7)
       [wstools] at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:318)
       [wstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGenera
      tion(ToolsHelper.java:122)
       [wstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
       [wstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
       [wstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
       [wstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
      va:275)
       [wstools] at org.apache.tools.ant.Task.perform(Task.java:364)
       [wstools] at org.apache.tools.ant.Target.execute(Target.java:341)
       [wstools] at org.apache.tools.ant.Target.performTasks(Target.java:369)
       [wstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
      a:1216)
       [wstools] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      
       [wstools] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
      faultExecutor.java:40)
       [wstools] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
      )
       [wstools] at org.apache.tools.ant.Main.runBuild(Main.java:668)
       [wstools] at org.apache.tools.ant.Main.startAnt(Main.java:187)
       [wstools] at org.apache.tools.ant.Main.start(Main.java:150)
       [wstools] at org.apache.tools.ant.Main.main(Main.java:240)
      
      BUILD FAILED
      C:\jbossws-samples-1.0.1.GA\photopoint\build.xml:27: Error running jbossws:
      
      Total time: 4 seconds
      


      The configuration file is this
      <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/schema/jbossws-tool_1_0.xsd">
       <java-wsdl>
       <service name="PhotoPointService" style="rpc" endpoint="au.gov.act.jiver.session.ideal.IDealInterface"/>
       <namespaces target-namespace="http://rego.act.ws/photopoint"
       type-namespace="http://rego.act.ws/photopoint/types"/>
       <mapping file="jaxrpc-mapping.xml"/>
       <webservices ejb-link="PhotoPointService"/>
       </java-wsdl>
      </configuration>
      


      I have spent a lot of time try to get this working. Any help will greatly be appreciated.

      Senti