rn";$soapData .= "<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xml
soap.org/soap/envelope/"rn";$soapData .= " <soap:Bodyrn";$soapData .= " <$action xmlns="$namespace"rn";foreach($data as $name = $value) {$name = iconv("GBK","UTF-8",$name);$value= iconv("GBK","UTF-8",$value);$soapData .= " <$name$value</$namern";}$soapData .= " </$actionrn";$soapData .= " </soap:Bodyrn";$soapData .= "</soap:Envelope";return $soapData;}
<?
$data=array(
'user'='测试', //如果需要输入二进制数据请采用BASE64编码
'pass'='test'
);
echo HttpSoap('