Test Client
A sample http test client implemented in Java is provided below. You can access this client on the support site: https://support.Ivanti.com/support/clients/mobileiron-api-httpclient.zip.
1. | Unzip the file, mobileiron-api-httpclient.zip . Below is the directory structure of the test client. |
client |-- pom.xml `-- src |-- main | |-- java | | `-- com | | `-- mobileiron | | |-- rs | | | `-- client | | `-- ws | | `-- client | | `-- http | | |-- AlertWebServiceHttpClient.java | | |-- AppStoreWebServiceHttpClient.java | | |-- DMWebServiceHttpClient.java | | |-- EASWebServiceHttpClient.java | | |-- MAIWebServiceHttpClient.java | | |-- SMWebServiceHttpClient.java | | `-- WebServiceHttpClientBase.java | `-- resources | |-- applicationContext-miws-client.xml | |-- miws-client.properties | `-- miws-v1.wadl `-- test |-- java | `-- com | `-- mobileiron | |-- rs | `-- ws | `-- client | `-- http | `-- WebServiceHttpClientTest.java `-- resources `-- log4j.xml
2. | Edit the properties in miws-client.properties under src/main/resources. |
webservice.hostname=<your mobileiron appliance host name or IP Address>
webservice.url=/api
webservice.version=/v1
user name who has the ‘API’ role assigned. See Chapter- 2 Authentication
webservice.username=miadmin
Password of the above user.
webservice.password=<password>
3. | Change directory to client and execute maven to build and run the test client. |
cd client
mvn clean install
The above mvn command will do a clean build and execute the test client. The output of the tests are printed on the console and to a file named miws-test.log in the ‘client’ directory.