2010-06-25 119 views
0

我已經編寫了一個SOAP服務,以便我的Silverlight應用程序可以將entires添加到我的數據庫中。服務器是用PHP編寫的,爲了測試一切,我寫了一個PHP客戶端。PHP SOAP服務器正在發送部分響應

我的客戶似乎正在發送請求。這是產生什麼,當我打電話_getLastRequest():

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope 
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns1="urn:blogPosts" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"   
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 

    <SOAP-ENV:Body> 
     <ns1:saveBlogPost> 
      <userId xsi:type="xsd:int">1</userId> 
      <catId xsi:type="xsd:int">1</catId> 
      <subCatId xsi:type="xsd:int">1</subCatId> 
      <title xsi:type="xsd:string">Web Service Test</title> 
      <blogPost xsi:type="xsd:string">Testing</blogPost> 
     </ns1:saveBlogPost> 
    </SOAP-ENV:Body> 

</SOAP-ENV:Envelope> 

然而,當服務器響應,只顯示部分消息:

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope 
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns1="urn:blogPosts" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 

    <SOAP-ENV:Body> 
     <ns1:saveBlogPostRe 

我收到的錯誤消息「看起來,我們得到了沒有XML文檔「。

任何幫助你可以提供將不勝感激。

+0

哦,響應應該回來作爲布爾值。在被調用的函數中,我簡單地返回true。 – Quentamia 2010-06-25 04:43:28

回答

-1

我的解決方案:忘記SOAP並使用REST :)