System.Web.Services
[ class tree: System.Web.Services ] [ index: System.Web.Services ] [ all elements ]

Class: TService_AJAX

Source Location: /Web/Services/TService_AJAX.php

Class Overview

TService
   |
   --TService_AJAX

TService_AJAX class

Class Details

[line 75]
TService_AJAX class

Allows XMLHTTPRequests for arbituary classes.

This service should be initialized from the application.spec file, e.g.

 
    
       
    
 

The methods in the service classes must have a @webservice doc-comment property. In addition, these classes must have a default constructor. For example,

  1. class HelloService
  2. {

To call the methods of the these class from the client javascript side, do the following.

  1. <script type="text/javascript">
  2. //<![CDATA[
  3. var response =
  4. {
  5. sayHello : function(result, output)
  6. {
  7. alert(result);
  8. }
  9. }
  10.  
  11. var helloService = new HelloService(response);
  12. helloService.sayHello("Wei!"); //call remote method in async mode
  13. //]]>
  14. </script>




version:  v1.0, last update on 2005/03/11 21:44:52
author:  Wei Zhuo <weizhuo[at]gmail.com>


[ Top ]

Variables

Methods


Inherited Methods

Class: TService

TService::execute()
Execute the service.
TService::findClass()
Find the class name from e,g. "My.NameSpace.MyClass" and returns "MyClass".
TService::getClientUri()
Return the service client URI. e.g. the URI to access the service.
TService::IsRequestServiceable()
Determine from the current URI if this service should server the request.

Class Variables

$server =

[line 81]

AJAX remote object server.



access:  protected



[ Top ]



Class Methods


constructor __construct [line 87]

TService_AJAX __construct( xml $config)

Initialize the AJAX remote object class from configuration.



Parameters:

xml   $config   configuration.

[ Top ]

method execute [line 114]

void execute( )

Execute the service, let the server handle errors and exceptions.



Overrides TService::execute() (Execute the service.)

[ Top ]

method getClientUri [line 127]

string getClientUri( )

Get the client-side javascript code URL.



return:  client-side javascript source URL.
access:  public


Overrides TService::getClientUri() (Return the service client URI. e.g. the URI to access the service.)

[ Top ]

method IsRequestServiceable [line 106]

boolean IsRequestServiceable( string $request)

Determine if the service is applicable.



return:  true if able to service remote object request


Overrides TService::IsRequestServiceable() (Determine from the current URI if this service should server the request.)

Parameters:

string   $request   request type

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.