Java Reference
In-Depth Information
provided as argument. This structure representation allows NuSOAP
to serialize this argument into an XML document such
as: “<objectFilter> <type>model</type> </objectFilter>” or
“<objectFilter type 5 “model”/>” when needing to generate the
SOAP body.
If you use a debugging probe to track the SOAP requests on port
1234 of the machine MyHost, the call at line 71 will be translated into
the following SOAP request:
<?xml version "1.0" encoding "ISO-8859-1"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle http://schemas.xmlsoap.org/soap/encoding/
xmlns:SOAP-ENV http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsd http://www.w3.org/2001/XMLSchema
xmlns:xsi http://www.w3.org/2001/XMLSchema-instance
xmlns:SOAP-ENC "http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<listContents xmlns: "http://www.jsr-73.org/2004/webservices">
<objectFilter> <type xsi:type "xsd:string">model</type> </objectFilter>
</listContents>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In the preceding code, we retrieve the SOAP body representing
the call to listContents with the argument objectFilter set to “model.”
For arguments with simple structure, it is much more convenient to
use the formulation used at line 79.
14.1.4
Executing RecordApplyTask on Models
NuSOAP applies the same principle for structures that are returned
from Web service invocations. The call to listContents returns a
sequence of MiningObjectHeader , which is stored in a variable called
“$ModelsList.” MiningObjectHeader is an extension of MiningObject
with no specific attributes. So it contains a description, name, type,
creatorInfo, creationDate, and objectIdentifier . NuSOAP will translate
the returned XML document into an array. In this case, this array
represents a list of models, which can be accessed by position. Each
position contains a MiningObjectHeader representation providing
access to the description, name, type, and so on. Line 81 defines the
prefix used to select the models of interest from the MOR.
As seen in the screenshot in Figure 14-2, all probabilities of models
will be shown in an HTML table that is prepared by lines 82 and 83 in
 
Search WWH ::




Custom Search