You have a couple of options! You could use soap objects to create the request which, based upon a WSDL will know the correct way to talk to the remote server. You can see how to do this at the PHP manual.
Alternatively, you can use CURL to do the work. You'll need to know where to post the data to (which it looks like is in the example above), then you can just do something like this:
$curlData = "<?xml version="1.0" encoding="utf-8"?>... etc";
$url='http://wherever.com/service/';
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_TIMEOUT,120);
curl_setopt($curl,CURLOPT_ENCODING,'gzip');
curl_setopt($curl,CURLOPT_HTTPHEADER,array (
'SOAPAction:""',
'Content-Type: text/xml; charset=utf-8',
));
curl_setopt ($curl, CURLOPT_POST, 1);
curl_setopt ($curl, CURLOPT_POSTFIELDS, $curlData);
$result = curl_exec($curl);
curl_close ($curl);
You then should have the result in the $result var. You can then try to convert it to an XML doc, although sometimes I've found due to encoding this doesn't work:
$xml = new SimpleXMLElement($result);
print_r($xml);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…