Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different WSDL ASMX,WCF web-services

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.

like image 562
Andrew Kalashnikov Avatar asked May 27 '11 06:05

Andrew Kalashnikov


People also ask

What are the differences between WCF and ASMX Web services?

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.

Is Asmx a WCF service?

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.

What is Asmx WSDL?

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.

What is WSDL in WCF 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.


1 Answers

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.

like image 64
Aravind Avatar answered Oct 13 '22 01:10

Aravind