Java Reference
In-Depth Information
Many classes are generated; these can be grouped as follows:
23 classes associated with the possible services to execute.
4 classes for locating the data mining server ( DataMiningSer- and ) and sending the
Web services messages ( and IDataMining- ).
157 beans classes corresponding to all complex types defined
in the XML schema.
Before using the generated classes, you must edit the default specifi-
cation of the address to connect to a live JMDWS implementation in
the file ,
using the member variable IDataMiningPort_address . Here is an exam-
ple corresponding to the same address as the PHP client application
(the argument of the “new SOAP client” in the previous example):
// Use to get a proxy class for IDataMiningPort
private java.lang.String IDataMiningPort_address "http:// MyHost:1234/KxServices/
Opening the Connection to a JDMWS Live Server
Once you have generated the service and bean classes, you can start
writing the Java client. Here is a step-by-step procedure to develop
your first Java Web service client to build a model. All methods pro-
vided below belong to a single class representing your simple Java
client application.
The first step is to get a DME connection stub. You will then have
a reference to the data mining services. Thanks to the Axis tool, all
elements needed to connect to the server are already set in the
skeleton classes. The following code is equivalent to connecting to a
Web service provider, which in turn provides you access to a DME.
1. private IDataMining initiateConnection() throws ServiceException {
DataMiningService lServiceProvider new DataMiningServiceLocator();
IDataMining lServices lServiceProvider.getIDataMiningPort();
return lServices;
5. }
In this simple method, getting a service stub is simple; there is no
need for advanced knowledge of the JDM XML structure, as was the
Search WWH ::

Custom Search