fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9930] sms : pswin incoming


From: Sigurd Nes
Subject: [Fmsystem-commits] [9930] sms : pswin incoming
Date: Wed, 29 Aug 2012 15:30:21 +0000

Revision: 9930
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9930
Author:   sigurdne
Date:     2012-08-29 15:30:20 +0000 (Wed, 29 Aug 2012)
Log Message:
-----------
sms : pswin incoming

Modified Paths:
--------------
    trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php
    trunk/sms/inc/plugin/gateway/pswin/get.php
    trunk/sms/setup/default_records.inc.php
    trunk/sms/setup/tables_current.inc.php

Added Paths:
-----------
    trunk/sms/inc/plugin/gateway/pswin/Receive.wdsl
    trunk/sms/inc/plugin/gateway/pswin/soap.php

Added: trunk/sms/inc/plugin/gateway/pswin/Receive.wdsl
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/Receive.wdsl                             
(rev 0)
+++ trunk/sms/inc/plugin/gateway/pswin/Receive.wdsl     2012-08-29 15:30:20 UTC 
(rev 9930)
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:tns="http://pswin.com/SOAP/Receive"; 
xmlns:s="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
targetNamespace="http://pswin.com/SOAP/Receive"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" 
targetNamespace="http://pswin.com/SOAP/Receive";>
+      <s:element name="ReceiveSMSMessage">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="m" 
type="tns:IncomingSMSMessage" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:complexType name="IncomingSMSMessage">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="1" name="ReceiverNumber" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="SenderNumber" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Text" type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="Network" 
nillable="true" type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="Address" 
nillable="true" type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="Position" 
nillable="true" type="tns:GSMPosition" />
+        </s:sequence>
+      </s:complexType>
+      <s:complexType name="GSMPosition">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="1" name="Longitude" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Lattitude" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Radius" type="s:string" 
/>
+          <s:element minOccurs="0" maxOccurs="1" name="County" type="s:string" 
/>
+          <s:element minOccurs="0" maxOccurs="1" name="Council" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="CouncilNumber" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Place" type="s:string" 
/>
+          <s:element minOccurs="0" maxOccurs="1" name="SubPlace" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="ZipCode" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
+        </s:sequence>
+      </s:complexType>
+      <s:element name="ReceiveSMSMessageResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" 
name="ReceiveSMSMessageResult" type="tns:ReturnValue" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:complexType name="ReturnValue">
+        <s:sequence>
+          <s:element minOccurs="1" maxOccurs="1" name="Code" type="s:int" />
+          <s:element minOccurs="0" maxOccurs="1" name="Description" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Reference" 
type="s:string" />
+        </s:sequence>
+      </s:complexType>
+      <s:element name="ReceiveDeliveryReport">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="dr" 
type="tns:DeliveryReport" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:complexType name="DeliveryReport">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" 
/>
+          <s:element minOccurs="0" maxOccurs="1" name="ReceiverNumber" 
type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="DeliveryTime" 
nillable="true" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Reference" 
type="s:string" />
+        </s:sequence>
+      </s:complexType>
+      <s:element name="ReceiveDeliveryReportResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" 
name="ReceiveDeliveryReportResult" type="tns:ReturnValue" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="ReceiveMMSMessage">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="m" 
type="tns:IncomingMMSMessage" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:complexType name="IncomingMMSMessage">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="1" name="ReceiverNumber" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="SenderNumber" 
type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Subject" 
type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="Network" 
nillable="true" type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="Address" 
nillable="true" type="s:string" />
+          <s:element minOccurs="1" maxOccurs="1" name="Position" 
nillable="true" type="tns:GSMPosition" />
+          <s:element minOccurs="0" maxOccurs="1" name="Data" 
type="s:base64Binary" />
+        </s:sequence>
+      </s:complexType>
+      <s:element name="ReceiveMMSMessageResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" 
name="ReceiveMMSMessageResult" type="tns:ReturnValue" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+    </s:schema>
+  </wsdl:types>
+  <wsdl:message name="ReceiveSMSMessageSoapIn">
+    <wsdl:part name="parameters" element="tns:ReceiveSMSMessage" />
+  </wsdl:message>
+  <wsdl:message name="ReceiveSMSMessageSoapOut">
+    <wsdl:part name="parameters" element="tns:ReceiveSMSMessageResponse" />
+  </wsdl:message>
+  <wsdl:message name="ReceiveDeliveryReportSoapIn">
+    <wsdl:part name="parameters" element="tns:ReceiveDeliveryReport" />
+  </wsdl:message>
+  <wsdl:message name="ReceiveDeliveryReportSoapOut">
+    <wsdl:part name="parameters" element="tns:ReceiveDeliveryReportResponse" />
+  </wsdl:message>
+  <wsdl:message name="ReceiveMMSMessageSoapIn">
+    <wsdl:part name="parameters" element="tns:ReceiveMMSMessage" />
+  </wsdl:message>
+  <wsdl:message name="ReceiveMMSMessageSoapOut">
+    <wsdl:part name="parameters" element="tns:ReceiveMMSMessageResponse" />
+  </wsdl:message>
+  <wsdl:portType name="SMSReceiveSoap">
+    <wsdl:operation name="ReceiveSMSMessage">
+      <wsdl:input message="tns:ReceiveSMSMessageSoapIn" />
+      <wsdl:output message="tns:ReceiveSMSMessageSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="ReceiveDeliveryReport">
+      <wsdl:input message="tns:ReceiveDeliveryReportSoapIn" />
+      <wsdl:output message="tns:ReceiveDeliveryReportSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="ReceiveMMSMessage">
+      <wsdl:input message="tns:ReceiveMMSMessageSoapIn" />
+      <wsdl:output message="tns:ReceiveMMSMessageSoapOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="SMSReceiveSoap" type="tns:SMSReceiveSoap">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; />
+    <wsdl:operation name="ReceiveSMSMessage">
+      <soap:operation 
soapAction="http://pswin.com/SOAP/Receive/ReceiveSMSMessage"; style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="ReceiveDeliveryReport">
+      <soap:operation 
soapAction="http://pswin.com/SOAP/Receive/ReceiveDeliveryReport"; 
style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="ReceiveMMSMessage">
+      <soap:operation 
soapAction="http://pswin.com/SOAP/Receive/ReceiveMMSMessage"; style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="SMSReceiveSoap12" type="tns:SMSReceiveSoap">
+    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"; />
+    <wsdl:operation name="ReceiveSMSMessage">
+      <soap12:operation 
soapAction="http://pswin.com/SOAP/Receive/ReceiveSMSMessage"; style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="ReceiveDeliveryReport">
+      <soap12:operation 
soapAction="http://pswin.com/SOAP/Receive/ReceiveDeliveryReport"; 
style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="ReceiveMMSMessage">
+      <soap12:operation 
soapAction="http://pswin.com/SOAP/Receive/ReceiveMMSMessage"; style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="SMSReceive">
+    <wsdl:port name="SMSReceiveSoap" binding="tns:SMSReceiveSoap">
+      <soap:address location="http://sms.pswin.com/SOAP/Receive.asmx"; />
+    </wsdl:port>
+    <wsdl:port name="SMSReceiveSoap12" binding="tns:SMSReceiveSoap12">
+      <soap12:address location="http://sms.pswin.com/SOAP/Receive.asmx"; />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Modified: trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php   2012-08-29 12:48:14 UTC 
(rev 9929)
+++ trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php   2012-08-29 15:30:20 UTC 
(rev 9930)
@@ -322,10 +322,12 @@
                 * @param string $wsdl WSDL location for this service
                 * @param array $options Options for the SoapClient
                 */
