Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1841

wsdl2javagenerator and wsdl:import (ebRIM)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Java-SDO-1.0
    • Java-SCA-1.x
    • Java SCA Tools
    • None
    • Windows XP, Java 1.5.0_12

    Description

      This is bug that has been fixed in axis2 as described in this thread

      http://www.nabble.com/wsdl-import-failing-with-wsdl2java-axis2-1.3-tf4565180.html#a13030624

      and I believe is related to wsdl:import and with wsdl2javagenerator I just get a null pointer
      since packageRegistry.values().isEmpty() is empty when tested in
      XSD2JavaGenerator

      to recreate the problem download the schema and services folder from http://www.oasis-open.org/committees/regrep/documents/3.0/ to create

      schema
      cms.xsd
      lcm.xsd
      query.xsd
      rim.xsd
      rs.xsd
      wsdl
      ebXMLRegistryBindings.wsdl
      ebXMLRegistryInterfaces.wsdl
      ebXMLRegistryServices.wsdl

      In ebXMLRegistryBindings.wsdl I fixed a typo changing soap:body part to soap:body parts to validate, but this isn't necessary to recreate this problem.

      I created a simple ant file as follows to run the wsdl2java task as follows

      <project name="tuscany_rim" default="wsdl2java" basedir=".">
      <description>
      Apache Tuscany ebRIM
      </description>

      <!-- set global properties for this build -->
      <property name="src" location="src"/>
      <property name="gen" location="gen"/>
      <property name="build" location="bin"/>
      <property name="schemas" location="schemas"/>
      <property name="wsdl" location="wsdl"/>
      <property name="dist" location="dist"/>
      <property name="tuscany.home" location="C:/projects/tuscany-sca-1.0-incubating/"/>

      <path id="tuscany.class.path">
      <fileset dir="${tuscany.home}/lib">
      <include name="*.jar"/>
      </fileset>
      <fileset dir="${tuscany.home}/modules">
      <include name="*.jar"/>
      </fileset>
      </path>

      <target name="init">
      <!-- Create the build directory structure used by compile -->
      <mkdir dir="${build}"/>
      <mkdir dir="${gen}"/>
      </target>

      <target name="compile" depends="init" description="compile the source">
      <!-- Compile the java code from ${src} into ${build} -->
      <javac srcdir="${src}" destdir="${build}" debug="off"/>
      </target>

      <target name="dist" depends="compile"
      description="generate the distribution" >
      </target>

      <target name="clean" description="clean up" >
      <!-- Delete the ${build} and ${dist} directory trees -->
      <delete dir="${build}"/>
      <delete dir="${dist}"/>
      </target>

      <target name="wsdl2java" depends="init">
      <java classname="org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator" dir="." fork="true" classpathref="tuscany.class.path">
      <arg line="-targetDirectory ${gen}"/>
      <arg line="-javaPackage com.ittvis.rim"/>
      <arg line="-verbose"/>
      <arg line="${wsdl}/ebXMLRegistryServices.wsdl"/>
      </java>
      </target>

      </project>

      thanks!!

      Attachments

        Activity

          People

            Unassigned Unassigned
            normanb Norman Barker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: