2 Replies Latest reply on Jul 20, 2007 9:27 PM by davidchen

    SimpleTypes not creating classes with wsconsume

    maffewl

      When I use the wsconsume tool on my wsdl, It seems that while my ComplexType declarations generate classes, however my SimpleType ones do not.

      previously, when using wsdl2java. I would get classes generated on these simple types

      for example:

      <?xml version="1.0" encoding="UTF-8"?>
      <xsd:schema targetNamespace="http://foo.bar.com/type"
       elementFormDefault="qualified"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:CLSType="http://foo.bar.com/type">
       ...
       <xsd:annotation>
       <xsd:documentation>
       Value Meaning
       ------------------
       eng English
       fra French
       </xsd:documentation>
       </xsd:annotation>
       <xsd:simpleType name="languageCode" >
       <xsd:restriction base="xsd:string">
       <xsd:enumeration value="eng"/>
       <xsd:enumeration value="fra"/>
       </xsd:restriction>
       </xsd:simpleType>
       ...
      </xsd:schema>
      


      would generate a LanguageCode class when using wsdl2java. However, using wsconsume, this class is not created.

      Any thoughts?

        • 1. Re: SimpleTypes not creating classes with wsconsume
          maffewl

          my assumption that it did not generate all simple types was incorrect, in fact it DID even generate the LanguageCode class, it doesnt hoever generate this one:

          <xsd:simpleType name="accountStatusCode">
           <xsd:restriction base="xsd:int">
           <xsd:enumeration value="1"/>
           <xsd:enumeration value="2"/>
           <xsd:enumeration value="3"/>
           <xsd:enumeration value="4"/>
           <xsd:enumeration value="5"/>
           <xsd:enumeration value="6"/>
           <xsd:enumeration value="7"/>
           <xsd:enumeration value="8"/>
           <xsd:enumeration value="9"/>
           </xsd:restriction>
           </xsd:simpleType>
          


          any reason for that?

          • 2. Re: SimpleTypes not creating classes with wsconsume
            davidchen

            Any help so far? Furthermore, if using other "restriction" except "enumeration" (ex. "minInclusive", "maxInclusive"), neither wsconsume nor wsdl2java will create class for that simple type. So, any way to implement such restriction in java code so that jaxb can recognize?

            Thanks a lot
            David