中继SOAP请求(即充当代理的SOAP请求)

问题描述:

我正在为一个客户端的一个项目,他们有与SOAP服务器通信的多个应用程序,但是他们要求所有请求都走通的代理,并且希望能够在本地回答几个soap请求,然后如果它要求外部服务器基本上像代理一样从内部php服务器发送请求。所以软件的唯一通信就是重新路由的内部php服务器。中继SOAP请求(即充当代理的SOAP请求)

的设置如下:

1. Application makes call to 255.255.255.255 
2. Internal Routing redirects request to 192.168.1.2 (Internal Web Server) 
3. Internal Web server serves requests for the requested page 
    3a. If the Method requested can be answered local it needs to answer it, 
    3b. Or it needs to forward the whole original request to the outside server, wait for response then return the answer back to the Software as if it was serving the answer. 

这是否有意义,并没有任何人有如何在PHP页面做到这一点有什么建议?网络路由已经完成,并且软件正在被内部php页面回答,但是我无法让它转发请求。

3A的确定的范围之外,但在决定使用什么实施的重要组成部分;对于每个传输协议,您需要实现请求重写。如果只有HTTP传输,您可以用的fopen URL封装,这是不是在指定标题或使用cURL扩展方面非常灵活的使用。一旦获得了外部服务器的响应,只需写出数据即可。