HTTP Request in SOAP

I’m a student/Intern at an Agency and I was asked to test an HTTP request to a server using a code given in the servers doc which goes like this :


$client = new httpClient;

$request = new http\Client\Request;

$body = new http\Message\Body;


<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">

<soap:Body> <WebServiceDiva xmlns="">



{licence:"XXXXX=",client: {"dos":"2","nom":"Alex Xela","adr1":"53 Bd Carnot","adr2":"","adr3":"","adr4":"","cpostal":"06400","vil":"Cannes","tel":"053837979","email":"[email protected]","siret":"","naf":"","regcod":"CB","tvatie":"0","catclicod":"","tacod":"","tarcod":"","blmod":"DPD","texcod1":"","texcod2":"","texcod3":"","texcod4":"","tvano":"","visa":"2"},adresse: {"nom":"Alex Xela","adr1":"53 Bd Carnot","adr2":"","adr3":"","adr4":"","cpostal":"06400","ville":"","tel":"053837979","email":"[email protected]","livprincipale":"2","facprincipale":""},contact: {"contact":"Customer","nom":"Alex Xela","prenom":"","tit":"","lib":"","tel":"","telgsm":"","fax":"","email":"[email protected]","servcod":"","fctcod":""},banque: {"ribcod":"","ribdo":"","iban1":"","iban2":"","iban3":""}}




</soap:Envelope> ');

$request->setRequestUrl(''); $request->setRequestMethod('POST');


$request->setHeaders(array( 'accept-encoding' => 'gzip', 'content-type' => 'text/xml' ));


$response = $client->getResponse();

echo $response->getBody();


The problem is I can’t even get throught the first lines when I execute the code, It says that there is no class Http\Client or Http\Client\Message or Http\Client\Request. and I looked for these classes in php doc but couldn’t find anything. also after 3 days of research I only found SaopClient and SoapCall Classes that really treat HTTP and SOAP communication but the tech guy at the server company tells me that this is the way to connect using php and I’m completely lost and need ur help

Are you autoloading? I dont see any import of any classes?

What web server would this be, as that would provide a starting point to look for the needed class definitions?

Sponsor our Newsletter | Privacy Policy | Terms of Service