Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5 M1
    • Component/s: None
    • Labels:
      None

      Description

      Adding a Spring 2 NamespaceHandler can greatly reduce the amount of XML needed to configure Spring-WS.

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I've focussed on the OXM Namepace for now. Here is what works so far

        <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:oxm="http://www.springframework.org/spring-ws/schema/oxm" xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/spring-ws/schema/oxm http://www.springframework.org/spring-ws/schema/oxm/spring-oxm-1.1.xsd">

        <oxm:jaxb1-marshaller id="jaxb1Marshaller" contextPath="org.springframework.oxm.jaxb1"/>

        <oxm:jaxb2-marshaller id="jaxb2Marshaller">
        <oxm:class name="org.springframework.oxm.jaxb2.Flights"/>
        <oxm:class name="org.springframework.oxm.jaxb2.FlightType"/>
        </oxm:jaxb2-marshaller>

        <oxm:jibx-marshaller id="jibxMarshaller" target-class="org.springframework.oxm.jibx.Flights"/>

        <oxm:xmlbeans-marshaller id="xmlBeansMarshaller"/>

        </beans>

        I've decided not to add handlers for Castor and XStream, since these marshallers just have too many configuration properties to facilitate a namespace.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I've focussed on the OXM Namepace for now. Here is what works so far <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oxm="http://www.springframework.org/spring-ws/schema/oxm" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/spring-ws/schema/oxm http://www.springframework.org/spring-ws/schema/oxm/spring-oxm-1.1.xsd "> <oxm:jaxb1-marshaller id="jaxb1Marshaller" contextPath="org.springframework.oxm.jaxb1"/> <oxm:jaxb2-marshaller id="jaxb2Marshaller"> <oxm:class name="org.springframework.oxm.jaxb2.Flights"/> <oxm:class name="org.springframework.oxm.jaxb2.FlightType"/> </oxm:jaxb2-marshaller> <oxm:jibx-marshaller id="jibxMarshaller" target-class="org.springframework.oxm.jibx.Flights"/> <oxm:xmlbeans-marshaller id="xmlBeansMarshaller"/> </beans> I've decided not to add handlers for Castor and XStream, since these marshallers just have too many configuration properties to facilitate a namespace.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I've added a Spring-WS namespace as well:

        <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:sws="http://www.springframework.org/spring-ws/schema/sws" xsi:schemaLocation="
        xmlns:oxm="http://www.springframework.org/spring-ws/schema/oxm" xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/beans/spring-tx-2.0.xsd
        http://www.springframework.org/spring-ws/schema/sws http://www.springframework.org/spring-ws/schema/sws/spring-ws-1.1.xsd
        http://www.springframework.org/spring-ws/schema/oxm http://www.springframework.org/spring-ws/schema/oxm/spring-oxm-1.1.xsd">

        <sws:marshalling-endpoints/>

        <oxm:jaxb2-marshaller id="marshaller" >

        <sws:xpath-endpoints>
        <sws:namespace prefix="sws" uri="http://www.springframework.org/spring-ws"/>
        </sws:xpath-endpoints>

        </beans>

        <sws:marshalling-endpoints/> is resolved into a MarshallingMethodEndpointAdapter; <sws:xpath-endpoints/> into a XPathParamAnnotationMethodEndpointAdapter.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I've added a Spring-WS namespace as well: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sws="http://www.springframework.org/spring-ws/schema/sws" xsi:schemaLocation=" xmlns:oxm="http://www.springframework.org/spring-ws/schema/oxm" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/beans/spring-tx-2.0.xsd http://www.springframework.org/spring-ws/schema/sws http://www.springframework.org/spring-ws/schema/sws/spring-ws-1.1.xsd http://www.springframework.org/spring-ws/schema/oxm http://www.springframework.org/spring-ws/schema/oxm/spring-oxm-1.1.xsd "> <sws:marshalling-endpoints/> <oxm:jaxb2-marshaller id="marshaller" > <sws:xpath-endpoints> <sws:namespace prefix="sws" uri="http://www.springframework.org/spring-ws"/> </sws:xpath-endpoints> </beans> <sws:marshalling-endpoints/> is resolved into a MarshallingMethodEndpointAdapter; <sws:xpath-endpoints/> into a XPathParamAnnotationMethodEndpointAdapter.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Resolving for now. We might add more namespaces later in the 1.5 timeframe, but this will do for now.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Resolving for now. We might add more namespaces later in the 1.5 timeframe, but this will do for now.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing issues for 1.5.0 M1

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.0 M1
        Hide
        david@davidkarlsen.com David J. M. Karlsen added a comment -

        Should there be added any doc to the reference manual for this? There doesn't seem to exist any.

        Show
        david@davidkarlsen.com David J. M. Karlsen added a comment - Should there be added any doc to the reference manual for this? There doesn't seem to exist any.

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            arjen.poutsma Arjen Poutsma
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: