我正在使用网络服务进行简历解析,但他的网络服务返回错误。请查看我的代码并尽快让我知道。我从最后 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] => MissingRequestParameter [Message] => 缺少请求参数:缺少名为“request”的必需参数。[UsesRemaining] => 0)
我无法理解这个请求中遗漏了什么,我已经在.net 中完成了这个并且它工作正常,但在 php 中它不起作用....