I am having difficulty in sending a block of XML to a WCF Web Service using the NuSoap library.
This is what I have so far:
PHP Code:
$xmlRequest = '<?xml version="1.0" encoding="utf-8"?>'; $xmlRequest .= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'; $xmlRequest .= '<soap:Body>'; $xmlRequest .= '<GetAddressCollection>'; $xmlRequest .= '<postCode>'.$postcode.'</postCode>'; $xmlRequest .= '</GetAddressCollection>'; $xmlRequest .= '</soap:Body>'; $xmlRequest .= '</soap:Envelope>';
$client = new nusoap_client('http://website/ws/service.asmx?WSDL', true);
return $client->send('GetAddressCollection', $xmlRequest);
Has anyone manged to do this or could me out?
Thanks
|