In VS2013, we tried to add a web service wsdl and the reference.cs is always empty. As per the web service provider, we tried to below command by svcutil.exe to generate the reference.cs and .config file
·svcutil [wsdl url]/out:references.cs /serializer:XmlSerializer
https://msdn.microsoft.com/en-us/library/aa347733%28v=vs.110%29.aspx
with below configuration for binding generated by the tool, the web service will returns an exception saying something like not expected content type
<basicHttpBinding>
<binding name="SlsServiceWSSoapBinding"> <security mode="Transport" /> </binding> </basicHttpBinding>
We added below messageEncoding="Mtom" andMaxReceivedMessageSize to the bindings, then it works
版权声明:本文为博主原创文章,未经博主允许不得转载。
,不愧是春城,花香四季,品种繁多。