Client Bindings

Every web service has a WSDL (Web Service Description Language) file associated with it. A WSDL description of a service defines, in a machine-understandable way, the interface to the service, the data types it uses, and where the service is located. This WSDL file can be used to automatically create the client stubs and bindings. These stubs can then be used from your application to access the web service. Any complex data types and faults will also be generated if the client-side tools supports it.

Java Bindings

To create a Java client for the XPI Web Services you'll need a web service toolkit. There are several available and you may choose the one that suits your needs best, but for this example we'll be using the JAX-WS version 2.2. Information and downloads can be found in https://jax-ws.java.net/.

JAX-WS tools are bundled with JDK 7, so no extra downloads are needed. To generate the client bindings execute the following command; with [WSDL-URL] as the complete URL to the service WSDL. You find the WSDL URL for the XPI services in the reference documentation.

wsimport -keep [WSDL-URL]

Wsimport has a lot of customization possibilities. This guide uses the default options. For more info on customization possibilities, see https://jax-ws.java.net.

All generated classes except WSException will assume the target name space as the package name. WSException will be created in the same package as the service, so there will be one in every service package.

.NET Bindings

For .NET bindings you can use "Add Service Reference" function from within Visual Studio to create the client bindings. Visual Studio cannot handle the way we share types between services, so there is an additional wsdl available, containing all the services to use with Visual Studio. The functionality is the same as in the other, the only difference is that it shares the wsdl. It is located here.

For more information see your .NET documentation.

Copyright © 1999-2023, Technology Nexus Secured Business Solutions AB. All rights reserved.