Web Services Client

This schema library includes a simple client framework for SOAP and RESTful web services.

The client framework contains utility methods to send RESTful messages, wrap a message in a SOAP envelope and do testing. It's easy to send a messages and receive the response.

Included in the client framework are utilities to manipulate and check namespace aware XML schema. You can easily convert your JiBX object tree to XML or DOM and back to JiBX. You can convert your XML using XSL Transformation. You can also search your XML trees using XPATH.

These utilities make creating a web-services client quick and easy.

These tools also make the client library the perfect toolbox to create your client test cases. The client library has a utility that can read XML message files from the local classpath storage and send them to your test service.

For more detailed explanation, check out my blog here.

Client Web service example

Before running this client test, you must have a Web Service running. Set up the Web Services example or create a soapui server before running this example.

Running this example

Step 1: Download the test hotel client from our github repository: https://github.com/jibx/schema-library/tree/master/org.opentravel/_2013A/opentravel-ws/opentravel-hotel-ws-test-client.

Step 2: Move to the project directory and invoke maven.

 cd opentravel-hotel-ws-test-client
 mvn clean install -Dmaven.test.skip=false

That's it. You should see some sample SOAP and REST requests and replies and some messages indicating that the test ran okay. If you look at the server console, you should see a message complaining about an invalid message that I purposefully sent.

Voilà