/*$client = new SoapClient('http://www.webservicex.net/ConvertTemperature.asmx?WSDL'); $function = 'ConvertTemp'; $arguments= array('ConvertTemp' => array( 'Temperature' => 31, 'FromUnit' => 'degreeCelsius', 'ToUnit' => 'degreeFahrenheit' )); $options = array('location' => 'http://www.webservicex.net/ConvertTemperature.asmx'); $result = $client->__soapCall($function, $arguments, $options); echo 'Response: '; print_r($result);*/ function object2Array($d){ if (is_object($d)) $d = get_object_vars($d); if (is_array($d)) return array_map(__FUNCTION__, $d); else return $d; } function array2Object($d){ if (is_array($d)) return (object) array_map(__FUNCTION__, $d); else return $d; } try{ //$client = new SoapClient("http://10.134.25.22:8081/ws/FIEWS006.apw?WSDL"); $client = new SoapClient("http://10.134.25.22:8081/ws/FIEWS006.apw?WSDL", array('trace' => true)); $function = 'INC_ALT'; $arguments = array('RQ_CIC' => '23456789116', 'RQ_FILIAL' => '21', 'RQ_MAT' => '4321', 'RQ_NOME' => 'Ton'); $arguments = array2Object($arguments); //$options = array('location' => 'http://10.134.25.22:8081/ws/FIEWS006.apw'); $result = $client->__call($function, $arguments); //$result = $client->__getFunctions(); //$result = $client->__getTypes(); //$client->addAds(array('ads' => array($sample_ad) ); echo '
' . (array) $client->__getLastRequest . ''; echo '
' . (array) $client->__getLastResponse . ''; print_r($result); } catch(SoapFault $e){ var_dump($e); } echo 'Response: '; print_r($result); /*$client = new SoapClient("http://10.134.25.22:8081/ws/FIEWS006.apw?WSDL"); print_r($client->__call("INC_ALT", array('RQ_CIC' => '23456789116', 'RQ_FILIAL' => '21', 'RQ_MAT' => '4321', 'RQ_NOME' => 'Ton'), array("uri" => "urn:xmethods-delayed-quotes","soapaction" => "urn:xmethods-delayed-quotes#getQuote")));*/ ?>