-               public function 
__construct($wsdl="http://sms.pswin.com/SOAP/Receive.asmx?wsdl";, 
$options=array())
+               public function __construct($wsdl='', $options=array())
                {
-                       foreach(self::$classmap as $wsdlClassName => 
$phpClassName) {
-                           if(!isset($options['classmap'][$wsdlClassName])) {
+                       foreach(self::$classmap as $wsdlClassName => 
$phpClassName)
+                       {
+                           if(!isset($options['classmap'][$wsdlClassName]))
+                           {
                                $options['classmap'][$wsdlClassName] = 
$phpClassName;
                            }
                        }
@@ -372,7 +374,15 @@
                        );
                        $args = func_get_args();
                        $this->_checkArguments($args, $validParameters);
-                       return $this->__soapCall("ReceiveSMSMessage", $args);
+                       $result =  $this->__soapCall("ReceiveSMSMessage", 
$args);
+
+/*
+                       echo("<H1>Dumping request headers:</H1></br>" 
.$this->__getLastRequestHeaders());
+                       echo("</br><H1>Dumping 
request:</H1></br>".$this->__getLastRequest());
+                       echo("</br><H1>Dumping response headers:</H1></br>"     
.$this->__getLastResponseHeaders());
+                       echo("</br><H1>Dumping 
response:</H1></br>".$this->__getLastResponse());
+*/
+                       return $result;
                }
        
        

Modified: trunk/sms/inc/plugin/gateway/pswin/get.php
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/get.php  2012-08-29 12:48:14 UTC (rev 
9929)
+++ trunk/sms/inc/plugin/gateway/pswin/get.php  2012-08-29 15:30:20 UTC (rev 
9930)
@@ -38,29 +38,43 @@
                {
                        if(!isset($this->pswin_param['email_user']) || ! 
$this->pswin_param['email_user'])
                        {
-                           throw new Exception('Email user not defined');      
                
+//                         throw new Exception('Email user not defined');      
                
                        }
 
-                               require_once 'SMSReceive.php';
+                       require_once 'SMSReceive.php';
 
-                               $options=array();
-                               $options['soap_version'] = SOAP_1_1;
-                               $options['location'] = 
$this->pswin_param['receive_url'];
-                               $options['uri']         = 
"http://sms.pswin.com/SOAP/SMS.asmx";;
-                               $options['trace']               = 1;
-                               $options['proxy_host']  = 
$this->pswin_param['proxy_host'];
-                               $options['proxy_port']  = 
$this->pswin_param['proxy_port'];
-                               $options['encoding']    = 
'iso-8859-1';//'UTF-8';
+                       $options=array();
+                       $options['soap_version'] = SOAP_1_2;
+                       $options['location'] = 
'http://localhost/~sn5607/savannah_trunk/sms/inc/plugin/gateway/pswin/soap.php';//$this->pswin_param['receive_url'];
+                       $options['uri']         = 
"http://localhost/~sn5607/savannah_trunk/sms/inc/plugin/gateway/pswin/soap.php";;
+                       $options['trace']               = 1;
+               //      $options['proxy_host']  = 
$this->pswin_param['proxy_host'];
+               //      $options['proxy_port']  = 
$this->pswin_param['proxy_port'];
+                       $options['encoding']    = 'iso-8859-1';//'UTF-8';
 
-                               $receive = new SMSReceive('', $options);
+                       $wdsl = PHPGW_SERVER_ROOT . 
'/sms/inc/plugin/gateway/pswin/Receive.wdsl';
 
-                               $ReceiveSMSMessage = new ReceiveSMSMessage();
-                               
-                               $ReturnValue = 
$receive->ReceiveSMSMessage($ReceiveSMSMessage);
+                       $receive = new SMSReceive($wdsl, $options);
 
-                               $result = $ReturnValue->ReceiveSMSMessageResult;
+                       $IncomingSMSMessage = new IncomingSMSMessage();
+                       $IncomingSMSMessage->ReceiverNumber = '26112';
+                       $IncomingSMSMessage->SenderNumber = '26112';
+                       $IncomingSMSMessage->Text = '';
+                       $IncomingSMSMessage->Network = '';
+                       $IncomingSMSMessage->Address = '';
+                       $IncomingSMSMessage->Position = '';
+               
 
+                       $ReceiveSMSMessage = new ReceiveSMSMessage();
+       
+                       $ReceiveSMSMessage->m = $IncomingSMSMessage;
 
+                       $ReturnValue = 
$receive->ReceiveSMSMessage($ReceiveSMSMessage);
+
+                       $result = $ReturnValue->ReceiveSMSMessageResult;
+
+       _debug_array($result);die();
+
                        $sms = array();
 
                        foreach($sms as $entry)

Added: trunk/sms/inc/plugin/gateway/pswin/soap.php
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/soap.php                         (rev 0)
+++ trunk/sms/inc/plugin/gateway/pswin/soap.php 2012-08-29 15:30:20 UTC (rev 
9930)
@@ -0,0 +1,215 @@
+<?php
+       /**
+       * phpGroupWare
+       *
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2000-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: soap.php 6682 2010-12-20 09:57:35Z sigurdne $
+       */
+
+
+       $GLOBALS['phpgw_info'] = array();
+
+       $GLOBALS['phpgw_info']['flags'] = array
+       (
+               'disable_Template_class'        => true,
+               'currentapp'                            => 'login',
+               'noheader'                                      => true,
+               'noapi'                                         => true         
// this stops header.inc.php to include phpgwapi/inc/function.inc.php
+       );
+
+       /**
+       * Include phpgroupware header
+       */
+
+       require_once '../../../../../header.inc.php';
+
+       unset($GLOBALS['phpgw_info']['flags']['noapi']);
+       $GLOBALS['phpgw_info']['flags']['authed'] = false;
+       $GLOBALS['phpgw_info']['message']['errors'] = array();
+
+       if(!isset($_GET['domain']) || !$_GET['domain'])
+       {
+               $GLOBALS['phpgw_info']['message']['errors'][] = 'domain not 
given as input';
+       }
+       else
+       {
+               $_REQUEST['domain'] = $_GET['domain'];
+               $_domain_info = 
isset($GLOBALS['phpgw_domain'][$_GET['domain']]) ? 
$GLOBALS['phpgw_domain'][$_GET['domain']] : '';
+               if(!$_domain_info)
+               {
+                       $GLOBALS['phpgw_info']['message']['errors'][] = 'not a 
valid domain';
+               }
+               else
+               {
+                       $GLOBALS['phpgw_domain'] = array();
+                       $GLOBALS['phpgw_domain'][$_GET['domain']] = 
$_domain_info;
+               }
+       }
+
+       require_once PHPGW_API_INC.'/functions.inc.php';
+
+       $headers = getallheaders();
+       if(ereg('Basic',$headers['Authorization']))
+       {
+               $tmp = $headers['Authorization'];
+               $tmp = str_replace(' ','',$tmp);
+               $tmp = str_replace('Basic','',$tmp);
+               $auth = base64_decode(trim($tmp));
+               list($login,$password) = split(':',$auth);
+
+               if($GLOBALS['phpgw']->session->create($login, $password))
+               {
+                       $GLOBALS['phpgw_info']['flags']['authed'] = true;
+               }
+               else
+               {
+                       $GLOBALS['phpgw_info']['message']['errors'][] = 'not 
authenticated';
+               }
+       }
+
+       /**
+       * @global object $GLOBALS['server']
+       */
+
+       $wdsl = PHPGW_SERVER_ROOT . 
'/sms/inc/plugin/gateway/pswin/Receive.wdsl';
+
+//_debug_array($wdsl);
+
+
+       $options = array
+       (
+               'uri'          => "http://test-uri/";, # the name space of the 
SOAP service
+               'soap_version' => SOAP_1_2,
+       //      'actor'        => "...", # the actor
+               'encoding'     => "UTF-8", # the encoding name
+       //      'classmap'     => "...", # a map of WSDL types to PHP classes
+       );
+
+       ini_set("soap.wsdl_cache_enabled","0");
+       $GLOBALS['server'] = new SoapServer($wdsl, $options);
+
+
+       /**
+        * ReceiveSMSMessageResponse
+        */
+       class ReceiveSMSMessageResponse
+       {
+               /**
+                * @access public
+                * @var ReturnValue
+                */
+               public $ReceiveSMSMessageResult;
+       }
+       
+       /**
+        * ReturnValue
+        */
+       class ReturnValue
+       {
+               /**
+                * @access public
+                * @var sint
+                */
+               public $Code;
+               /**
+                * @access public
+                * @var sstring
+                */
+               public $Description;
+               /**
+                * @access public
+                * @var sstring
+                */
+               public $Reference;
+       }
+       
+
+       function ReceiveSMSMessage($ReceiveSMSMessage)
+       {
+               $filename = '/tmp/test_soap.txt';
+               $fp = fopen($filename, "wb");
+               fwrite($fp,serialize($ReceiveSMSMessage));
+               if(fclose($fp))
+               {
+                       $file_written=True;
+               }
+
+               $ReceiveSMSMessageResponse = new ReceiveSMSMessageResponse();
+               $ReturnValue = new ReturnValue();
+               $ReturnValue->Code = '200';
+               $ReturnValue->Description = '';
+               $ReturnValue->Reference = '';
+               
+               $ReceiveSMSMessageResponse->ReceiveSMSMessageResult = 
$ReturnValue;
+
+               return $ReceiveSMSMessageResponse;
+       } 
+
+
+       function ReceiveDeliveryReport($DeliveryReport)
+       {
+               return '';
+       }
+
+
+       function hello($someone)
+       {
+               return "Hello " . $someone . " ! - SOAP 1.2";
+       } 
+
+       $functions = array();
+       $functions[] = 'hello';
+       $functions[] = 'ReceiveSMSMessage';
+       $functions[] = 'ReceiveDeliveryReport';
+
+       $GLOBALS['server']->addFunction($functions);
+
+       if ( isset($HTTP_RAW_POST_DATA) )
+       {
+               $request_xml = $HTTP_RAW_POST_DATA;
+       }
+       else
+       {
+               $request_xml = implode(" ", file('php://input'));
+       }
+
+       if ($_SERVER["REQUEST_METHOD"] == "POST")
+       {
+/*
+               $filename = '/tmp/test_request_xml.txt';
+               $fp = fopen($filename, "wb");
+               fwrite($fp,serialize($request_xml));
+               fclose($fp);
+*/
+
+               $GLOBALS['server']->handle($request_xml);
+       }
+       else
+       {
+               echo "This SOAP server can handle following functions: ";
+
+               _debug_array($functions = $GLOBALS['server']->getFunctions());
+
+       }
+       $GLOBALS['phpgw']->common->phpgw_exit();

Modified: trunk/sms/setup/default_records.inc.php
===================================================================
--- trunk/sms/setup/default_records.inc.php     2012-08-29 12:48:14 UTC (rev 
9929)
+++ trunk/sms/setup/default_records.inc.php     2012-08-29 15:30:20 UTC (rev 
9930)
@@ -46,6 +46,7 @@
        $db->query("INSERT INTO phpgw_config2_section (id, location_id, name, 
descr) VALUES (" . (4 + $num_sections) . ", $location_id, 'uplink', 'The Uplink 
Gateway')");
        $db->query("INSERT INTO phpgw_config2_section (id, location_id, name, 
descr) VALUES (" . (5 + $num_sections) . ", $location_id, 'kannel', 'The Kannel 
Gateway')");
        $db->query("INSERT INTO phpgw_config2_section (id, location_id, name, 
descr) VALUES (" . (6 + $num_sections) . ", $location_id, 'carrot', 'The Carrot 
Gateway')");
+       $db->query("INSERT INTO phpgw_config2_section (id, location_id, name, 
descr) VALUES (" . (7 + $num_sections) . ", $location_id, 'pswin', 'The Pswin 
Gateway')");
 
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 
1,'listbox', 'gateway_module_get', 'Active gateway module GET')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 
2,'listbox', 'gateway_module_send', 'Active gateway module SEND')");
@@ -87,20 +88,39 @@
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (6 + $num_sections) . ", 11, 
'text', 'differentiator', 'differentiator')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (6 + $num_sections) . ", 12, 
'listbox', 'type', 'Send type')");
 
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 1, 
'text', 'wsdl', 'pswin wsdl')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 2, 
'text', 'send_url', 'send url using GET')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 3, 
'text', 'service_url', 'service_url using SOAP')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 4, 
'text', 'login', 'pswin login')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 5, 
'password', 'password', 'Carrot password')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 6, 
'text', 'proxy_host', 'proxy_host')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 7, 
'text', 'proxy_port', 'proxy_port')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 8, 
'text', 'originator', 'originator')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 9, 
'listbox', 'type', 'Send type')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 10, 
'text', 'receive_url', 'receive_url using SOAP')");
 
