[20851] update soap

Sigurd Nes <[email protected]>
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 20851
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20851
Author:   sigurdne
Date:     2009-11-20 10:29:23 +0000 (Fri, 20 Nov 2009)
Log Message:
-----------
update soap

Modified Paths:
--------------
    people/sigurdne/modules/soap/trunk/inc/class.soap_server.inc.php.wip
    people/sigurdne/modules/soap/trunk/test_client.php
    people/sigurdne/modules/soap/trunk/test_methods.php
    people/sigurdne/modules/soap/trunk/test_methods_wsdl.php

Modified: people/sigurdne/modules/soap/trunk/inc/class.soap_server.inc.php.wip
===================================================================
--- people/sigurdne/modules/soap/trunk/inc/class.soap_server.inc.php.wip	2009-11-20 10:29:19 UTC (rev 20850)
+++ people/sigurdne/modules/soap/trunk/inc/class.soap_server.inc.php.wip	2009-11-20 10:29:23 UTC (rev 20851)
@@ -361,4 +361,3 @@
 		$this->fault = true;
 	}
 }
-?>

Modified: people/sigurdne/modules/soap/trunk/test_client.php
===================================================================
--- people/sigurdne/modules/soap/trunk/test_client.php	2009-11-20 10:29:19 UTC (rev 20850)
+++ people/sigurdne/modules/soap/trunk/test_client.php	2009-11-20 10:29:23 UTC (rev 20851)
@@ -1,45 +1,76 @@
 <?php
-/**************************************************************************\
-* phpGroupWare - addressbook                                               *
-* http://www.phpgroupware.org                                              *
-* Written by Joseph Engo <[email protected]>                          *
-* --------------------------------------------                             *
-*  This program is free software; you can redistribute it and/or modify it *
-*  under the terms of the GNU General Public License as published by the   *
-*  Free Software Foundation; either version 2 of the License, or (at your  *
-*  option) any later version.                                              *
-\**************************************************************************/
+	/**
+	* phpGroupWare
+	*
+	* @author Sigurd Nes <[email protected]>
+	* @author Joseph Engo <[email protected]>
+	* @copyright Copyright (C) 2009 Free Software Foundation, Inc. http://www.fsf.org/
+	* This file is part of phpGroupWare.
+	*
+	* phpGroupWare is free software; you can redistribute it and/or modify
+	* it under the terms of the GNU General Public License as published by
+	* the Free Software Foundation; either version 2 of the License, or
+	* (at your option) any later version.
+	*
+	* phpGroupWare is distributed in the hope that it will be useful,
+	* but WITHOUT ANY WARRANTY; without even the implied warranty of
+	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+	* GNU General Public License for more details.
+	*
+	* You should have received a copy of the GNU General Public License
+	* along with phpGroupWare; if not, write to the Free Software
+	* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+	*
+	* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
+	* @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/
+	* @package soap
+	* @subpackage communication
+ 	* @version $Id$
+	*/
 
-/* $Id$ */
-/*
-	$phpgw_info['flags'] = array(
-		'currentapp' => 'soap',
-		'noheader' => True
+	$phpgw_info = array();
+	$GLOBALS['phpgw_info']['flags'] = array
+	(
+		'disable_template_class' => true,
+		'login'                  => true,
+		'currentapp'             => 'login',
+		'noheader'               => true
 	);
 
 	include('../header.inc.php');
-*/
-	$login  = 'anonymous';
-	$passwd = 'anonymous1';
 
-	$phpgw_info['flags'] = array(
-		'disable_Template_class' => True,
-		'login' => True,
-		'currentapp' => 'soap',
-		'noheader'  => True);
 
-	include('../header.inc.php');
-	include('./vars.php');
+	$client = CreateObject('phpgwapi.soap_client');
 
-	$sessionid = $phpgw->session->create($login,$passwd);
+	
+	$arguments = array
+	(
+		'app'	=> 'property',
+		'class'	=> 'sotts',
+		'method'=> 'read',	
+		'input'	=> array('user_id' => $accound_id)
+	);
 
-	if (!$symbol)
-	{
-		$symbol = 'LNUX';
-	}
-	$soapclient = CreateObject('phpgwapi.phpgw_soapclient',"http://services.xmethods.net:80/soap");
-	echo $soapclient->call("getQuote",array("symbol"=>$symbol),"urn:xmethods-delayed-quotes","urn:xmethods-delayed-quotes#getQuote");
+	$result = $client->call("execute", $arguments);
+	_debug_array($result);
 
