0

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.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Erad
  • 1
  • 3
  • presumably MYELEMENT is of type http://www.mynamespace.co.uk/types:mytype? Could you post the full schema and instance? – kennethmay Nov 29 '11 at 15:10
  • I've since validated that the behavior should not result in an error. The any shouldn't care whether MYELEMENT is in the schema or not, even if the schema is named. The problem is a TIBCO one. – Erad Nov 30 '11 at 09:32
  • Actually what I should have said is that the parent of MYELEMENT needs to be of type "mytype". – kennethmay Nov 30 '11 at 15:47

1 Answers1

0

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

Erad
  • 1
  • 3