[英]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.