我使用的是Spring 2.5.6,Spring-ws 1.5.9和Stripes 1.5.6。
我有一个正在使用xml解析等工作的web服务。我不会详细介绍这个,因为我不认为这是问题所在。
我正在开发一个新的ws,发现这个页面非常有用:http://jeromebulanadi.wordpress.com/2010/02/25/basic-spring-web-service-tutorial-from-contract-to-security/
...所以使用上面的示例来实现一个新的ws(该链接包含一个带有编组/解组对象的示例,而不是自己完成所有的xml)。
当连接到ws时,我收到此错误消息(来自Web服务模板 - 也在Spring中):
org.springframework.ws.client.WebServiceTransportException: Not Found [404]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:351)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:345)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
来电来自我的模板,我这样打电话:
GetSignalsByCprRequest request = new GetSignalsByCprRequest();
request.setCpr(new BigInteger(cpr));
GetSignalsByCprResponse response = (GetSignalsByCprResponse) getWebServiceTemplate().marshalSendAndReceive(request);
更大的堆栈跟踪是:
21-09-2011 11:16:35 INFO com.mydomain.ws.client.SignalsTemplateImpl - Entering getSignals(..) in SignalsTemplateImpl
--- ENTER TEMPLATE ---
21-09-2011 11:16:35 TRACE net.sourceforge.stripes.controller.StripesFilter - Intercepting request to URL: /salesoverview-ws-war/services
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.StripesFilter - LocalePicker selected locale: da_DK
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.StripesFilter - LocalePicker did not pick a character encoding, using default: UTF-8
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.UrlBindingFactory - No URL binding matches /salesoverview-ws-war/services
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.UrlBindingFactory - No URL binding matches /salesoverview-ws-war/services
org.springframework.ws.client.WebServiceTransportException: Not Found [404]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:351)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:345)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
“---输入模板---”打印在创建请求/响应的正上方。错误发生在 GetSignalsByCprResponse response =(GetSignalsByCprResponse)getWebServiceTemplate()。marshalSendAndReceive(request); 我很空白 - 我不知道该去哪里。我有一点想法,肥皂消息不包含命名空间或Stripes捕获请求 - 基于堆栈跟踪... Stripes正在使用 DynamicMappingFilter ,从而将url-pattern映射到 / * - 可能是问题。
非常感谢任何想法或指示!
答案 0 :(得分:0)
似乎您的Stripes servlet正在处理您希望由将处理您的Web服务请求的Spring-ws servlet处理的URL。您可能想要检查web.xml中的<url-pattern>
。