Home » Web Services » SOAP » Bug #9571
dev
Details
| Submitted | 2006-12-07 13:46 UTC |
|---|---|
| From | flare1320 at gmail dot com |
| Status | No Feedback |
| Package | SOAP |
| PHP Version | 4.3.0 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2006-12-07 13:46 UTC] flare1320 at gmail dot com
Description:
------------
Parse error: syntax error, unexpected '-', expecting ')' in /home/rplus/public_html/dev/elmer/fastbet/SOAP/WSDL.php(727) : eval()'d code on line 7
Fatal error: Class 'WebService_XmlGatewayServiceService_gatewayA' not found in /home/rplus/public_html/dev/elmer/fastbet/SOAP/WSDL.php on line 729
Test script:
---------------
<?php
error_reporting(E_ALL & ~E_NOTICE);
include('SOAP/Client.php');
// --------------------------------------------------
// Some variables we'll use.
// --------------------------------------------------
$keypath = 'FULL_PATH_TO_FOLDER_CONTAINING_KEYS';
$xg_root_cert = $keypath .'xg_root.cer';
$xg_client_cert = $keypath . 'xg_client.cer';
$xg_client_pk = $keypath . 'xg_client_pk.txt';
$svc = 'edu.utexas.its.t0xmlg.t0dwxgtt.test';
$input_ns = 'http://xmlgateway.its.utexas.edu/service/' . $svc;
$query_ns = 'http://xmlgateway.its.utexas.edu/prod';
// --------------------------------------------------
// Create a SOAP_WSDL object from the service's WSDL
// --------------------------------------------------
$wsdl = new SOAP_WSDL('http://xmlgateway.its.utexas.edu/xg/wsdl/' . $svc);
// --------------------------------------------------
// Generate the proxy/stub classes and assign SSL keys.
// --------------------------------------------------
$soapclient = $wsdl->getProxy();
$soapclient->setOpt('curl', CURLOPT_VERBOSE, true);
$soapclient->setOpt('curl', CURLOPT_CAINFO, $xg_root_cert);
$soapclient->setOpt('curl', CURLOPT_SSLCERT, $xg_client_cert);
$soapclient->setOpt('curl', CURLOPT_SSLKEY, $xg_client_pk);
// --------------------------------------------------
// Building the request SOAP value
// --------------------------------------------------
$test_input_inner[] =& new SOAP_Value('{'.$input_ns.'}subprogram', 'string', '');
$test_input_inner[] =& new SOAP_Value('{'.$input_ns.'}webtoken', 'string', '');
$test_input_inner[] =& new SOAP_Value('{'.$input_ns.'}msg', 'string', 'hello');
$test_input =& new SOAP_Value('{'.$input_ns.'}'.$svc.'-input', '',
$test_input_inner);
$query_inner[] =& new SOAP_Value('{'.$query_ns.'}service', 'string', $svc);
$query_inner[] =& new SOAP_Value('{'.$query_ns.'}input-data', '', $test_input);
$query =& new SOAP_Value('{'.$query_ns.'}query', '', $query_inner);
$input[] =& new SOAP_Value('{'.$query_ns.'}outputWithLineBreaks', 'string', '');
$input[] =& new SOAP_Value('{'.$query_ns.'}outputWithTabs', 'string', '');
$input[] =& $query;
// --------------------------------------------------
// Call the web service and get the results
// --------------------------------------------------
$ret = $soapclient->getInfo($input);
print "\n\nThe value returned by the call:";
print '<blockquote><pre>';
print $ret['response']->{"output-data"}->{"$svc-output"}->{"msg-plus-date-time"};
print '</pre></blockquote>';
print "\n\nThis is the entire result object:";
print '<blockquote><pre>';
ob_start();
print_r($ret);
$out = ob_get_contents();
ob_end_clean();
print htmlentities($out);
print '</pre></blockquote>';
?>
Expected result:
----------------
xml output