[SWS-696] Xpath namespace declarations duplication Created: 23/Feb/11  Updated: 24/Mar/11

Status: Open
Project: Spring Web Services
Component/s: XML
Affects Version/s: 2.0 GA
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: omar elmandour Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
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;
 



 Comments   
Comment by Arjen Poutsma [ 24/Mar/11 ]

Note that you can still stick to the 1.5 version of the XSD, which still works.

Generated at Sat Dec 16 16:56:32 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.