When you add service reference you might figure out that proxy source code is empty:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
If you take a look under warnings after executing of Update Service Reference you will figure out following message (which is in fact a critical error):
Warning 7 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IXService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='ControlOrderService']/wsdl:port[@name='BasicHttpBinding_IXService']
This problem occurs only if you generate references with “Reuse Types in referenced assemblies”.
To workaround the problem, remove reference to Newtonsoft.Json.dll update service references manually and then add the reference to Newtonsoft.Json.dll again.
Posted
Oct 05 2012, 12:20 PM
by
Damir Dobric