Chapter 5 Client Design
215
Note in Figure 5.6 that a client accesses a Web service via the client side rep 
resentation of the service endpoint interface, while the JAX RPC runtime handles
the work of communicating with the respective service. A developer programs
against an interface, which provides a flexible way to access a service in a porta 
ble fashion.
E
Consider using the dynamic proxy approach if portability is important to your 
application, since this approach uses the service's endpoint interface to com 
municate with a service at runtime. Dynamic proxy communication is the most 
portable mode across JAX RPC implementations. 
E
Because of how they access a service at runtime, dynamic proxies may have 
additional overhead when calls are made. 
5.3.1.3
Using DII Call Interface
A client application may also dynamically access a Web service by locating the
service at runtime from a registry. The client does not know about the service when
it is compiled; instead, the client discovers the service's name from a JAXR registry
at runtime. Along with the name, the client discovers the required parameters and
return values for making a call to the service. Using a dynamic invocation interface,
the client locates the service and calls it at runtime. 
Generally, using DII is more difficult for a developer. A developer must work
with a more complex interface than with stubs or dynamic proxies. Not only does
this interface require more work on the part of the developer, it is more prone to
class cast exceptions. In addition, the DII approach may have slower access. A
developer may choose to use the DII approach when a complete WSDL document
is not available or provided, particularly when the WSDL document does not
specify ports. The DII approach is more suitable when used within a framework,
since from within a framework, client applications can generically and dynami 
cally access services with no changes to core application code.
Figure 5.7 shows how a client uses the JAXR API to look up the endpoint
WSDL for a service in a registry. The client uses the information from the registry
to construct a j
avax.xml.rpc.Call
, which it uses to access the Web service.






New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

java web hosting

 

 

 Our partners: | PHP: Hypertext Preprocessor | Best Web Hosting | Java Servlet Web Hosting | Inexpensive Web Hosting |

Jsp Web Hosting | Cheapest Web Hosting | Jsp Hosting | Cheap Hosting

 

Virtualwebstudio. Business web hosting division of Web Design Plus. All rights reserved