From 6626a5498df1e9231c6711544d69e93feebfec21 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 12 Jan 2007 06:27:16 +0000 Subject: simplify class maps in soap server --- .../protected/pages/Services/SoapService.page | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'demos/quickstart') diff --git a/demos/quickstart/protected/pages/Services/SoapService.page b/demos/quickstart/protected/pages/Services/SoapService.page index 04dea07a..4a83c8ed 100644 --- a/demos/quickstart/protected/pages/Services/SoapService.page +++ b/demos/quickstart/protected/pages/Services/SoapService.page @@ -129,7 +129,33 @@ The tool requires a MS .NET runtime to be installed.

-TSoapService may be configured and customized in several ways. In the example above, the <soap> element actually specifies a SOAP service using the default TSoapServer implementation. Attributes in <soap> are passed to TSoapServer as its initial property values. For example, the provider attribute initializes the Provider property of TSoapServer. By setting SessionPersistent to be true in <soap> element, the provider instance will persist within the user session. You may develop your own SOAP server class and use it by specifying the class attribute of <soap>. +TSoapService may be configured and customized in several ways. In the example above, the <soap> element actually specifies a SOAP service using the default TSoapServer implementation. Attributes in <soap> are passed to TSoapServer as its initial property values. For example, the provider attribute initializes the Provider property of TSoapServer. By setting SessionPersistent to be true in <soap> element, the provider instance will persist within the user session. You may develop your own SOAP server class and use it by specifying the class attribute of <soap>. +

+ +

By default, PHP's soap server will create objects of the type StdClass +when objects are received from the client. The soap server can be configured to +automatically create objects of certain type objects are received as method +parameters. For example, if we have a Soap method that accepts +a Contact object as parameter. + +/** + * @param Contact $contact + * @return boolean true if saved, false otherwise + * @soapmethod + */ + function save(Contact $contact) + { + return true + } + +The do this, we need to set the ClassMaps property of +the TSoapServer in the <soap> tags as +a comma separated string of class names that we wish to be automatically +converted. + + +

\ No newline at end of file -- cgit v1.2.3