Java client syntax

java -cp build/smilewsv2-client.jar [options] className parameters

The Java client is an application that lets you call methods in the SOAP API.

options syntax

Options provide additional information about how the Java client connects to the API. If you do not specify an option, the Java client uses the default (underlined) value.

Each option has the following syntax: -DoptionName=value

smile.soap.insecure
Values: true, false
Purpose: Specifies if the Java client uses insecure communication, that is, ignores invalid and unverified certificates.
smile.soap.url
Values: http://localhost:8080/smile/ws/v2/
Purpose: Specifies the URL and port that the Java client connects to.
smile.soap.username
Values: soap@inomial.com
Purpose: Specifies the username that the Java client uses to connect to the API.
smile.soap.password
Values: No default.
Purpose: Specifies the password that the Java client uses to connect to the API.

className and parameters syntax

The values for each class name and its parameters are documented with the SOAP method that they call. The /client.ws.smile.inomial.com/examples directory contains sample XML files for some methods.

Example: Use the Java client to raise a ticket

This example calls the raiseTicket() method in the CRM endpoint and specifies four options: insecure communication, the URL the Java client connects to, and the username and password the Java client uses to connect to the API.

java -cp build/smilewsv2-client.jar -Dsmile.soap.insecure=true 
-Dsmile.soap.url="https://localhost/ws/v2" 
-Dsmile.soap.username=soap@example.com 
-Dsmile.soap.password='pa55w0rd' 
com.inomial.smile.client.v2.examples.RaiseTicket 
123 2112345678 examples/test-raiseTicket.xml
Note: For more information about the class name and parameters the Java client uses in this command, see raiseTicket().