Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Parser
    • Labels:
      None

      Description

      With the primary motivation for long-term integration with Axis2, a StAX based parsing model for Woden could use AXIOM, the light-weight and high performance object model to parse a WSDL into the Woden interface.

      1. TestsForOMParser.patch
        51 kB
        Oshani Seneviratne
      2. TestsAndAdditions.patch
        95 kB
        Oshani Seneviratne
      3. StAXBasedParsing.patch
        63 kB
        Oshani Seneviratne
      4. QNameUtils.patch
        2 kB
        Oshani Seneviratne
      5. OMWSDLReader-additions.patch
        11 kB
        Oshani Seneviratne
      6. OMWSDLFactory.patch
        1 kB
        Oshani Seneviratne
      7. OMUtils.patch
        9 kB
        Oshani Seneviratne

        Activity

        Oshani Seneviratne created issue -
        Hide
        Oshani Seneviratne added a comment -

        This patch is an initial attempt to provide StAX based parsing in woden.

        Please apply it at [WODEN HOME]/org/apache/woden/internal/ and make sure that http://people.apache.org/repository/ws-commons/jars/axiom-api-1.0.jar is in your class path before trying it out.

        The patch includes the following source files:

        -->org.apache.woden.internal.OMWSDLReader.java:
        This class is similar in functionality to the org.apache.woden.internal.DOMWSDReader.java. It will provide the functionality to read the WSDL and parse all the component elements to their respective Woden elements. The DescriptionElement will consist of all these *Element objects.

        -->org.apache.woden.internal.util.om.QNameUtils.java:
        This class is similar in functionality to the org.apache.woden.internal.dom.QNameUtils.java. It handles some trivial functionality related to QNames.

        -->org.apache.woden.internal.util.om.OMUtils.java:
        This class is similar in functionality to the org.apache.woden.internal.dom.DOMUtils.java. It contains utility methods required for parsing the elements using AXIOM.

        *************************************************************
        What's still TODO:

        1. Parsing import and include elements.
        2. Importing all the schemas from http://www.w3.org/2001/XMLSchema.xsd as in the DOMWSDLReader. (From Axis2 point of view, this might not be necessary. However, will include it later)
        3. Parsing extension elements and attributes.

        Show
        Oshani Seneviratne added a comment - This patch is an initial attempt to provide StAX based parsing in woden. Please apply it at [WODEN HOME] /org/apache/woden/internal/ and make sure that http://people.apache.org/repository/ws-commons/jars/axiom-api-1.0.jar is in your class path before trying it out. The patch includes the following source files: -->org.apache.woden.internal.OMWSDLReader.java: This class is similar in functionality to the org.apache.woden.internal.DOMWSDReader.java. It will provide the functionality to read the WSDL and parse all the component elements to their respective Woden elements. The DescriptionElement will consist of all these *Element objects. -->org.apache.woden.internal.util.om.QNameUtils.java: This class is similar in functionality to the org.apache.woden.internal.dom.QNameUtils.java. It handles some trivial functionality related to QNames. -->org.apache.woden.internal.util.om.OMUtils.java: This class is similar in functionality to the org.apache.woden.internal.dom.DOMUtils.java. It contains utility methods required for parsing the elements using AXIOM. ************************************************************* What's still TODO: 1. Parsing import and include elements. 2. Importing all the schemas from http://www.w3.org/2001/XMLSchema.xsd as in the DOMWSDLReader. (From Axis2 point of view, this might not be necessary. However, will include it later) 3. Parsing extension elements and attributes.
        Oshani Seneviratne made changes -
        Field Original Value New Value
        Attachment StAXBasedParsing.patch [ 12335915 ]
        Hide
        Oshani Seneviratne added a comment -

        This patch contains OMWSDLFactory.java, which specifies the use of the OMWSDLReader.

        The WSDLFactory object can be used in the following way to obtain a WSDLReader object for StAX based parsing.

        String factoryImplName = "org.apache.woden.internal.OMWSDLFactory"
        WSDLFactory factory = WSDLFactory.newInstance(factoryImplName);
        WSDLReader reader = factory.newWSDLReader();

        Please apply this patch at WODEN_SRC_HOME/org/apache/woden/internal

        Show
        Oshani Seneviratne added a comment - This patch contains OMWSDLFactory.java, which specifies the use of the OMWSDLReader. The WSDLFactory object can be used in the following way to obtain a WSDLReader object for StAX based parsing. String factoryImplName = "org.apache.woden.internal.OMWSDLFactory" WSDLFactory factory = WSDLFactory.newInstance(factoryImplName); WSDLReader reader = factory.newWSDLReader(); Please apply this patch at WODEN_SRC_HOME/org/apache/woden/internal
        Oshani Seneviratne made changes -
        Attachment OMWSDLFactory.patch [ 12336034 ]
        John Kaputin made changes -
        Assignee John Kaputin [ jkaputin ]
        Oshani Seneviratne made changes -
        Attachment QNameUtils.patch [ 12336312 ]
        Oshani Seneviratne made changes -
        Attachment OMUtils.patch [ 12336313 ]
        Hide
        Oshani Seneviratne added a comment -

        **********************************
        TestsForOMParser.patch
        **********************************

        This patch contains unit tests for the OM parser.

        Specifically, the following files are introduced with it:

        org.apache.woden.tests.AllWodenTestsOM
        org.apache.woden.OMWSDLFactoryTest
        org.apache.woden.OMWSDLReaderTest
        org.apache.woden.tests.OMW3CTestSuiteTest
        org.apache.woden.wsdl20.xml.OMServiceElementTest
        org.apache.woden.wsdl20.xml.OMEndpointElementTest

        Show
        Oshani Seneviratne added a comment - ********************************** TestsForOMParser.patch ********************************** This patch contains unit tests for the OM parser. Specifically, the following files are introduced with it: org.apache.woden.tests.AllWodenTestsOM org.apache.woden.OMWSDLFactoryTest org.apache.woden.OMWSDLReaderTest org.apache.woden.tests.OMW3CTestSuiteTest org.apache.woden.wsdl20.xml.OMServiceElementTest org.apache.woden.wsdl20.xml.OMEndpointElementTest
        Oshani Seneviratne made changes -
        Attachment TestsForOMParser.patch [ 12336436 ]
        Hide
        Oshani Seneviratne added a comment -

        ***********************************************
        OMWSDLReader-additions.patch
        ***********************************************

        This patch contains these additions to the OMWSDLReader:

        parseImport
        parseInclude
        readWSDL(uri, errorHandler)
        getWSDLFromLocation

        And some changes to the way <schema> element is handled with OM in the parseSchemaInline method.

        Show
        Oshani Seneviratne added a comment - *********************************************** OMWSDLReader-additions.patch *********************************************** This patch contains these additions to the OMWSDLReader: parseImport parseInclude readWSDL(uri, errorHandler) getWSDLFromLocation And some changes to the way <schema> element is handled with OM in the parseSchemaInline method.
        Oshani Seneviratne made changes -
        Attachment OMWSDLReader-additions.patch [ 12336440 ]
        Hide
        Oshani Seneviratne added a comment -

        ***************************
        TestsAndAdditions.patch
        ***************************

        This patch includes all the changes that I have documented for 'TestsForOMParser.patch' and 'OMWSDLReader-additions.patch'.

        ***
        In addition to those changes included in the above 2 patches, I have also made the following modifications to the code:

        1. AllWodenTestsDOM - This includes the original tests for the DOM parser.
        2. AllWodenTestsOM - This includes tests for the StAX/OM parser.
        3. AllWodenTests -This includes both AllWodenTestsDOM and AllWodenTestsOM, and in the future this class could be used to have test cases that are common to both the parsers.
        For the discussion about the above separation please see [1].

        ***
        The classpath entries and the build.xml were changed to include the following jars in Woden. These jars are required by the StAXOMBuilder for reading a WSDL into AXIOM.
        axiom-api-1.0.jar
        axiom-impl-1.0.jar
        commons-logging-api-1.1.jar
        stax-api-1.0.1.jar
        wstx-asl-2.9.3.jar

        ***
        Added 2 more tasks to the Ant script.
        1. runTestsDOM - This would run AllWodenTestsDOM
        2. runTestsOM - This would run AllWodenTestsOM

        The 'runTests' ant task would run 'AllWodenTests', which includes tests for both DOM and OM.

        ***

        Please apply this patch at the Woden root directory.

        <WODEN_ROOT>$patch -p0 -i TestsAndAdditions.patch
        would do the trick!

        Thanks!
        ___________________________

        [1] http://mail-archives.apache.org/mod_mbox/ws-woden-dev/200607.mbox/%3cadbf02b10607050202q527cfcaao2e7e7fc19928be41@mail.gmail.com%3e

        Show
        Oshani Seneviratne added a comment - *************************** TestsAndAdditions.patch *************************** This patch includes all the changes that I have documented for 'TestsForOMParser.patch' and 'OMWSDLReader-additions.patch'. *** In addition to those changes included in the above 2 patches, I have also made the following modifications to the code: 1. AllWodenTestsDOM - This includes the original tests for the DOM parser. 2. AllWodenTestsOM - This includes tests for the StAX/OM parser. 3. AllWodenTests -This includes both AllWodenTestsDOM and AllWodenTestsOM, and in the future this class could be used to have test cases that are common to both the parsers. For the discussion about the above separation please see [1] . *** The classpath entries and the build.xml were changed to include the following jars in Woden. These jars are required by the StAXOMBuilder for reading a WSDL into AXIOM. axiom-api-1.0.jar axiom-impl-1.0.jar commons-logging-api-1.1.jar stax-api-1.0.1.jar wstx-asl-2.9.3.jar *** Added 2 more tasks to the Ant script. 1. runTestsDOM - This would run AllWodenTestsDOM 2. runTestsOM - This would run AllWodenTestsOM The 'runTests' ant task would run 'AllWodenTests', which includes tests for both DOM and OM. *** Please apply this patch at the Woden root directory. <WODEN_ROOT>$patch -p0 -i TestsAndAdditions.patch would do the trick! Thanks! ___________________________ [1] http://mail-archives.apache.org/mod_mbox/ws-woden-dev/200607.mbox/%3cadbf02b10607050202q527cfcaao2e7e7fc19928be41@mail.gmail.com%3e
        Oshani Seneviratne made changes -
        Attachment TestsAndAdditions.patch [ 12336594 ]
        Jeremy Hughes made changes -
        Assignee John Kaputin [ jkaputin ] Jeremy Hughes [ hughesj ]
        Jeremy Hughes made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Jeremy Hughes added a comment -

        All patches applied. Please close if you agree.

        Show
        Jeremy Hughes added a comment - All patches applied. Please close if you agree.
        Jeremy Hughes made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        John Kaputin added a comment -

        Oshani, can we close this JIRA now?

        Show
        John Kaputin added a comment - Oshani, can we close this JIRA now?
        Hide
        Oshani Seneviratne added a comment -

        Sure. Please feel free to close this issue.

        Show
        Oshani Seneviratne added a comment - Sure. Please feel free to close this issue.
        John Kaputin made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jeremy Hughes
            Reporter:
            Oshani Seneviratne
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development