首先,你可以提供一个代理需要实现的接口,并通过该接口从客户端应用程序中访问代理。
First of all, you can provide an interface that the proxy needs to implement and access the proxy from the client application through that interface.
它提供了一层抽象,解耦了客户端代码与要访问的服务及其位置与底层实现。
It provides a layer of abstraction to decouple client code from access to a service, as well as its location and underlying implementation.
如果您重新访问清单12中的示例SOAP客户端,您将看到展示它的实现方法的一个例子。
If you revisit the example SOAP client in Listing 12, you'll see an example of how this can be done.
应用推荐