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

DescriptionElement.getTypesElement() should not be a factory method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • M8
    • Parser
    • None

    Description

      The behaviour of the DescriptionElement.getTypesElement() method is to return the types element if it exists or if not, create it and return it. This means that the model can never reflect an infoset that does not have a <wsdl:types> element because this getter method will always create one even if there isn't one in the WSDL.

      Instead, this method should return null if there is no types element and a new factory method is required - createTypesElement(), which will create a TypesElement, set the DescriptionElement as its parent and return a reference to it. This is similar behaviour to the addXXXXElement methods that create sets of child elements, except that it acts on a single types element only (hence the method name 'create' rather than 'add').

      Attachments

        1. DescriptionElement.java.patch
          2 kB
          Dan Harvey
        2. DescriptionImpl.java.patch
          1 kB
          Dan Harvey
        3. DescriptiontElementTest.java.patch
          1 kB
          Dan Harvey
        4. WSDLDocumentValidatorTest.java.patch
          2 kB
          Dan Harvey
        5. BaseWSDLReader.java.patch
          1 kB
          Dan Harvey
        6. DOMWSDLReader.java.patch
          1 kB
          Dan Harvey
        7. DescriptionImpl.java.2.patch
          1 kB
          John Alan William Kaputin
        8. Messages.properties.patch
          0.7 kB
          John Alan William Kaputin
        9. DescriptionTest.java.patch
          0.8 kB
          John Alan William Kaputin
        10. BaseWSDLReader.java.2.patch
          1 kB
          John Alan William Kaputin

        Activity

          People

            danharvey Dan Harvey
            jkaputin John Alan William Kaputin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: