| 
 
 
			| Joined: 08 Dec 2008 |  | Posts: 35 |  |  |    |  | 
	
		|  Posted: Thu Dec 15, 2011 3:25 pm |  |  |  |  
		|  |  |  I have searched the forums repeatedly and either missed completely any posts related to this or they do not work. I can connect to eh server code just fine but when I try to process the data on the server, it is not working. I am trying to debug the code but cannot get it to stop in the server script. I tried the DebugBreak(); in the server but I get the strange message: "looks like we got no XML document". I can find no way to debug the server.
 
Can anyone help?
 
I am using nusoap as my soap server with the following code:
  	 	| <?php
 
 require_once('lib/nusoap.php');
 //require_once('fvsoap.php');
 
 $NTS_soapserver = new nusoap_server();//nusoap_server;
 
 $NTS_soapserver->configureWSDL('NTS_soapserver', 'urn:NTS_soapserver');
 
 $NTS_soapserver->wsdl->schemaTargetNamespace = 'urn:NTS_soapserver';
 DebugBreak();
 $NTS_soapserver->register('NTSServer_Notes',
 array('id' => 'xsd:int', 'key'=>'xsd:int', 'notes'=>'xsd:string'),
 array('return' => 'xsd:string'),
 'urn:NTS_soapserver',
 'urn:server#NTSServer_Notes');
 $NTS_soapserver->register('NTSServer_Shipment',
 array('id' => 'xsd:int', 'key'=>'xsd:int', 'shipmentDetail'=>'xsd:string'),
 array('return' => 'xsd:string'),
 'urn:NTS_soapserver',
 'urn:NTS_soapserver#NTSServer_Shipment');
 $NTS_soapserver->register('NTSServer_PU',
 array('id' => 'xsd:int', 'key'=>'xsd:int', 'PUDetail'=>'xsd:string'),
 array('return' => 'xsd:string'),
 'urn:NTS_soapserver',
 'urn:server#NTSServer_PU');
 
 function NTSServer_Shipment($arr){
 include_once ($_SERVER['DOCUMENT_ROOT'].'/truck/inc/fvsoap.inc.php');
 $id = $arr['id'];
 $key = $arr['key'];
 $xml = $arr['shipmentDetail'];
 $fv = new fvsoap($id, $key);
 
 if($fv->access){
 return '<?xml version="1.0"?><LABEL>(id ='.$id.', key='.$key.') The value of the server poll resulted in good information</LABEL>';
 }
 else{
 return '<?xml version="1.0"?><LABEL>(id ='.$id.', key='.$key.') The value of the server poll showed poor information</LABEL>';
 }
 }
 function NTSServer_Notes($id, $key, $notes){
 include_once ($_SERVER['DOCUMENT_ROOT'].'/truck/inc/fvsoap.inc.php');
 if($id > 0)return '<?xml version="1.0"?><LABEL>The value of the server poll resulted in good information</LABEL>';
 else return '<?xml version="1.0"?><LABEL>The value of the server poll showed poor information</LABEL>';
 }
 function NTSServer_PU($id, $key, $PUDetail){
 include_once ($_SERVER['DOCUMENT_ROOT'].'/truck/inc/fvsoap.inc.php');
 if($id > 0)return '<?xml version="1.0"?><LABEL>The value of the server poll resulted in good information</LABEL>';
 else return '<?xml version="1.0"?><LABEL>The value of the server poll showed poor information</LABEL>';
 }
 
 $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
 
 $NTS_soapserver->service($HTTP_RAW_POST_DATA);
 ?>
 
 | 
I am trying to access the soap server with the following (same machine):
  	 	| $xml = '<some valid xml>';
 $url = 'http://localhost/truck/soap/NTS_soapserver.php?wsdl';
 $params   = array(
 'id'                => 488,
 'key'               => 63537,
 'shipmentDetail'    => $xml,
 );
 try{
 ini_set('soad.wsdl_cache_enabled',0);
 $result = @new SoapClient($url, array("trace" => 1, "exception" => 0)); //SoapClient($url);
 $functions = $result->__getFunctions();
 
 $responseXML = $result->NTSServer_Shipment($params);
 $response = simplexml_load_string($responseXML);
 if(isset($response['NTS']['ERROR_LIST'])){
 $result = 'SOAP Execution FAILED for an unspecified reason!';
 }
 else (isset($response['NTS']['LABEL'])){
 $result = 'SOAP Execution was SUCCESSFULL!';
 }
 $retval = true;
 }
 catch(SoapFault $e){
 echo $e->faultstring;
 $retval = false;
 $result = 'SOAP Execution FAILED for an unspecified reason!';
 }
 break;
 
 | 
 | 
	| 
 |