|
Page Edited :
CXF20DOC :
Dynamic Clients
Dynamic Clients has been edited by Christian Schneider (Jul 25, 2007). Content:CXF provides several ways to invoke services dynamically at runtime - that is, without generating a client from the WSDL. This guide covers usage of the Client interface to interact with a service. Another option you may wish to investigate is the JAX-WS Dispatch API. Sometimes when you work with web services, you don't want to have to generate a client at build time. Its much more convenient to create a client at runtime and use it dynamically. CXF includes a Client interface which allows you to invoke operations and pass parameters for those operations. For instance: Client client = ....; Object[] result = client.invoke("sayHi", "Dan"); There are two ways to create Clients. The first would be through the ClientFactoryBean and JaxWsClientFactoryBean classes. The second is through the DynamicClientFactory. The DynamicClientFactory goes the additional step of generating and compiling JAXB POJOs in the background for use at runtime via reflection. This is most useful when you're using a dynamic language such as Groovy with CXF.
|
Unsubscribe or edit your notifications preferences
