To use the Java programming language to develop your applications and the .NET version is 4.0 or earlier on the Mirage Server, you must perform certain tasks to set up a Java development environment.
Procedure
Results
With the generated classes, you can login to Mirage API. For example:
client = new MitServiceStub("https://server-address:7443/mirageapi/MitService.svc");
final SSLContext sslCtx = SSLContext.getInstance("TLS");
sslCtx.init(null, new TrustManager[] { new TrustAllTrustManager() }, null);
client._getServiceClient()
.getOptions()
.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, new Protocol("https", (ProtocolSocketFactory) new SSLProtocolSocketFactory(sslCtx), 7443));
final HttpState httpState = new HttpState();
client._getServiceClient().getOptions()
.setProperty(org.apache.axis2.transport.http.HTTPConstants.CACHED_HTTP_STATE, httpState);
final Login login = new Login();
login.setUsername(“username”);
login.setPassword(“password”);
client.login(login);
//Perform tasks