HTTP/XML Binding with Spring Web services

北城以北 提交于 2019-12-23 04:36:51

问题


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.

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

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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/10574352/http-xml-binding-with-spring-web-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!