-//	$soapclient = CreateObject('phpgwapi.phpgw_soapclient','http://' . $HTTP_HOST . '/phpgroupware/soap.php');
-//	echo 'response: ' . $soapclient->call("hello",array($phpgw_info['server']['site_title']),"http://soapinterop.org/ilab","http://soapinterop.org/ilab#hello");
-//	echo $soapclient->call('echoString','hello',False,'echoString');
+//	$return = $client->call("hello",array("world"));
+//_debug_array($return);
+//	$return = $client->call("system_listApps",array());
+//_debug_array($return);
+//	$return = $client->call("system_logout",$login_data);
+//_debug_array($return);
+
+
+	echo("<H1>Dumping request headers:</H1></br>"
+		.$client->getLastRequestHeaders());
+
+	echo("</br><H1>Dumping request:</H1></br>".$client->getLastRequest());
+
+	echo("</br><H1>Dumping response headers:</H1></br>"
+		.$client->getLastResponseHeaders());
+
+	echo("</br><H1>Dumping response:</H1></br>".$client->getLastResponse());
+
+	$GLOBALS['phpgw']->common->phpgw_exit();
+?>

Modified: people/sigurdne/modules/soap/trunk/test_methods.php
===================================================================
--- people/sigurdne/modules/soap/trunk/test_methods.php	2009-11-20 10:29:19 UTC (rev 20850)
+++ people/sigurdne/modules/soap/trunk/test_methods.php	2009-11-20 10:29:23 UTC (rev 20851)
@@ -28,11 +28,12 @@
 	</script>
 <?php
 	// get list of all endpoints from xmethods
-	$soapmsg = CreateObject('phpgwapi.soapmsg','getAllEndpoints','','http://soapinterop.org/ilab');
+//	$soapmsg = CreateObject('phpgwapi.soapmsg','getAllEndpoints','','http://soapinterop.org/ilab');
 	// invoke the client
-	$client = CreateObject('phpgwapi.soap_client','http://www.xmethods.net/perl/soaplite.cgi');
+//	$client = CreateObject('phpgwapi.soap_client','http://www.xmethods.net/perl/soaplite.cgi');
 	// send message and get response
-	if($return = $client->send($soapmsg,'','http://soapinterop.org/ilab#getAllEndpoints'))
+//	if($return = $client->send($soapmsg,'','http://soapinterop.org/ilab#getAllEndpoints'))
+	if(false)
 	{
 		//print 'REQUEST:<br><xmp>'.$client->outgoing_payload.'</xmp><br>';
 		//print '<strong>RESPONSE:</strong><br><xmp>'.$client->incoming_payload.'</xmp><br>';
@@ -150,7 +151,8 @@
 
 	$servers['phpGroupWare'] = array(
 		'soapaction' => 'urn:soapinterop',
-		'endpoint'   => 'http://www.phpgroupware.org/cvsdemo/soap.php',
+//		'endpoint'   => 'http://www.phpgroupware.org/cvsdemo/soap.php',
+		'endpoint'   => "{$GLOBALS['phpgw_info']['server']['webserver_url']}/soap.php",
 		'methodNamespace' => 'http://soapinterop.org',
 		'soapactionNeedsMethod' => 0,
 		'name'       => 'SOAPx4  - interop test suite (dev)'
@@ -190,6 +192,8 @@
 </form>
 
 <?php
+	$method = phpgw::get_var('method');
+	$nserver = phpgw::get_var('nserver');
 	if($method && $nserver)
 	{
 		$server = $servers[$nserver];
@@ -201,6 +205,7 @@
 		);
 		/* print_r($soap_message);exit; */
 		$soap = CreateObject('phpgwapi.soap_client',$server['endpoint']);
+
 		/* print_r($soap);exit; */
 		if($return = $soap->send($soap_message,$server['soapaction']))
 		{

Modified: people/sigurdne/modules/soap/trunk/test_methods_wsdl.php
===================================================================
--- people/sigurdne/modules/soap/trunk/test_methods_wsdl.php	2009-11-20 10:29:19 UTC (rev 20850)
+++ people/sigurdne/modules/soap/trunk/test_methods_wsdl.php	2009-11-20 10:29:23 UTC (rev 20851)
@@ -113,7 +113,7 @@
 	"name" => "SOAPx4  - interop test suite (dev)");
 
 // get list of all endpoints from xmethods
-	$soapclient = CreateObject('phpgwapi.phpgw_soapclient',"http://www.xmethods.net/perl/soaplite.cgi");
+	$soapclient = CreateObject('phpgwapi.soap_client',"http://www.xmethods.net/perl/soaplite.cgi");
 	if($endpointArray = $soapclient->call("getAllEndpoints",array(),"http://soapinterop.org/ilab","http://soapinterop.org/ilab#getAllEndpoints"))
 	{
 		foreach($endpointArray as $k => $v)
@@ -159,7 +159,7 @@
 	}
 	print "<br>";
 	print "<b>METHOD: $method</b><br>";
-	$soapclient = CreateObject('phpgwapi.phpgw_soapclient',$server["wsdl"],"wsdl");
+	$soapclient = CreateObject('phpgwapi.soap_client',$server["wsdl"],"wsdl");
 	//$soapclient->debug_flag = true;
 	$return_val = $soapclient->call($method,$method_params[$method],$server["methodNamespace"]);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.