我正在使用webservice进行简历解析,但他的webservice返回错误。请查看我的代码并尽快通知我。我从最近1天开始尝试,但一直都没有。
$client = new SoapClient("http://services.resumeparsing.com/ResumeService.asmx?wsdl");
$data = 'POST /ResumeService.asmx HTTP/1.1
Host: services.resumeparsing.com
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://services.resumeparsing.com/ParseResume"
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<ParseResume xmlns="http://services.resumeparsing.com/">
<request>
<AccountId>36463356</AccountId> <ServiceKey>70ZgH1VZztLWIqNMByDnkjMImOkHS060kPjIObwP</ServiceKey>
<FileBytes>'.$contents.'</FileBytes>
</request>
</ParseResume>
</soap12:Body>
</soap:Envelope>';
$result = $client->ParseResume($data);
print_r($result);
但回应是
stdClass对象([Code] =&gt; MissingRequestParameter [Message] =&gt;缺少请求参数:缺少名为'request'的必需参数。[UsesRemaining] =&gt; 0)
我无法理解这个请求中遗漏了什么,我已经在.net中完成了这个并且它工作正常但在php中它不起作用....