使用Spring Web服务进行HTTP / XML绑定 [英] HTTP/XML Binding with Spring Web services

查看:205
本文介绍了使用Spring Web服务进行HTTP / XML绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事网络服务POC。我需要开发一个基于Spring的Web服务,它使用XML / HTTP,即 HTTP绑定 (不是SOAP / HTTP)因此我可以调用带有URL参数的Web服务,例如WSDL中描述的一个示例规范尤其是带有查询参数的GET。

I am working on web services POC. I need to develop a Spring-based web services, that use XML/HTTP i.e. HTTP binding (NOT SOAP/HTTP) so that I can invoke a web-service with URL parameters like the one example described in the WSDL specification especially a GET with query parameters.

我无法将URL的查询参数映射到端点(@EndPoint) )方法参数。

I am unable to map the URL's query-parameter to the end-point's (@EndPoint) method parameter.

是否可以使用spring-ws开发这样的Web服务(XML / HTTP绑定)?
是否可以使用GET请求+查询字符串调用此类服务​​?

Is it possible to develop such a web-service (XML/HTTP bound) with spring-ws? Is it possible to invoke such a service with GET request + query string?

让我知道任何此类示例/教程。

Let me know for any such examples/tutorials.

推荐答案

请看一下这个页面( http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch18s02。 HTML )。假设你正在使用spring 3,我相信你应该在那里找到一些解脱。

Please take a look at this page (http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch18s02.html). Assuming that you are using spring 3, I believe you should find some relief there.

基于你的问题,我假设你已经在web.xml中声明并映射了DispatcherServlet 。那么,诀窍就是拉出论点。该页面显示了如何从URL(我认为是你的目标)和请求正文中提取参数。

Based your question, I assume you already have the DispatcherServlet declared and mapped in web.xml. The trick, then, is to pull out the arguments. The page indicates how to pull arguments from both the URL (which I believe is your goal) and from the request body.

祝你好运,如果有什么不清楚,请回信。

Good luck and write back if anything is unclear.

这篇关于使用Spring Web服务进行HTTP / XML绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