2012-09-25 73 views
1
我有未捕获的SOAPFault异常错误

:[HTTP]未找到SOAP HTTP未找到

这里是我的代码

$client = new SOAPClient ('http://torcache.net/torcache.wsdl'); 
$infoHash = $client->cacheTorrent(base64_encode(file_get_contents('my.torrent'))); 

这里是WSDL

<?xml version='1.0' encoding='UTF-8' ?> 
<definitions name='Cache' 
    targetNamespace='urn:Torcache' 
    xmlns:tns='urn:Torcache' 
    xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
    xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
    xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
    xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
    xmlns='http://schemas.xmlsoap.org/wsdl/'> 

<message name='cacheTorrentRequest'> 
    <part name='torrent' type='xsd:string'/> 
</message> 

<message name='cacheTorrentResponse'> 
    <part name='Result' type='xsd:string'/> 
</message> 

<portType name='CachePortType'> 
    <operation name='cacheTorrent'> 
    <input message='tns:cacheTorrentRequest'/> 
    <output message='tns:cacheTorrentResponse'/> 
    </operation> 
</portType> 

<binding name='CacheBinding' type='tns:CachePortType'> 
    <soap:binding style='rpc' 
    transport='http://schemas.xmlsoap.org/soap/http'/> 

    <operation name='cacheTorrent'> 
    <soap:operation soapAction='urn:xmethods-delayed-quotes#cacheTorrent'/> 
    <input> 
     <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' 
     encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </input> 
    <output> 
     <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' 
     encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </output> 
    </operation> 
</binding> 

<service name='CacheService'> 
    <port name='CachePort' binding='CacheBinding'> 
    <soap:address location='http://torcache.net/api/soap/'/> 
    </port> 
</service> 
</definitions> 

我的服务器统计信息

PHP版本5.3.15

任何想法为什么我得到这个错误?我已经从他们的api页面获得这个示例脚本 https://torcache.net/api

回答

0

我从来没有得到远程Wsdl加载与PHP的soapclient。要测试,请尝试将wsdl下载到本地文件,并使用根目录'/'中的绝对文件路径而不是网址。如果它正常工作,正如我所料,至少你肯定它不是你的错,但确定它是图书馆中的一个错误。我认为php开发世界中没有人关心肥皂,没有人正在解决这个问题。或者,也许我们只是错过了一些明显的东西....

如果你不介意php 5.3不推荐使用的警告,你可以找到旧的nusoap库的一个副本,并使用它 - 它加载远程wsdls没有任何问题。

+0

感谢您的回答我会研究nusoap –