Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1536

NPE in WSDL to Java when webservices.xml requested but no global package mapping

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jbossws-2.0.1
    • jbossws-2.0.0
    • tools-jaxrpc
    • None
    • Workaround Exists
    • Hide

      Add the global namepsace to package mapping.

      Show
      Add the global namepsace to package mapping.

      The following NPE is raised: -

      java.lang.NullPointerException
      at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:335)
      at org.jboss.ws.tools.WSTools.process(WSTools.java:137)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
      at org.jboss.ws.tools.ant.wstools.execute(wstools.java:101)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      at org.apache.tools.ant.Task.perform(Task.java:364)
      at org.apache.tools.ant.Target.execute(Target.java:341)
      at org.apache.tools.ant.Target.performTasks(Target.java:369)

      With the following wstools config less the global namespace package mapping: -

      <?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">

      <global>
      <package-namespace package="org.jboss.support.phonebook" namespace="http://www.jboss.org/support/phonebook"/>
      </global>

      <wsdl-java location="descriptors/PhoneBook.wsdl" parameter-style="bare">
      <mapping file="jaxrpc-mapping.xml" />
      <webservices servlet-link="PhoneBook" />
      </wsdl-java>

      </configuration>

              darran.lofthouse@redhat.com Darran Lofthouse
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: