我在PHP中遇到了SOAP相关问题。包含标题的完整请求应如下所示。
POST /fastjet/vrsxmlservice/VrsXmlWebService3.asmx HTTP/1.1
主持人:customer3.videcom.com Content-Type:text / xml;字符集= utf-8的 内容长度:长度 SOAPAction:" http://videcom.com/RunVRSCommand"
<?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>
<msg xmlns="http://videcom.com/">
<Token>string</Token>
<Command>string</Command>
</msg>
</soap:Body>
</soap:Envelope>
我打电话是这样的:
$client = new soapClient('http://www.customer3.videcom.com//fastjet/vrsxmlservice/VrsXmlWebService3.asmx');
$client->$client->RunVRSCommand(array('token'=>myToken, 'command'=>theCommand));
但是我收到错误:未捕获的SoapFault异常:[HTTP]无法解析URL
答案 0 :(得分:0)
您的网址中有两个正斜杠。你应该在.com
之后只有一个:
$client = new soapClient('http://www.customer3.videcom.com/fastjet/vrsxmlservice/VrsXmlWebService3.asmx');