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.
5) The purpose of ASMX services is to send and receive data using SOAP over HTTP protocol. However, WCF services can send and receive data using any format over different protocols like HTTP, HTTPS, TCP, MSMQ etc.
WCF completely replaces ASMX web services. ASMX is the old way to do web services and WCF is the current way to do web services. All new SOAP web service development, on the client or the server, should be done using WCF.
You use an *. asmx file to create an ASP.NET Web Service. This file contains your service implementation and is needed for hosting the service. ASP.NET automatically generates the WSDL or "service description" for your service by reflecting over the types in your service.
WSDL stands for Web Service Description Language. The WCF service exposes the WSDL document for the clients, to generate proxies and the configuration file. The WSDL file provides the following information for the consumers of the WCF service.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With