Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-696

Xpath namespace declarations duplication

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0 GA
    • Fix Version/s: None
    • Component/s: XML
    • Labels:
      None
    • Environment:
      windows xp

      Description

      In the earlier Spring ws version like in 1.5 it was possible for xpath to define nameSpace like this :

       <sws:xpath-endpoints>
          <sws:namespace uri="http://ws.scribe.recouv.fr/definition/modeles-v1.0" prefix="modv1.0"/>
        </sws:xpath-endpoints>

      This is not more present in
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd.

      1-Not retro compatible

      So if someone try to upgrade to the latest version, the sws:xpath-endpoints is not more present.
      So he have to declare the bean
      org.springframework.ws.server.endpoint.adapter.XPathParamAnnotationMethodEndpointAdapter.

      I was thinking that this element was remove because this class XPathParamAnnotationMethodEndpointAdapter was remove too.
      But that is no the case.It is deprecated.

      2-So the actual solution is to upgrade to DefaultMethodEndpointAdapter according to the documentation.

      Now we have this issue : it is not possible to declare the namespace globally like previously.

      We have to use @org.springframework.ws.server.endpoint.annotation.Namespace(s) instead.

      Let say that i have a package organizing like this :

      Package organisation

      org.lightfoods
        +kebab
           +Endpoint1
           +package-info.java
        +frenchFries
           +Endpoint2
           +package-info.java

      Enpoint1 and enpoint2 were using the namespace modv1.0 with @XPathParam.
      Now i have to declare informations in two package-info.java to make it work.

      For example for the package tomato i will be :

      @org.springframework.ws.server.endpoint.annotation.Namespaces(
      value = 
      {
      @org.springframework.ws.server.endpoint.annotation.Namespace(uri = "http://ws.scribe.recouv.fr/definition/instances-v1.0",prefix="modv1.0")   
      }
      )
      package org.vegetable.tomato;
       

        Activity

        No workflow transitions have been executed yet.

          People

          • Assignee:
            Unassigned
            Reporter:
            ramo omar elmandour
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: