我试图用肥皂向另一台服务器发送用户注册。我用DOMdocument创建了一个xml文件,而不是saveXML文件后我运行的是soap,它应该返回一个带有注册ID的xml以及我在xml中发送的所有数据。 但肥皂返回未知错误。正是这个:stdClass Object ([RegisztracioInsResult] => stdClass Object ([any] => 5Unknown error))
用soap发送XML返回unknown unknown rerror
这就是我如何发送我的XML。
/*xml creation with DOMdocument*/
$xml = saveXML();
$url = 'http://mx.biopont.com/services/Vision.asmx?wsdl';
$trace = '1';
$client = new SoapClient($url, array('trace' => $trace, "exceptions" => 0, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS));
$params = $client->RegisztracioIns(array('xml' => $xml));
$print_r($params);
如果我点击RegisztracioIns服务在此URL http://mx.biopont.com/services/Vision.asmx说明它表明我:
POST /services/Vision.asmx HTTP/1.1
Host: mx.biopont.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://mx.biopont.com/services/RegisztracioIns"
<?xml version="1.0" encoding="utf-8"?>
<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/">
<soap:Body>
<RegisztracioIns xmlns="http://mx.biopont.com/services/">
<xml>string</xml>
</RegisztracioIns>
</soap:Body>
</soap:Envelope>
根据这一点,我认为我正确的,但也许做上传没有我不用肥皂没有太多经验。
有什么我失踪?我也尝试将xml保存到我的服务器上,而不是使用file_get_contents()获取内容。但结果是一样的。