开发者

PHP SOAP server is sending back a partial response

I've written a SOAP service so my Silverlight application can add entires into my database. The server is written in PHP, and in order to test everything, I've written a PHP client.

My client seems to be sending its request correctly. This is what is generated when I call _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开发者_如何学Go: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>

However, when the server responds, only a partial message appears:

<?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

The error message I receive is "looks like we got no XML document".

Any help you could provide would be greatly appreciated.


My solution: forget SOAP and use REST :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