6

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.

1 Answer 1

12

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.