2012-07-18 79 views
0

我正在使用PHP的web服務。一個服務調用返回值,當我單獨使用它時,但當我使用它與多個函數它正在調用,但不返回值。單個WSDL是這樣的:對於MessageRS()php肥皂webservices服務器上不工作

<?xml version ='1.0' encoding ='utf-8' ?> 
<definitions name='shop' 
    targetNamespace='http://localhost/soap/' 
    xmlns:tns='http://localhost/soap/' 
    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='messageRQ'> 
    <part name='sendXML' type='xsd:string'/> 
    </message> 
    <message name='messageRS'> 
    <part name='Result' type='xsd:string'/> 
    </message> 

    <portType name='CatalogPortType'> 

    <operation name='MessageRS'> 
     <input message='tns:messageRQ'/> 
     <output message='tns:messageRS'/> 
    </operation> 

    </portType> 

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

    <operation name='MessageRS'> 
     <soap:operation soapAction='urn:localhost-catalog#MessageRS'/> 
     <input> 
      <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
      <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 
    </binding> 

    <service name='CatalogService'> 
    <port name='CatalogPort' binding='CatalogBinding'> 
     <soap:address location='http://1mp1.viewthedemo.com/s/server/server.php'/> 
    </port> 
    </service> 
</definitions> 

並用

<message name='getCatalogRequest'> 
    <part name='catalogId' type='xsd:string'/> 
    </message> 
    <message name='getCatalogResponse'> 
    <part name='Result' type='xsd:string'/> 
    </message> 

    <message name='manufacturerRQ'> 
    <part name='manufacturerRQxml' type='xsd:string'/> 
    </message> 
    <message name='mamufacturerRS'> 
    <part name='Result' type='xsd:string'/> 
    </message> 

    <message name='messageRQ'> 
    <part name='sendXML' type='xsd:string'/> 
    </message> 
    <message name='messageRS'> 
    <part name='Result' type='xsd:string'/> 
    </message> 

    <message name='saveRQ'> 
    <part name='SaveRQParameter' type='xsd:string'/> 
    </message> 
    <message name='saveRS'> 
    <part name='Result' type='xsd:string'/> 
    </message> 

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

    <message name='SettingRQ'> 
    <part name='xml' type='xsd:string'/> 
    </message> 
    <message name='SettingRS'> 
    <part name='Result' type='xsd:string'/> 
    </message> 





    <portType name='CatalogPortType'> 
    <operation name='getCatalogEntry'> 
     <input message='tns:getCatalogRequest'/> 
     <output message='tns:getCatalogResponse'/> 
    </operation> 
    <operation name='ManufacturerRS'> 
     <input message='tns:manufacturerRQ'/> 
     <output message='tns:mamufacturerRS'/> 
    </operation> 
    <operation name='MessageRS'> 
     <input message='tns:messageRQ'/> 
     <output message='tns:messageRS'/> 
    </operation> 

    <operation name='SaveRS'> 
     <input message='tns:saveRQ'/> 
     <output message='tns:saveRS'/> 
    </operation> 
    <operation name='Product_list'> 
     <input message='tns:Product_list'/> 
     <output message='tns:Product_list'/> 
    </operation> 
    <operation name='SettingRS'> 
     <input message='tns:SettingRQ'/> 
     <output message='tns:SettingRS'/> 
    </operation> 


    </portType> 

    <binding name='CatalogBinding' type='tns:CatalogPortType'> 
    <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> 
    <operation name='getCatalogEntry'> 
     <soap:operation soapAction='urn:localhost-catalog#getCatalogEntry'/> 
     <input> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 

    <operation name='ManufacturerRS'> 
     <soap:operation soapAction='urn:localhost-catalog#ManufacturerRS'/> 
     <input> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 

    <operation name='MessageRS'> 
     <soap:operation soapAction='urn:localhost-catalog#MessageRS'/> 
     <input> 
      <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
      <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 

    <operation name='SaveRS'> 
     <soap:operation soapAction='urn:localhost-catalog#SaveRS'/> 
     <input> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 

    <operation name='Product_list'> 
     <soap:operation soapAction='urn:localhost-catalog#Product_list'/> 
     <input> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 

    <operation name='SettingRS'> 
     <soap:operation soapAction='urn:localhost-catalog#Product_list'/> 
     <input> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </input> 
     <output> 
     <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
     </output> 
    </operation> 

那麼它是不是在客戶端頁發送值使用時。

+0

你會得到什麼錯誤?什麼是服務器和本地主機操作系統版本? – Peon 2012-07-18 07:15:04

+0

可能也想看看mime類型。 – 2012-07-18 07:18:31

回答

0

我想你首先需要檢查服務器上是否啓用了soap擴展。你可以使用phpinfo()檢查soap擴展。

+0

我的本地主機PHP版本5.3.5和服務器PHP版本5.2.17 – Bidyut 2012-07-18 07:31:49