[geeklog-cvs] Auth_Enterprise/Enterprise/Server SOAPHandler.php,1.4,1.5

tony at iowaoutdoors.org tony at iowaoutdoors.org
Tue Jul 27 15:41:26 EDT 2004


Update of /var/cvs/Auth_Enterprise/Enterprise/Server
In directory www:/tmp/cvs-serv21584

Modified Files:
	SOAPHandler.php 
Log Message:
Finally working

Index: SOAPHandler.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Enterprise/Server/SOAPHandler.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SOAPHandler.php	26 Jul 2004 19:00:11 -0000	1.4
--- SOAPHandler.php	27 Jul 2004 19:41:24 -0000	1.5
***************
*** 58,63 ****
      {
          $GLOBALS['_Auth_Enterprise_SOAPHandler'] = $applications;
!         $GLOBALS['_Auth_Enterpirse_SOAPHandler']['wsdl'] = $wsdl;
!         Auth_Enterprise_SOAPHandler::handleRequest();
      }
      
--- 58,62 ----
      {
          $GLOBALS['_Auth_Enterprise_SOAPHandler'] = $applications;
!         Auth_Enterprise_SOAPHandler::handleRequest($wsdl);
      }
      
***************
*** 70,79 ****
      *
      */
!     public static function handleRequest()
      {
          global $HTTP_RAW_POST_DATA;
          
-         // Get appliation ID out of request.  This is a bit of a hack as we are accessing SOAP parameters from the
-         // raw request but in order to act as a true proxy we must get it out.
          $dom = new DomDocument();
          $dom->loadXML($HTTP_RAW_POST_DATA);
--- 69,76 ----
      *
      */
!     public static function handleRequest($wsdl)
      {
          global $HTTP_RAW_POST_DATA;
          
          $dom = new DomDocument();
          $dom->loadXML($HTTP_RAW_POST_DATA);
***************
*** 81,97 ****
          $node = $tmpNodeList->item(0);
          $appId = $node->textContent;
-         
          try {
              $options = $GLOBALS['_Auth_Enterprise_SOAPHandler'][$appId]['options'];
!             $provider =& Auth_Enterprise::serverSingleton($GLOBALS['_Auth_Enterprise_SOAPHandler'][$appId]['provider'],
!                 $GLOBALS['_Auth_Enterprise_SOAPHandler'][$appId]['options']);
!             $sudServer = new SoapServer($GLOBALS['_Auth_Enterprise_SOAPHandler']['wsdl']);
!             $sudServer->setClass(get_class($provider));
              $sudServer->handle();
          } catch (AEBaseException $e) {
!             return new SoapFault('Auth_Enterprise_Server Service Error', $e->getMessage());
          } catch (Exception $e) {
              // Handle unknown problems
!             return new SoapFault('Auth_EnterpriseS_erver PHP Error', $e->getMessage());
          }
      }
--- 78,96 ----
          $node = $tmpNodeList->item(0);
          $appId = $node->textContent;
          try {
              $options = $GLOBALS['_Auth_Enterprise_SOAPHandler'][$appId]['options'];
!             $providerName = $GLOBALS['_Auth_Enterprise_SOAPHandler'][$appId]['provider'];
!             $sudServer = new SoapServer($wsdl);
!             $fileToInclude = 'Auth/Enterprise/Server/' . $providerName . '.php';
!             if (require_once($fileToInclude)) {
!                 $sudServer->setClass('Auth_Enterprise_Server_'. $providerName,
!                     $GLOBALS['_Auth_Enterprise_SOAPHandler'][$appId]['options']);
!             }
              $sudServer->handle();
          } catch (AEBaseException $e) {
!         	print_r($e);
          } catch (Exception $e) {
              // Handle unknown problems
!             throw new SoapFault('Auth_EnterpriseS_erver PHP Error', $e->getMessage());
          }
      }




More information about the geeklog-cvs mailing list