Index: lib/ezsoap/classes/ezsoapserver.php
===================================================================
--- lib/ezsoap/classes/ezsoapserver.php	(revision 20181)
+++ lib/ezsoap/classes/ezsoapserver.php	(working copy)
@@ -116,8 +116,10 @@
             $methods = get_class_methods( $objectName );
             foreach ( $methods as $method)
             {
-                if ( strcasecmp ( $objectName, $method ) )
-                    $this->registerFunction( $objectName."::".$method );
+                $this->registerFunction( $objectName . '::' . $method );
+                $this->registerFunction( $objectName . '__' . $method,
+                                         array(),
+                                         $objectName . '::' . $method );
             }
             return true;
         }
@@ -176,34 +178,46 @@
                 $params[] = eZSOAPResponse::decodeDataTypes( $parameterNode );
             }
 
-            list( $objectName, $objectFunctionName ) = preg_split('/::/', $functionName, 2, PREG_SPLIT_NO_EMPTY);
-            if ( !$objectFunctionName and in_array( $functionName, $this->FunctionList ) &&
-                 function_exists( $functionName ) )
+            if ( in_array( $functionName, $this->FunctionList ) )
             {
-                $this->showResponse( $functionName, $namespaceURI,
-                                     call_user_func_array( $functionName, $params ) );
-            }
-            else if ( $objectName and $objectFunctionName )
-            {
-                if ( !class_exists( $objectName ) )
+                if (  strpos( $functionName, '::' ) !== false )
                 {
+                    list( $objectName, $objectFunctionName ) = preg_split('/::/', $functionName, 2, PREG_SPLIT_NO_EMPTY);
+                }
+                else if ( strpos( $functionName, '__' ) !== false )
+                {
+                    list( $objectName, $objectFunctionName ) = preg_split('/__/', $functionName, 2, PREG_SPLIT_NO_EMPTY);
+                }
+                else if ( function_exists( $functionName ) )
+                {
                     $this->showResponse( $functionName, $namespaceURI,
-                                         new eZSOAPFault( 'Server Error',
-                                                          'Object not found' ) );
+                                         call_user_func_array( $functionName, $params ) );
                 }
-                else
+                if ( !empty( $objectName ) &&
+                     !empty( $objectFunctionName ) )
                 {
-                    $object = new $objectName();
-                    if ( !method_exists( $object, $objectFunctionName ) )
+                    if ( !class_exists( $objectName ) )
                     {
                         $this->showResponse( $functionName, $namespaceURI,
-                                     new eZSOAPFault( 'Server Error',
-                                                      'Objectmethod not found' ) );
+                                             new eZSOAPFault( 'Server Error',
+                                                              'Object not found' ) );
                     }
                     else
                     {
-                        $this->showResponse( $functionName, $namespaceURI,
-                                     call_user_method_array( $objectFunctionName, $object, $params ) );
+                        $object = new $objectName();
+                        if ( !method_exists( $object, $objectFunctionName ) )
+                        {
+                            $this->showResponse( $functionName, $namespaceURI,
+                                                 new eZSOAPFault( 'Server Error',
+                                                                  'Objectmethod not found' ) );
+                        }
+                        else
+                        {
+                            $this->showResponse( $functionName, $namespaceURI,
+                                                 call_user_method_array( $objectFunctionName,
+                                                                         $object,
+                                                                         $params ) );
+                        }
                     }
                 }
             }
