axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject java2wsdl + schema import + wsdl2java
Date Tue, 18 Mar 2003 13:36:34 GMT

We use axis1.1RC1 to generate WSDL file out of our java service
definitions. Some of our methods are returning beans containing properties
typed by Class defined in javax.oss.* package. OSS/J project defines XML
schema equivalent for their types. So to enforce correct type mapping, I've
imported the schema definition during the java2wsdl conversion and
specified a namespace/package mapping in the java2wsdl task. After
execution, the generated WSDL is globally OK but contains an error : the
targetNamespace of the imported schema file is never specified as a used
namespace neither in the wsdl:definition node nor in a schema node.
In the following fragment, 'tns2' is never defined.  ManagedEntityKey is
one of the type introduced in the imported schema file.

  <schema targetNamespace="" xmlns="">
   <import namespace=""/>
   <complexType name="MyBean">
     <element name="managedEntityKey" nillable="true" type

I've added a quick fix in the
org.apache.axis.wsdl.fromJava.Types.loadInputSchema method to force the
targetNamespace of the imported schema to be registered in the Definition
instance. This makes its namespace available globally and solve the issue.
But this is a quick fix.... The namespace specification would best fit in
the schema node.  Any advice?

Concerning wsdl2java, is there any plan to add a classpath where the tool
could look for bean definitions instead of generating them?


This e-mail contains proprietary information some or all of which may be
legally privileged. It is for the intended recipient only. If an addressing
or transmission error has misdirected this e-mail, please notify the author
by replying to this e-mail. If you are not the intended recipient you must
not use, disclose, distribute, copy, print, or rely on this e-mail.

View raw message