Java Reference
In-Depth Information
Line 9 of createBuildSettings is using a generic method called
askToSaveObject . The method askToSaveObject has been defined in
our example to save any named object to the MOR, forcing to over-
write existing objects (line 7) and asking for verification (line 8).
Because of this verification, we need to be able to get back the verifi-
cation report returned by the saveObject service invocation at line 10
if the verification was not successful as shown at line 13. Again, we
see that Axis has streamlined the XML Schema into Java classes for
the Java programmer to easily set and get subsections of this
schema; this reduces the time needed to write client applications.
1.
protected static void askToSaveObject(MiningObject iMiningObject,
2.
String iName, IDataMining iServices)
3.
throws RemoteException {
4.
SaveObject lSaveObject new SaveObject();
5.
lSaveObject.setObject(iMiningObject);
6.
lSaveObject.setObjectName(iMiningObject.getName());
7.
lSaveObject.setOverwrite(new Boolean(true));
8.
lSaveObject.setVerify(new Boolean(true));
9.
SaveObjectResponse lSaveObjectResponse
10.
iServices.saveObject(lSaveObject);
11.
if (lSaveObjectResponse! null) {
12.
System.out.println("Verification Report: "
13.
lSaveObjectResponse.getReport().getReportText());
14.
} else {
15.
System.out.println("No object returned");
16.
}
17.}
We will use the askToSaveObject again in other parts of this
example.
14.2.4
Creating a PhysicalDataSet
Creating a PhysicalDataSet from its URI is straightforward, provided
that you know the specific URI format used by the implementation
of the JDMWS. This means that it is likely that you will have to
change the code at line 5. Because the JDM WSDL uses the generic
URI type, Axis has translated this into a generic URI Java object. The
last operation of this method is to save the object into the MOR, as
shown at line 8.
Search WWH ::




Custom Search