[PSTN provisioning client updates Adrian Georgescu **20090702090823] hunk ./library/ngnpro_client.php 1686 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 1718 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 2387 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 3326 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 3911 - $generator_link=sprintf('G',$this->url,$this->login_credentials['reseller_filters'][$range->reseller]['record_generator'],$range->id->prefix,$range->id->tld,$range->maxDigits,$range->reseller); + $generator_url=sprintf('G',$this->url,$this->login_credentials['reseller_filters'][$range->reseller]['record_generator'],$range->id->prefix,$range->id->tld,$range->maxDigits,$range->reseller); hunk ./library/ngnpro_client.php 3913 - $generator_link=sprintf('G',$this->url,$this->SoapEngine->record_generator,$range->id->prefix,$range->id->tld,$range->maxDigits,$range->reseller); + $generator_url=sprintf('G',$this->url,$this->SoapEngine->record_generator,$range->id->prefix,$range->id->tld,$range->maxDigits,$range->reseller); hunk ./library/ngnpro_client.php 3915 - $range_link=sprintf('%s',$this->url,$this->SoapEngine->service,$range->reseller,$range->id->prefix,$range->id->tld,$range->id->prefix); + $range_url=sprintf('%s',$this->url,$this->SoapEngine->service,$range->reseller,$range->id->prefix,$range->id->tld,$range->id->prefix); hunk ./library/ngnpro_client.php 3919 - $generator_link=sprintf('G',$this->url,$this->SoapEngine->record_generator,$range->id->prefix,$range->id->tld,$range->maxDigits,$range->reseller); + $generator_url=sprintf('G',$this->url,$this->SoapEngine->record_generator,$range->id->prefix,$range->id->tld,$range->maxDigits,$range->reseller); hunk ./library/ngnpro_client.php 3921 - $generator_link=''; + $generator_url=''; hunk ./library/ngnpro_client.php 3923 - $range_link=sprintf('%s',$this->url,$this->SoapEngine->service,$range->id->prefix,$range->id->tld,$range->id->prefix); + $range_url=sprintf('%s',$this->url,$this->SoapEngine->service,$range->id->prefix,$range->id->tld,$range->id->prefix); hunk ./library/ngnpro_client.php 3934 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 3962 - $generator_link, - $_customers_url, + $generator_url, + $_customer_url, hunk ./library/ngnpro_client.php 3966 - $range_link, + $range_url, hunk ./library/ngnpro_client.php 3997 - $range_link, + $range_url, hunk ./library/ngnpro_client.php 4921 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 4955 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 5077 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 5110 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 7351 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 7400 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 7432 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 8391 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 8409 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 8421 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 8439 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 8610 + var $Fields=array( + 'id' => array('type'=>'integer', + 'readonly' => true), + 'name' => array('type'=>'string') + ); + hunk ./library/ngnpro_client.php 8691 - Carrier hunk ./library/ngnpro_client.php 8692 + Carrier hunk ./library/ngnpro_client.php 8729 - $_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%s", + $_delete_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%s", hunk ./library/ngnpro_client.php 8734 - $_gateways_url = $this->url.sprintf("&service=pstn_gateways@%s&carrier_id_filter=%d&reseller_filter=%s", - urlencode($this->SoapEngine->soapEngine), - urlencode($carrier->id), - urlencode($carrier->reseller) - ); - hunk ./library/ngnpro_client.php 8736 - $_url .= "&confirm=1"; + $_delete_url .= "&confirm=1"; hunk ./library/ngnpro_client.php 8742 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + + $_url = $this->url.sprintf("&service=%s&id_filter=%s&reseller_filter=%s", + urlencode($this->SoapEngine->service), + urlencode($carrier->id), + urlencode($carrier->reseller) + ); + + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 8751 - urlencode($carrier->customer) + urlencode($carrier->reseller) + ); + + $_gateway_url = $this->url.sprintf("&service=pstn_gateways@%s&carrier_id_filter=%d&reseller_filter=%s", + urlencode($this->SoapEngine->soapEngine), + urlencode($carrier->id), + urlencode($carrier->reseller) hunk ./library/ngnpro_client.php 8763 - %s + %s hunk ./library/ngnpro_client.php 8772 - $carrier->id, - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 8774 + $_url, + $carrier->id, hunk ./library/ngnpro_client.php 8777 - $_gateways_url, + $_gateway_url, hunk ./library/ngnpro_client.php 8779 - $_url, + $_delete_url, hunk ./library/ngnpro_client.php 8794 - $this->showPagination($maxrows); + if ($this->rows == 1) { + $this->showRecord($carrier); + } else { + $this->showPagination($maxrows); + } hunk ./library/ngnpro_client.php 8907 + function getRecord($id) { + // Insert credetials + $this->SoapEngine->soapclient->addHeader($this->SoapEngine->SoapAuth); + + // Filter + $filter=array('id' => intval($id)); + + // Range + $range=array('start' => 0, + 'count' => 1 + ); + + // Order + if (!$this->sorting['sortBy']) $this->sorting['sortBy'] = 'name'; + if (!$this->sorting['sortOrder']) $this->sorting['sortOrder'] = 'ASC'; + + $orderBy = array('attribute' => $this->sorting['sortBy'], + 'direction' => $this->sorting['sortOrder'] + ); + + // Compose query + $Query=array('filter' => $filter, + 'orderBy' => $orderBy, + 'range' => $range + ); + + // Call function + + $result = $this->SoapEngine->soapclient->getCarriers($Query); + + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + printf ("

Error from %s: %s (%s): %s",$this->SoapEngine->SOAPurl,$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + return false; + } else { + if ($result->carriers[0]){ + return $result->carriers[0]; + } else { + return false; + } + } + } + + function showRecord($carrier) { + + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + + print " + + + + "; + print ""; + print "
"; + print "

Carrier

"; + print "
"; + + print ""; + + printf ("",$_SERVER['PHP_SELF']); + print ""; + + foreach (array_keys($this->Fields) as $item) { + if ($this->Fields[$item]['name']) { + $item_name=$this->Fields[$item]['name']; + } else { + $item_name=ucfirst($item); + } + + printf (" + + ", + $item, + $carrier->$item, + $carrier->$item + ); + } else { + printf ("", + $item, + $carrier->$item + ); + } + print " + "; + } + + printf ("id); + + $this->printFiltersToForm(); + $this->printHiddenFormElements(); + + print " +
%s", + $item_name + ); + + if ($this->Fields[$item]['readonly']) { + printf ("%s
+ "; + + print "
+ +
"; + + } + + function updateRecord () { + //print "

Updating carrier ..."; + + if (!$_REQUEST['id_filter']) return; + + if (!$carrier = $this->getRecord($_REQUEST['id_filter'])) { + return false; + } + + foreach (array_keys($this->Fields) as $item) { + $var_name=$item.'_form'; + if ($this->Fields[$item]['type'] == 'integer') { + $carrier->$item = intval($_REQUEST[$var_name]); + } else { + $carrier->$item = trim($_REQUEST[$var_name]); + } + } + + $function=array('commit' => array('name' => 'updateCarrier', + 'parameters' => array($carrier), + 'logs' => array('success' => sprintf('Carrier %d has been updated',$_REQUEST['id_filter']))) + ); + + $result = $this->SoapEngine->execute($function,$this->html); + + dprint_r($result) ; + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + printf ("

Error from %s: %s (%s): %s",$this->SOAPurl,$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + + return false; + } else { + return true; + } + } hunk ./library/ngnpro_client.php 9062 - var $gatewayGroups=array(); + var $carriers=array(); hunk ./library/ngnpro_client.php 9158 - Gateway hunk ./library/ngnpro_client.php 9159 + Gateway hunk ./library/ngnpro_client.php 9198 - $_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%s", + $_delete_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%s", hunk ./library/ngnpro_client.php 9205 - $_url .= "&confirm=1"; + $_delete_url .= "&confirm=1"; hunk ./library/ngnpro_client.php 9211 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_url = $this->url.sprintf("&service=%s&id_filter=%s", + urlencode($this->SoapEngine->service), + urlencode($gateway->id) + ); + + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 9221 - $_carriers_url = $this->url.sprintf("&service=pstn_carriers@%s&id_filter=%s", + $_carrier_url = $this->url.sprintf("&service=pstn_carriers@%s&id_filter=%s&reseller_filter=%s,", hunk ./library/ngnpro_client.php 9223 - urlencode($gateway->carrier_id) + urlencode($gateway->carrier_id), + urlencode($carrier->reseller) hunk ./library/ngnpro_client.php 9227 - $_rules_url = $this->url.sprintf("&service=gateway_rules@%s&gateway_filter=%s", + $_rules_url = $this->url.sprintf("&service=gateway_rules@%s&gateway_filter=%s&reseller_filter=%s", hunk ./library/ngnpro_client.php 9229 - urlencode($gateway->id) - ); - - $gateway_link = $this->url.sprintf("&service=%s&id_filter=%s", - urlencode($this->SoapEngine->service), - urlencode($gateway->id) + urlencode($gateway->id), + urlencode($carrier->reseller) hunk ./library/ngnpro_client.php 9240 - %s + %s hunk ./library/ngnpro_client.php 9249 - $gateway_link, - $gateway->id, - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 9251 + $_url, + $gateway->id, + $_carrier_url, hunk ./library/ngnpro_client.php 9261 - $_url, + $_delete_url, hunk ./library/ngnpro_client.php 9436 + printf (" Gateway ",$this->filters['id']); + hunk ./library/ngnpro_client.php 9449 - printf (" Gateway ",$this->filters['id']); hunk ./library/ngnpro_client.php 9640 - var $gatewayGroups=array(); + var $carriers=array(); hunk ./library/ngnpro_client.php 9775 - $_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%s&reseller_filter=%s", + $_delete_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%s&reseller_filter=%s", hunk ./library/ngnpro_client.php 9782 - $_REQUEST['id_filter'] == $gateway_rule->id && - $_REQUEST['reseller_filter'] == $gateway_rule->reseller) { - $_url .= "&confirm=1"; + $_REQUEST['id_filter'] == $gateway_rule->id) { + $_delete_url .= "&confirm=1"; hunk ./library/ngnpro_client.php 9789 - $_rule_url = $this->url.sprintf("&service=%s&id_filter=%s&reseller_filter=%s", + $_url = $this->url.sprintf("&service=%s&id_filter=%s&reseller_filter=%s", hunk ./library/ngnpro_client.php 9795 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 9800 - $_carriers_url = $this->url.sprintf("&service=pstn_carriers@%s&id_filter=%s&reseller_filter=%s", + $_carrier_url = $this->url.sprintf("&service=pstn_carriers@%s&id_filter=%s&reseller_filter=%s", hunk ./library/ngnpro_client.php 9806 - $_gateways_url = $this->url.sprintf("&service=pstn_gateways@%s&id_filter=%s&reseller_filter=%s", + $_gateway_url = $this->url.sprintf("&service=pstn_gateways@%s&id_filter=%s&reseller_filter=%s", hunk ./library/ngnpro_client.php 9829 - $_rule_url, $gateway_rule->id, - $_customers_url, $gateway_rule->reseller, - $_carriers_url, $gateway_rule->carrier, - $_gateways_url, $gateway_rule->gateway, + $_url, $gateway_rule->id, + $_customer_url, $gateway_rule->reseller, + $_carrier_url, $gateway_rule->carrier, + $_gateway_url, $gateway_rule->gateway, hunk ./library/ngnpro_client.php 9839 - $_url, + $_delete_url, hunk ./library/ngnpro_client.php 10202 - var $gatewayGroups=array(); + var $carriers=array(); + + var $Fields=array( + 'id' => array('type'=>'integer', + 'readonly' => true), + 'carrier_id' => array('type'=>'integer','name'=>'Carrier'), + 'prefix' => array('type'=>'string'), + 'originator' => array('type'=>'string'), + 'priority' => array('type'=>'integer') + ); hunk ./library/ngnpro_client.php 10232 - // Get gateway carriers - hunk ./library/ngnpro_client.php 10288 - Route hunk ./library/ngnpro_client.php 10289 + Route hunk ./library/ngnpro_client.php 10329 - $_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%d", + $_delete_url = $this->url.sprintf("&service=%s&action=Delete&id_filter=%d", hunk ./library/ngnpro_client.php 10336 - $_url .= "&confirm=1"; + $_delete_url .= "&confirm=1"; hunk ./library/ngnpro_client.php 10342 - $_customers_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", + $_url = $this->url.sprintf("&service=%s&id_filter=%d", + urlencode($this->SoapEngine->service), + urlencode($route->id) + ); + + $_customer_url = $this->url.sprintf("&service=customers@%s&customer_filter=%s", hunk ./library/ngnpro_client.php 10352 - $_carriers_url = $this->url.sprintf("&service=pstn_carriers@%s&id_filter=%s", + $_carrier_url = $this->url.sprintf("&service=pstn_carriers@%s&id_filter=%s", hunk ./library/ngnpro_client.php 10357 - $_gateways_url = $this->url.sprintf("&service=pstn_gateways@%s&carrier_id_filter=%s&reseller_filter=%s", + $_gateway_url = $this->url.sprintf("&service=pstn_gateways@%s&carrier_id_filter=%s&reseller_filter=%s", hunk ./library/ngnpro_client.php 10366 - %s + %s hunk ./library/ngnpro_client.php 10378 - $route->id, - $_customers_url, + $_customer_url, hunk ./library/ngnpro_client.php 10380 - $_carriers_url, + $_url, + $route->id, + $_carrier_url, hunk ./library/ngnpro_client.php 10384 - $_gateways_url, + $_gateway_url, hunk ./library/ngnpro_client.php 10389 - $_url, + $_delete_url, hunk ./library/ngnpro_client.php 10404 - $this->showPagination($maxrows); + if ($this->rows == 1) { + $this->showRecord($route); + } else { + $this->showPagination($maxrows); + } hunk ./library/ngnpro_client.php 10546 + printf (" Route ",$this->filters['id']); hunk ./library/ngnpro_client.php 10568 + hunk ./library/ngnpro_client.php 10573 + function getRecord($id) { + // Insert credetials + $this->SoapEngine->soapclient->addHeader($this->SoapEngine->SoapAuth); + + // Filter + $filter=array('id' => intval($id)); + + // Range + $range=array('start' => 0, + 'count' => 1 + ); + + // Order + if (!$this->sorting['sortBy']) $this->sorting['sortBy'] = 'prefix'; + if (!$this->sorting['sortOrder']) $this->sorting['sortOrder'] = 'ASC'; + + $orderBy = array('attribute' => $this->sorting['sortBy'], + 'direction' => $this->sorting['sortOrder'] + ); + + // Compose query + $Query=array('filter' => $filter, + 'orderBy' => $orderBy, + 'range' => $range + ); + + // Call function + + $result = $this->SoapEngine->soapclient->getRoutes($Query); + + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + printf ("

Error from %s: %s (%s): %s",$this->SoapEngine->SOAPurl,$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + return false; + } else { + if ($result->routes[0]){ + return $result->routes[0]; + } else { + return false; + } + } + } + + function showRecord($route) { + + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + + print " + + + + "; + print ""; + print "
"; + print "

Route

"; + print "
"; + + print ""; + + printf ("",$_SERVER['PHP_SELF']); + print ""; + + foreach (array_keys($this->Fields) as $item) { + if ($this->Fields[$item]['name']) { + $item_name=$this->Fields[$item]['name']; + } else { + $item_name=ucfirst($item); + } + + printf (" + + ", + $item, + $route->$item, + $route->$item + ); + } else { + if ($item == 'carrier_id') { + printf (""); + + } else { + printf ("", + $item, + $route->$item + ); + } + } + print " + "; + } + + printf ("id); + + $this->printFiltersToForm(); + $this->printHiddenFormElements(); + + print " +
%s", + $item_name + ); + + if ($this->Fields[$item]['readonly']) { + printf ("%s
+ "; + + print "
+ +
"; + + } + + function updateRecord () { + //print "

Updating route ..."; + + if (!$_REQUEST['id_filter']) return; + + if (!$route = $this->getRecord($_REQUEST['id_filter'])) { + return false; + } + + foreach (array_keys($this->Fields) as $item) { + $var_name=$item.'_form'; + if ($this->Fields[$item]['type'] == 'integer') { + $route->$item = intval($_REQUEST[$var_name]); + } else { + $route->$item = trim($_REQUEST[$var_name]); + } + } + + $routes=array($route); + + $function=array('commit' => array('name' => 'updateRoutes', + 'parameters' => array($routes), + 'logs' => array('success' => sprintf('Route %d has been updated',$_REQUEST['id_filter']))) + ); + $result = $this->SoapEngine->execute($function,$this->html); + + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + printf ("

Error from %s: %s (%s): %s",$this->SOAPurl,$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + + return false; + } else { + return true; + } + } hunk ./library/ngnpro_client.php 11535 - $_customers_url = $this->url.sprintf("&service=%s&reseller_filter=%s&customer_filter=%s", + $_customer_url = $this->url.sprintf("&service=%s&reseller_filter=%s&customer_filter=%s", hunk ./library/ngnpro_client.php 11557 - $_customers_url, + $_customer_url, hunk ./library/ngnpro_soap_library.php 4 - Copyright (c) 2007-2008 AG Projects + Copyright (c) 2007-2009 AG Projects hunk ./library/ngnpro_soap_library.php 782 + function &updateCarrier($carrier) + { + // carrier is a ComplexType Carrier, + // refer to wsdl for more info + $carrier = new SOAP_Value('carrier', '{urn:AGProjects:NGNPro}Carrier', $carrier); + $result = $this->call('updateCarrier', + $v = array('carrier' => $carrier), + array('namespace' => 'urn:AGProjects:NGNPro:Sip', + 'soapaction' => '', + 'style' => 'rpc', + 'use' => 'encoded')); + return $result; + } hunk ./library/ngnpro_soap_library.php 831 + function &updateRoutes($routes) + { + // routes is a ComplexType RouteArray, + // refer to wsdl for more info + $routes = new SOAP_Value('routes', '{urn:AGProjects:NGNPro}RouteArray', $routes); + $result = $this->call('updateRoutes', + $v = array('routes' => $routes), + array('namespace' => 'urn:AGProjects:NGNPro:Sip', + 'soapaction' => '', + 'style' => 'rpc', + 'use' => 'encoded')); + return $result; + } hunk ./library/ngnpro_soap_library.php 1372 - function &addGateway($gateway) { - // gateway is a ComplexType Gateway, - //refer to wsdl for more info - $gateway =& new SOAP_Value('gateway','{urn:AGProjects:NGNPro}Gateway',$gateway); - return $this->call("addGateway", - $v = array("gateway"=>$gateway), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &deleteGateway($name) { - return $this->call("deleteGateway", - $v = array("name"=>$name), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &getGateways($query) { - // query is a ComplexType GatewayQuery, - //refer to wsdl for more info - $query =& new SOAP_Value('query','{urn:AGProjects:NGNPro}GatewayQuery',$query); - return $this->call("getGateways", - $v = array("query"=>$query), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &addGatewayGroup($group) { - return $this->call("addGatewayGroup", - $v = array("group"=>$group), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &deleteGatewayGroup($name) { - return $this->call("deleteGatewayGroup", - $v = array("name"=>$name), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &getGatewayGroups($query) { - // query is a ComplexType GatewayGroupQuery, - //refer to wsdl for more info - $query =& new SOAP_Value('query','{urn:AGProjects:NGNPro}GatewayGroupQuery',$query); - return $this->call("getGatewayGroups", - $v = array("query"=>$query), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &addRoutes($routes) { - // routes is a ComplexType RouteArray, - //refer to wsdl for more info - $routes =& new SOAP_Value('routes','{urn:AGProjects:NGNPro}RouteArray',$routes); - return $this->call("addRoutes", - $v = array("routes"=>$routes), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &deleteRoutes($routes) { - // routes is a ComplexType RouteArray, - //refer to wsdl for more info - $routes =& new SOAP_Value('routes','{urn:AGProjects:NGNPro}RouteArray',$routes); - return $this->call("deleteRoutes", - $v = array("routes"=>$routes), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - } - function &getRoutes($query) { - // query is a ComplexType RouteQuery, - //refer to wsdl for more info - $query =& new SOAP_Value('query','{urn:AGProjects:NGNPro}RouteQuery',$query); - return $this->call("getRoutes", - $v = array("query"=>$query), - array('namespace'=>'urn:AGProjects:NGNPro:Network', - 'soapaction'=>'', - 'style'=>'rpc', - 'use'=>'encoded' )); - }