+
+
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 1, 
'gnokii')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 2, 
'clickatell')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 3, 
'uplink')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 4, 
'kannel')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 5, 
'carrot')");
+       $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 6, 
'pswin')");
+       
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 1, 
'gnokii')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 2, 
'clickatell')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 3, 
'uplink')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 4, 
'kannel')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 5, 
'carrot')");
+       $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 6, 
'pswin')");
+
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (6 + $num_sections) . ", 12, 1, 
'GET')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (6 + $num_sections) . ", 12, 2, 
'SOAP')");
 
+       $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (7 + $num_sections) . ", 9, 1, 
'GET')");
+       $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (7 + $num_sections) . ", 9, 2, 
'SOAP')");
+
        $db->query("INSERT INTO phpgw_config2_value 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 1, 
'gnokii')");
        $db->query("INSERT INTO phpgw_config2_value 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 2, 1, 
'99999999')");
        $db->query("INSERT INTO phpgw_config2_value 
(section_id,attrib_id,id,value) VALUES (" . (2 + $num_sections) . ", 1, 1, 
'/usr/local')");

Modified: trunk/sms/setup/tables_current.inc.php
===================================================================
--- trunk/sms/setup/tables_current.inc.php      2012-08-29 12:48:14 UTC (rev 
9929)
+++ trunk/sms/setup/tables_current.inc.php      2012-08-29 15:30:20 UTC (rev 
9930)
@@ -235,7 +235,8 @@
                                'p_gpid' => array('type' => 'int', 'precision' 
=> 2,'nullable' => False,'default' => '0'),
                                'p_credit' => array('type' => 'int', 
'precision' => 2,'nullable' => False,'default' => '0'),
                                'p_sms_type' => array('type' => 'varchar', 
'precision' => 100,'nullable' => False),
-                               'unicode' => array('type' => 'int', 'precision' 
=> 2,'nullable' => False,'default' => '0')
+                               'unicode' => array('type' => 'int', 'precision' 
=> 2,'nullable' => False,'default' => '0'),
+                               'external_id' => array('type' => 
'int','precision' => 4,'nullable' => True)
                        ),
                        'pk' => array('smslog_id'),
                        'fk' => array(),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]