Skip to end of metadata
Go to start of metadata

Client Overview

The XFire Core contains classes which function as SOAP and REST clients. Currently there is only a prebundled client for the XMLBeans module. You can use this client via the API and you can also generate a client from a WSDL file. To learn more see section on XMLBeans Client Generator.

If you wish to use the SOAP/REST clients without XMLBeans, read on to learn how to create a ClientHandler of your own.

Writing a ClientHandler

A ClientHandler generates a request and parses a response. You pass this handler to the SoapClient constructor. When the service is invoked() it will delegate the generation of the SOAP Body request and parsing of the response Body to your handler.

For instance:

A client handler must implement the following interface:

The above is pretty straight forard. We are serializing the request object and deserializing the respone object. To use this handler, it would look something like this:

Labels
  • None