I am new to NuSoap and am trying to implement it with using a purolator module (oh what fun..)
I am getting the following error: Fatal error: Class 'SoapHeader' not found in …
//Define the Production (or development) Key and Password
//Define the Billing account and the account that is registered with PWS
/** Purpose : Creates a SOAP Client in Non-WSDL mode with the appropriate authentication and
* header information
//Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials
$client = new SoapClient( "./wsdl/shippingservice.wsdl",
'trace' => true,
//'location' => "https://webservices.purolator.com/PWS/V1/Shipping/ShippingService.asmx",
'login' => PRODUCTION_KEY,
'password' => PRODUCTION_PASS
//Define the SOAP Envelope Headers
# '<soap:Header xmlns="http://purolator.com/pws/datatypes/v1><RequestContext><Version>1.0</Version><Language>en</Language><GroupID>xxx</GroupID><RequestReference>Rating Sample</RequestReference></RequestContext></soap:Header>';
$headers = new SoapHeader("http://purolator.com/pws/datatypes/v1",
'Version' => '1.0',
'Language' => 'en',
'GroupID' => 'xxx',
'RequestReference' => 'Rating Example'
//Apply the SOAP Header to your client
I downloaded the NuSoap package from SourceForge.
I read through all the NuSoap provided php file for the class 'soapheader' (not case sens.) but couldn't find it.
Can someone guide me or help me into the right direction please?
me too facing similar issue
Fatal error: Class 'SoapVar' not found
Fatal error: Class 'SoapHeader' not found
My code is as below
$auth = array('User_id'=>'ravi','Password'=>'r2','ExternalPartyName'=>'');
$authvar = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader('http://subscribe/IntegrationService', 'MQUserNameToken xmlns="http://subscribe/IntegrationService"', $authvar, false);
$client=new soapclient($wsdl, 'wsdl');
echo $client->call('GetItems', $param)."\n";
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
NuSOAP does not have SoapVar or SoapHeader classes. The code looks like it is for the SOAP library for PHP. Some PHP installations do not have this library available. That is one reason NuSOAP is popular: it is just PHP code, so it does not matter how the PHP engine you are using was built.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.