Uploaded image for project: 'Woden'
  1. Woden
  2. WODEN-2

'element' attribute is not treated as OPTIONAL by validator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • M7
    • Validation
    • None

    Description

      The 'element' attribute of interface fault and message reference is optional [1], so I tried a test with this attribute missing from an interface <fault>. It caused a NPE in WSDLDocumentValidator.validateInterfaces(..) at the point where it calls testAssertionSchema0016(..). A similar test should be done on interface <input> and <output> (i.e. interface message reference).

      [1] http://www.w3.org/TR/2006/CR-wsdl20-20060106/#InterfaceFault_XMLRep

      The WSDL used was:

      <?xml version="1.0" encoding="utf-8" ?>
      <description xmlns="http://www.w3.org/2005/08/wsdl"
      targetNamespace="http://greath.example.com/2004/services/updateDetails"
      xmlns:tns="http://greath.example.com/2004/services/updateDetails"
      xmlns:details="http://greath.example.com/2004/schemas/reservationDetails"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation=
      "http://www.w3.org/2005/08/wsdl http://www.w3.org/2005/08/wsdl/wsdl20.xsd
      http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd"
      >

      <documentation>
      Test that the 'element' attribute of an interface fault is treated as optional.
      </documentation>

      <types>
      <xs:schema id="items"
      targetNamespace="http://greath.example.com/2004/schemas/reservationItems">
      <xs:element name="confirmationNumber" type="xs:string" />
      <xs:element name="checkInDate" type="xs:date" />
      <xs:element name="checkOutDate" type="xs:date" />
      <xs:element name="roomType" type="xs:string" />
      <xs:element name="smoking" type="xs:boolean" />
      </xs:schema>
      </types>

      <interface name="reservationInterface">
      <fault name="invalidDataFault1" element="details:confirmationNumber" />
      <fault name="invalidDataFault2" />
      </interface>

      </description>

      The stack trace is:

      java.lang.NullPointerException
      at org.apache.woden.internal.wsdl20.validation.WSDLDocumentValidator.validateInterfaces(WSDLDocumentValidator.java:171)
      at org.apache.woden.internal.wsdl20.validation.WSDLDocumentValidator.validate(WSDLDocumentValidator.java:80)
      at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:153)
      at jktest.ReadWsdlTest.main(ReadWsdlTest.java:75)

      Attachments

        Activity

          People

            lmandel Lawrence Mandel
            jkaputin John Alan William Kaputin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: