Question

I have a schema containing (for example)...

<xsd:complexType name="mytype">
  <xsd:sequence>
    <xsd:any maxOccurs="unbounded" processContents="skip"/>
  </xsd:sequence>
</xsd:complexType>

... and some XML containing this element...

<MYELEMENT xmlns = "http://www.mynamespace.co.uk/types" xsi:nil = "true"/>

... I have a SOAP call that expects back 'mytype'. When I get back XML containing the above, I get the following error:

caused by: org.xml.sax.SAXException: validation error: #cvc-elt.3.1 Element "{http://www.mynamespace.co.uk/types}MYELEMENT" is not nillable. ({com.tibco.xml.validation}COMPLEX_E_ELEMENT_NOT_NILLABLE)

This is a SOAP call performed within TIBCO 5.5 designer. I understand that TIBCO is not the most known tool in the world; what I really want to get out of this question is whether the error is expected behavior (maybe because the element has a defined namespace???) or not.

I would have thought that the processContents="skip" should allow anything through?

Just to complete the info, namespace http://www.mynamespace.co.uk/types is available to the SOAP receiver. I get this error regardless of whether 'MYELEMENT' is defined in the schema or not, with or without nillable="true". I am receiving the XML from a customer and therefore cannot remove the xsi:nil = "true" from MYELEMENT.

Was it helpful?

Solution

I've found that its a TIBCO Designer 5.5 bug. Use 5.6 or higher.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top