0 Replies Latest reply: May 25, 2011 7:12 PM by 802451 RSS

    Invalid Element

    802451
      Hi,

      I have imported another schema and am attempting to define an element that references a type defined in the imported xsd. The import seems to be okay, but when i declare the element ref as a child, (inside of a complexType tag), the schema is declared invalid saying: 'Xerces s4s-elt-invalid-content.1 The content of #Anontype_outbound-gateway is invalid. The Element 'element' is invalid, misplaced or occurs too often. Note, that if i move the type reference declaration inside of my schema and ditch the import, i get the same problem. Why might this element reference be invalid, misplaced or too recurrent? Completely miffed here. Any help is appreciated.

      Here is my xml:

      NOTE: The offending element is the 'uri-variable' element: (This sample has it with out the type reference import, rather defined directly in the xsd)


      ...
      ...
      <xsd:annotation>
      <xsd:documentation><![CDATA[
           Defines the configuration elements for Spring Integration's Web Service adapters.
                ]]></xsd:documentation>
      </xsd:annotation>

      <xsd:complexType name="uriVariableType">
      <xsd:annotation>
      <xsd:documentation><![CDATA[
                          Expression to be evaluated against the Message to replace a URI {placeholder} with the evaluation result.
                     ]]></xsd:documentation>
      </xsd:annotation>
      <xsd:attribute name="name" use="required">
      <xsd:annotation>
           <xsd:documentation><![CDATA[
                               Name of the placeholder to be replaced.
                          ]]></xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="expression" use="required">
      <xsd:annotation>
           <xsd:documentation><![CDATA[
                               Expression to be evaluated to determine the replacement value.
                               The Message is the root object of the expression, therefore
                               the 'payload' and 'headers' are available directly. Any bean
                               may be resolved if the bean name is preceded with '@'.
                          ]]></xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      </xsd:complexType>

      <xsd:element name="outbound-gateway">
      <xsd:complexType>
      <xsd:annotation>
           <xsd:documentation>
           Defines a Web Service based outbound Messaging Gateway.
           </xsd:documentation>
      </xsd:annotation>
      <xsd:all>
           <xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
      </xsd:all>
      *<xsd:element name="uri-variable" type="uriVariableType" minOccurs="0" maxOccurs="unbounded"/>*
      <xsd:attribute name="id" type="xsd:string">
           <xsd:annotation>
           <xsd:documentation>
           A unique identifier for this Gateway.
           </xsd:documentation>
           </xsd:annotation>
      </xsd:attribute>
      ...
      ...
      ...