2014-01-14 49 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标记,您可以使其工作。