Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The InTime Web Service uses the Simple Object Access Protocol (SOAP) interface as opposed to REST. This is a stricter protocol than REST which means you can only call the defined methods available and the return types will be in a fixed format. Normally you would start by building "stub" code against the WSDL file that defines the interface.

The NEWEST WSDL Version: https://your_system_url.com/services/IntimeServiceV2_5?wsdl

Java Example

This examples was written using the WSDL file for version 2.0 of the web services can be accessed hereon our demo systemhttps://demo.in-time.co.uk/services/IntimeServiceV2_0?wsdl

Various tools are available for building the stub code. wsdl2java in  in the axis 2 package works well for java development:

...

Include and reference these files in your application and you will be able to make calls to the Web Services. Some examples are given below.

Java Code Examples

It is important to enclose your web service calls in try / catch blocks as Exceptions are used as the mechanism for feeding back any issues. For example if you attempt to create a placement without providing an External ID, an exception will be returned from the Web Service call with an appropriate message. 

Java Code

Authenticate

try {

//Create an instance of the stub

IntimeServiceV2_0Stub stub = new IntimeServiceV2_0Stub("https://demo.in-time.co.uk/services/IntimeServiceV2_0?wsdl");


//Get an authentication token

IntimeServiceV2_0Stub.Authenticate auth=new IntimeServiceV2_0Stub.Authenticate();

auth.setAgencyRefCode("<supplied_credentials>");

auth.setUsername("<supplied_credentials>");

auth.setPassword("<supplied_credentials>");

IntimeServiceV2_0Stub.AuthenticateResponse authResp=stub.authenticate(auth);

String ticket=authResp.get_return();

System.out.println("Authentication token:" + ticket);

//Use this authentication token (ticket) to pass in to any of the other WebService calls

} catch (java.lang.Exception e) {

System.out.println("Exception occurred: " + e);

}

...