读书人

How do I develop a client

发布时间: 2013-07-11 15:38:46 作者: rapoo

How do I develop a client?
Client client = ....;Object[] result = client.invoke("sayHi", "Dan");

There are two ways to create Clients at runtime. The first choice is to use the ClientFactoryBean or JaxWsClientFactoryBean classes. These will create proxy objects for the SEI for the service. These proxies cannot handle complex objects.

The second to use the DynamicClientFactory or one of its subclasses. The DynamicClientFactory goes the additional step of generating and compiling JAXB POJOs for complex objects described in the WSDL, for use at runtime via reflection.

This is most useful when you're using a dynamic language such as Groovy with CXF, but it is possible to use reflection directly from Java.

More Information: Dynamic Clients

读书人网 >开源软件

热点推荐