4 Replies Latest reply on Oct 9, 2007 10:33 AM by richard_opalka

    XMLSchema, WSDL and wsconsume tool



      i have created a WSDL file that is based on a XMLSchema file.
      In that XMLSchema file i have defined some rules related to
      simpleTypes, like that:

      <xs:simpleType name="gender">
       <xs:restriction base="xs:string">
       <xs:enumeration value="M" />
       <xs:enumeration value="F" />

      With this simpleType i have created a complexType, like that:

      <xs:complexType name="customer">
       <xs:element name="name" type="xs:string" />
       <xs:element name="dateOfBirth" type="xs:date" />
       <xs:element name="gender" type="gender" />

      Thus, i use wsconsume tool to generate the classes based on that WSDL.
      It works fine, i package and deploy my app and it is successfully published on Jboss.

      After deploy and publish my app, i need to use the wsconsume tool again to create the WS client. But, when i access the URL http://myhost:myport/appName/something?wsdl to see the WSDL on-line generated, the simpleType defined previously with restrictions doesn't appear correctly, i mean it doesn't appear with the restrictions defined on XMLSchema. In that WSDL i can see the complexType customer type defined, but the element "gender" is only a xs:string type without restrictions.

      Is it like that or am i forgetting something?

      Best regards,