Different WSDL ASMX,WCF web

I've got asmx web-service, which is succefully consumed from other clients(.NET,Delphi).

I try come to wcf, and write the same logic at WCF service(basicHttpBinding for interopability). (.net client consume ok, but delphi 7 couldn't call this service).

I start research differences between two services(asmx,wcf) and detect that their wsdl are diffrent:

WSDL asmx:

<s:element name="Test">

<s:complexType>

<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="a" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>

<s:element name="TestResponse">

<s:complexType>

<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="TestResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>

wsdl of wcf is rather different:

<wsdl:operation name="Test"> <soap:operation soapAction="http://tempuri.org/ISyncer/Test" style="document"/>

<wsdl:input> <soap:body use="literal"/> </wsdl:input>

<wsdl:output> <soap:body use="literal"/> </wsdl:output>

<wsdl:fault name="ServiceFaultExceptionFault"> <soap:fault name="ServiceFaultExceptionFault" use="literal"/> </wsdl:fault> </wsdl:operation>

I think it's a reson why delphi can't generate correct proxy.

Can i config wcf to generate wsdl the same as asmx.

Thanks.


You must flatten the WSDL . look at http://geekswithblogs.net/EltonStoneman/archive/2008/07/30/flattening-wsdl-from-wcf-services.aspx and http://wcfextras.codeplex.com/ for information.

链接地址: http://www.djcxy.com/p/71292.html

上一篇: 用于iOS应用程序的WCF或Web服务(.asmx)?

下一篇: 不同的WSDL ASMX,WCF web