Java Reference
In-Depth Information
105.
$status $executeTaskResponse['status'];
106.
if ($status['!state'] "error") {
107.
echo '<h3>The execution of the task has failed with the message: '
108.
. $executeTaskResponse['description'] . '</h3>';
109.
die;
110.
} else if ($status['!state'] "success") {
111.
# echo '<h3>The execution of the task was a SUCCESS!</h3>';
112.
} else {
113.
echo '<h3>Returned object is not valid.</h3>';
114.
}
115.
$RecordValues $executeTaskResponse['recordValue'];
116.
$Value $RecordValues['value'];
117.
echo '<tr><td>'.$idx['!name'].'</td>';
118.
echo '<td>'.$Value['string'].'</td></tr>';
119.
}
120. }
121. echo '</table>';
122. unset($_POST);
123. }
124. ?>
125. </body>
126. </html>
This closes the product recommendation PHP file.
14.2
A Web Service Client in Java
Since this topic focuses on Java technology, we have decided to add a
section on how to write a Java client using JDM Web services. An
easy way to build a Web service client in Java is to use a Web service
framework. Chapter 11 presented JAX-RPC as one solution that gen-
erates the wrapper Java objects for the types defined in JDM WSDL
and XML Schema. JAX-RPC can be used to generate server imple-
mentations or client implementations. Another solution is Axis from
the Apache foundation. As the writer of a client application, you are
shielded from the implementation details of writing XML code and
SOAP-specific calls.
What is the usage of a Java client using Web services? Why not
directly use a Java client on top of JDM? One reason is the security
layers between the client and the server. The communication between
a Java JDM client and the DME uses middleware that is vendor
dependent. Some vendors could use Java RPC mechanisms; others
could embed the DME into a database using JDBC internally; still
others could use CORBA for remote procedure calls. A Java client
written on top of Web services will use SOAP. System administrators
can easily tune the security layer associated with the SOAP ports on
 
Search WWH ::




Custom Search