axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Rathert <...@gmx.de>
Subject WSDL2Java changes in v1.2 wrt xs:import
Date Mon, 25 Jul 2005 09:47:43 GMT
Hello,

I have a problem to understand the behavior of WSDL2Java when it comes
to includes.

I have a WSDL-file which contains an import of types from an xsd-file:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions ...>
    <wsdl:types>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:ct="http://complex.types.jrt.de"
         xmlns:st="http://simple.types.jrt.de"
         targetNamespace="http://complex.types.jrt.de"

        <xs:import namespace="http://simple.types.jrt.de"
            schemaLocation="myFile.xsd"/>

        <xs:complexType name="Foo">
          <xs:sequence>
            <xs:element name="Bar" type="st:Bar"/>
          </xs:sequence>
        </xs:complexType>
      </xs:schema>
    </wsdl:types>
    <!-- ... messages etc. -->
</wsdl:definitons>

In my xsd, I only define a very simple type:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
    <xs:simpleType name="Bar">
      <xs:annotation>
        <xs:documentation>Doc</xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
        <xs:minLength value="1"/>
        <xs:maxLength value="16"/>
        <xs:pattern value="ABC|DEF|GHI"/>
      </xs:restriction>
    </xs:simpleType>
</xs:schema>

WSDL2Java in Axis v1.1 created the following files:

      de/jrt/types/complex/Foo.java
      de/jrt/types/simple/Bar.java

no matter if I created client stubs or server files. Foo.java contained
a class with a Bar member that only contains a java.lang.String value -
as expected.

With WSDL2Java in Axis v1.2 this has changed - I only get

      de/jrt/types/complex/Foo.java

where the Bar member is of type java.lang.String.

Can somebody explain this change to me and tell me if there is any issue
   with interoperability between an Axis 1.2 server and an Axis 1.1
client based on my WSDL? I actually found that everything just works if
I accept and use the classes that are generated, I am jut curious why
the "extra classes" disappeared in v1.2 and if and how I can get them
created by WSDL2Java.

Kind regards,

    Jonas

-- 
   Note: 96.31% of all statistics are fiction.


Mime
View raw message