2012-04-06 112 views
0

嗨我想創建一個soap服務。當我運行它,服務正常啓動,但我不能從PHP連接到它,因爲我得到以下錯誤:wcf soap服務web.config錯誤

致命錯誤:在ç超過了最長30秒的執行時間:\ XAMPP \ htdocs中\ soaptest \ soaptest.php上線

線6:$客戶=新SoapClient的(的 'http://本地主機:1741/TopicService.svc WSDL'); 這裏是我的web.config

<system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    <trace enabled="false"/> 
    <httpRuntime maxRequestLength="100000000" /> 
</system.web> 

<system.serviceModel> 

    <services> 
     <service name="PptxToTopicWebService.TopicService"> 
      <endpoint address="soap" behaviorConfiguration="PptxToTopicWebService.ITopicService" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding1" contract="PptxToTopicWebService.ITopicService" /> 
     </service> 
    </services> 
    <behaviors> 
     <endpointBehaviors> 
      <behavior name="PptxToTopicWebService.ITopicService"> 
      </behavior> 
     </endpointBehaviors> 
     <serviceBehaviors> 
      <behavior name=""> 
       <dataContractSerializer maxItemsInObjectGraph="2147483647" /> 
       <serviceMetadata httpGetEnabled="true" /> 
       <serviceDebug includeExceptionDetailInFaults="true" /> 
      </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="0" /> 
    <bindings> 
     <basicHttpBinding> 
      <binding name="basicHttpBinding1" maxReceivedMessageSize="10000000" maxBufferSize="10000000"> 
       <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> 
      </binding> 
     </basicHttpBinding> 
    </bindings> 
</system.serviceModel> 

我到底做錯了什麼?

回答

0

修改您的結束點,如下所述。它會工作。似乎服務需要更多時間來回應。

<bindings> 
       <basicHttpBinding> 
        <binding name="basicHttpBinding1" maxReceivedMessageSize="10000000" maxBufferSize="10000000" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"> 
         <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> 
        </binding> 
       </basicHttpBinding> 
      </bindings> 
+0

它的工作原理!非常感謝! – 2012-04-10 07:35:36