Simple Types not generated from wsdl RRS feed

  • Question

  • Hi , 

    I am in Contract first development. I have a wsdl which has simple types defined , For eg:

    - <xs:simpleType name="sourceSystem">
    - <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9]{4}" />

    But when I generate code using wsdl.exe or, these simple types are ignored and the properties of these simple types are defined as per their xs type (in this case string) .  Also the pattern validation and length validation is lost.

    How can i import simple types while code generation.

    Tuesday, January 28, 2014 7:30 PM

All replies

  • firstly i have concerns over the xsd imports:

     <import namespace=""
        <import namespace=""
        <import namespace=""

    The Schema locations need to be checked if they refer to proper location or check this it will be ideal to check it via a IDE like JDeveloper. It will give u warnings in case it finds issues. Try to place these schema in the same location as the all the WSDL and XSDs and also similarly change the path.

    The error that you see might be because of the below code:

    <attributeGroup name="encodingStyle">
        <attribute ref="emf-envelope:encodingStyle"/>

    It refers to a location to find the definition but fails.

    My suggestions are mainly 2:

    1) Try to simplify the XSD if possible. 2) Try to use a different IDE than eclipse. I prefer Oracle Jdeveloper as it has simple wizard.

    Hope this helps

    Thursday, January 30, 2014 1:18 PM