Various WSDL ASMX, WCF Web Services

I have an asmx web service that is successfully used by other clients (.NET, Delphi).

I am trying to go to wcf and write the same logic in the WCF service (basicHttpBinding for interaction). (.net client consumes normally, but delphi 7 cannot call this service).

I start researching the differences between the two services (asmx, wcf) and find that their wsdl are different:

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 wcf is quite 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 this is the reason why delphi cannot create the correct proxy.

Can I configure wcf to generate wsdl in the same way as asmx.

Thanks.

+6
source share

Source: https://habr.com/ru/post/889177/


All Articles