CVSROOT: /cvsroot/phpgroupware Module name: soap Changes by: Caeies <Caeies> 06/12/28 18:12:15
Modified files: inc : class.test_methods.inc.php Log message: new wsdl interface xmethods CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/soap/inc/class.test_methods.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3 Patches: Index: class.test_methods.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/soap/inc/class.test_methods.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- class.test_methods.inc.php 24 Sep 2006 13:08:03 -0000 1.2 +++ class.test_methods.inc.php 28 Dec 2006 18:12:15 -0000 1.3 @@ -6,7 +6,7 @@ * @copyright Copyright (C) 2000-2006 Free Software Foundation, Inc. http://www.fsf.org/ * @licence http://www.gnu.org/licenses/gpl.html GNU General Public License * @package soap - * @version $Id: class.test_methods.inc.php,v 1.2 2006/09/24 13:08:03 Caeies Exp $ + * @version $Id: class.test_methods.inc.php,v 1.3 2006/12/28 18:12:15 Caeies Exp $ * @author Caeies ([EMAIL PROTECTED]) / Original idea from Joseph Engo <[EMAIL PROTECTED]> ? */ @@ -34,12 +34,12 @@ $this->app = (isset($_REQUEST['app']) && $_REQUEST['app'])?$_REQUEST['app']:$GLOBALS['phpgw_info']['flags']['currentapp']; if(!$this->client) { - $this->client = CreateObject('phpgwapi.soapclient','http://www.xmethods.net/perl/soaplite.cgi'); + $this->client = CreateObject('phpgwapi.soapclient','http://www.xmethods.net/interfaces/query.wsdl', true); } $this->servers = $GLOBALS['phpgw']->session->appsession('server', 'soap'); if(!is_array($this->servers)) { - $this->servers = $this->client->call('getAllEndpoints', '', 'http://soapinterop.org/ilab'); + $this->servers = $this->client->call('getAllServiceSummaries', '', 'http://www.xmethods.net/interfaces/query'); $GLOBALS['phpgw']->session->appsession('server', 'soap', $this->servers); } //Allow us to save a soapclient object ! @@ -51,9 +51,11 @@ { $soapClients = array(); $array_link = array(); - if($this->servers === false || isset($this->servers['faultcode']) ) + if($this->servers === false || !is_array($this->servers) ||isset($this->servers['faultcode']) ) { + _debug_array('wrong server'); _debug_array($this->servers); + _debug_array($this->client); } $nameid = get_var('nameid'); $function = get_var('function'); @@ -63,26 +65,26 @@ { $link = array('menuaction' => 'soap.test_methods.uitest_methods', 'nameid' => "id$k"); - $array_link[] = '<p><a href="'.$GLOBALS['phpgw']->link('/index.php', $link).'">'.$server['name'].' '. $server['endpoint'].' (wsdl : '.$server['wsdl'].')</a></p>'; + $array_link[] = '<p><a href="'.$GLOBALS['phpgw']->link('/index.php', $link).'">'.$server['name'].' '. $server['shortDescription'].' (wsdl : '.$server['wsdlURL'].')</a></p>'; } } elseif(empty($function)) { $id = str_replace('id', '', $nameid); $server = $this->servers[$id]; - if(!empty($server['wsdl'])) + if(!empty($server['wsdlURL'])) { - $soapclient = CreateObject('phpgwapi.soapclient', $server['wsdl'], true); + $soapclient = CreateObject('phpgwapi.soapclient', $server['wsdlURL'], true); $operations = $soapclient->operations; // well that's not the way to proceed, but don't find another one ... if(!is_array($operations) || count($operations) == 0) { unset($soapclient); - $soapclient = CreateObject('phpgwapi.soapclient', $server['endpoint']); + $soapclient = CreateObject('phpgwapi.soapclient', $server['wsdlURL']); } } else { - $soapclient = CreateObject('phpgwapi.soapclient', $server['endpoint']); + $soapclient = CreateObject('phpgwapi.soapclient', $server['wsdlURL']); $operations = array(); } $error = $soapclient->GetError(); _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs