2 Replies Latest reply: Aug 28, 2009 1:31 AM by 707941 RSS

    BPEL has problems parsing XSD with complexType with restriction

    Lucas Jellema
      Hi,

      I am running into an issue with SOA Suite 11g TP4. My BPEL process compiles OK for a given process and set of variable definitions based on an XSD, until the moment I introduce a complexType in the XSD that has a simpleContent and restriction element;

      Everything works okay with this:

      <element name="gender" type="ap:genderType" minOccurs="0"/>
      <complexType name="genderType">
      <sequence>
      <element name="genderValue" type="string" />
      </sequence>
      </complexType >

      but validation of the XSD fails when I change the definition of the genderType to what I actually want to use:

      <complexType name="genderType">
      <simpleContent>
      <restriction base="string">
      <enumeration value="MALE"/>
      <enumeration value="FEMALE"/>
      <enumeration value="UNKNOWN"/>
      </restriction>
      </simpleContent>
      </complexType>

      It seems BPEL somehow cannot deal with the restricted type.

      Does anyone know a workaround?
      Is this a known error?
      Am I making some silly mistake?

      Thanks for any insights.

      best regards,
      Lucas
        • 1. Re: BPEL has problems parsing XSD with complexType with restriction
          Lucas Jellema
          Unfortunately the fault was all mine; the XSD syntax I had used was not correct - even though the XSD editor had no problems with it. I should have used this syntax:

          <simpleType name="genderType">
          <restriction base="string">
          <enumeration value="MALE"/>
          <enumeration value="FEMALE"/>
          <enumeration value="UNKNOWN"/>
          </restriction>
          </simpleType>

          and this is validated fine by BPEL.

          Sorry for the confusion.

          Lucas
          • 2. Re: BPEL has problems parsing XSD with complexType with restriction
            707941
            Hi Lucas, i want to restrict the no of characters of an iput; i used the following code. My soa suite is 10.1.3.3.

            <element name="RestrictLengthProcessRequest">
                 <simpleType name="input">
            <restriction base="string">
            <length value="5"/>
            </restriction>
            </simpleType>
            </element>

            The above code is giving an error saying attribute name not defined on element 'simpleType'. could you pls suggest some solution?

            Thanks in advance.