bonjour,

j'essai de faire le mapping des endpoints en utilisant xpath mais a chaque fois j'obtient cette erreur. Il doit s'agir d'une erreur de l'expression portant sur le namespace mais je n'arrive pas à la localiser
ma servlet-ws est la suivante
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
<bean id="xpathPayloadMapping"
		class="org.springframework.ws.server.endpoint.mapping.XPathPayloadEndpointMapping" >
		<property name="namespaces">
			<props>
				<prop key="http://www.ssss.com/ws/service">service</prop>
			</props>
		</property>
		<property name="expression" value="//ActivateServiceRequest/serviceId/text()" />
 
		<property name="order" value="1"></property>
		<property name="mappings">
			<props>
				<prop key="HZONE" >
					addHZNumberEndpoint
				</prop>
 
			</props>
		</property>
 
	</bean>
 
 
	<bean id="addHZNumberEndpoint"
		class="com.ssss.jumbo.happyzone.webservice.endpoint.AddHZNumberEndpoint" />
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xpathPayloadMapping' defined in ServletContext resource [/WEB-INF/springws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.xpath.XPathParseException: Could not compile [//ws:ActivateServiceRequest/ws:serviceId/text()] to a XPathExpression: null; nested exception is javax.xml.xpath.XPathExpressionException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:354)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:292)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:262)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:808)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.xml.xpath.XPathParseException: Could not compile [//ws:ActivateServiceRequest/ws:serviceId/text()] to a XPathExpression: null; nested exception is javax.xml.xpath.XPathExpressionException
	at org.springframework.xml.xpath.Jaxp13XPathExpressionFactory.createXPathExpression(Jaxp13XPathExpressionFactory.java:85)
	at org.springframework.xml.xpath.XPathExpressionFactory.createXPathExpression(XPathExpressionFactory.java:93)
	at org.springframework.ws.server.endpoint.mapping.XPathPayloadEndpointMapping.afterPropertiesSet(XPathPayloadEndpointMapping.java:85)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
	... 29 more
Caused by: javax.xml.xpath.XPathExpressionException
	at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:402)
	at org.springframework.xml.xpath.Jaxp13XPathExpressionFactory.createXPathExpression(Jaxp13XPathExpressionFactory.java:81)
	... 33 more
Caused by: com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Le préfixe doit se convertir en espace de noms : ws
	at com.sun.org.apache.xpath.internal.compiler.XPathParser.errorForDOM3(XPathParser.java:653)
	at com.sun.org.apache.xpath.internal.compiler.Lexer.mapNSTokens(Lexer.java:638)
	at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:265)
	at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:96)
	at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:110)
	at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:176)
	at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:264)
	at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:394)
	... 34 more
[27/01/2009 16:51:40]-[RequestContextListener] Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@6b2ab7