From: Fergus H. <fj...@cs...> - 2001-02-06 04:21:07
|
On 06-Feb-2001, Ina Cheng <in...@st...> wrote: > Here is a modified version of the design. That design looks good. Just a couple of small points: > :- module client_interface. > > This function takes in an uri (which specifies the host and port number > that the client is connected to), method name (which specifies which > RPC to call), and a list of univ (which are the parameters to the RPC). > > soap_call_mercury_type(uri, method_name, list_of_univ) :- > generate SOAP message in XML format and SOAP protocol, > tcp__connect to the server, > send the request to the server using HTTP, > wait for the response, > read response in XML format, > decode the response to mercury types. You need to return another list_of_univ containing the result. These three lines send the request to the server using HTTP, wait for the response, read response in XML format, should be abstracted out into a separate procedure, or can just be replaced by a call to soal_call_xml_type. > Assumptions: > When generating SOAP messages for the parameters (list_of_univ), > we assume the client will have a copy of the schema that is used > in the server side for encoding and decoding types in XML. > > > soap_call_xml_type(uri, method_name, xml_document) :- > tcp__connect to the server, > send the xml_document to the server using HTTP > wait for response, > display response. This should just return the xml response, rather than displaying it. -- Fergus Henderson <fj...@cs...> | "I have always known that the pursuit | of excellence is a lethal habit" WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp. |