【发布时间】:2014-02-03 20:23:48
【问题描述】:
我正在尝试使用 ServiceStack 来替换 WCF 以实现自托管服务,通过 PHP 客户端进行访问,该客户端从 WSDL 中形成其消息。
ServiceStack 生成的 WSDL 具有称为“par”的“部件名称”,例如:
<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 标签而不是GetServiceDetails,它得到一个空白响应。 ServiceStack中可以重命名或删除“部件名称”定义吗?
【问题讨论】:
标签: wsdl servicestack