2014-01-14 93 views
0

我想使用ServiceStack來替換自我託管的服務的WCF,訪問與從WSDL形成其消息的PHP客戶端。使用Servicestack WSDL與php

通過ServiceStack產生的WSDL有一個名爲 「相提並論」,例如 「部件名稱」:

<wsdl:message name="GetServiceDetailsIn"> 
    <wsdl:part name="par" element="tns:GetServiceDetails" />  
</wsdl:message> 

然後由PHP產生的SOAP請求如下所示:

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
    <SOAP-ENV:Body><par/></SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

,而不是這個從內置幫助:

<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soap:Body> 
     <GetServiceDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:Shout" /> 
    </soap:Body> 
</soap:Envelope> 

PHP客戶端使用par標記代替o f GetServiceDetails,它得到一個空白的迴應。可以在ServiceStack中重命名或刪除「部件名稱」定義嗎?

回答

0

看來你不能在ServiceStack中做任何有關此操作的東西,它的設計也無法與PHP一起工作。但是,如果您在發送PHP之前使用查找和替換(或XSLT)來調整XML標記,您可以使其工作。