简体   繁体   English

将请求从一个Web服务转发到另一个

[英]Forwarding requests from one web service to another

So the case is the following: 因此,情况如下:

I have an application that communicates with a JAX-RPC web service (Hosted in an .ear package on a JBoss server). 我有一个与JAX-RPC Web服务通信的应用程序(托管在JBoss服务器上的.ear软件包中)。 We had a requirement of moving all the operations in this web service to a new one with a new name, keeping in mind that we should keep our backward compatibility with clients with the old web service stub. 我们需要将该Web服务中的所有操作转移到一个具有新名称的新操作中,同时请记住,我们应该使用旧的Web Service存根与客户端保持向后兼容性。 The idea is that I shouldn't keep the logic of the operations in both web services, and instead, try to forward the requests for older clients from the old web service to the new one. 我的想法是,我不应该在两个Web服务中都保留操作逻辑,而是尝试将对旧客户端的请求从旧Web服务转发到新Web服务。 I found a solution, but I don't know what are its downsides: I kept the skeleton of the operations in the old web service, and in my ejbCreate(), I created an instance of the bean of the new web service, and now all I do is invoking the operations of the new web service using this bean instance (passing the same arguments as received from the client without running any logic). 我找到了一个解决方案,但是我不知道它有什么缺点:我将操作的框架保留在旧的Web服务中,并在ejbCreate()中创建了新Web服务的bean实例,并且现在,我要做的就是使用此bean实例调用新Web服务的操作(传递与从客户端接收的参数相同的参数,而无需运行任何逻辑)。 Is my solution valid? 我的解决方案有效吗? Are there any better alternatives? 有更好的选择吗?

why not to use ws-addressing? 为什么不使用ws寻址? did you read about it ? 你读过吗? (honestly I never used it, but I know it can be used to proxy requests) (老实说,我从未使用过它,但是我知道它可以用来代理请求)

Old thread, but here is a better answer for fellow googlers: 旧线程,但是对于其他Google员工来说,这是一个更好的答案:

Check out membrane-soa reverse proxy: http://www.membrane-soa.org/reverse-soap-proxy.htm 请查看film-soa反向代理: http : //www.membrane-soa.org/reverse-soap-proxy.htm

To solve the exact problem in question check this doc: http://www.membrane-soa.org/service-proxy-doc/4.0/soap-quickstart.htm 要解决有问题的确切问题,请检查以下文档: http : //www.membrane-soa.org/service-proxy-doc/4.0/soap-quickstart.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从另一个调用Web服务 - Calling Web Service from another one 重定向/转发SOAP Web服务请求到另一个Web服务 - Redirect/Forward SOAP Web Service Requests to another Web Service 如何将数据从一个Web服务发送到另一个? - How to send data from one web service to another? 如何从另一个Web服务调用一个Web服务(在同一个WAR中) - How can I call one web-service from another web-service (within in the same WAR) 使用所有请求参数将请求从一个jsp转发到另一个jsp? - Forwarding the request from one jsp to another jsp with all request parameters? 从一种控制器方法到另一种方法的内部转发(Spring-MVC) - Internal forwarding from one controller method to another (Spring-MVC) 请求属性在从一个 Servlet 转发到另一个 Servlet 的过程中丢失 - Request Attributes are lost during forwarding from one Servlet to another Servlet 使用请求调度程序将请求从一个 servlet 转发到另一个 - Forwarding a request from one servlet to another using Request dispatcher 从Java类中依次调用url以进行登录,并从另一个进行web服务调用 - calling url from java class one after another one for logging in and another for web service call 通过另一台服务器转发Java HTTP请求 - Forwarding Java HTTP Requests through another server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM