Я вызываю сервисную функцию WCF
[OperationContract]
ProcessInfo GetProcessInfo(); # ProcessInfo has a DataContract Attribute.
написано на C # из скрипта IronPython (v2.7).
Отладчик доказывает, что служба вызывается и возвращается правильный объект.
Но в сценарии IPy
import clr
clr.AddReference('System.ServiceModel')
import System.ServiceModel
clr.AddReference('Company.Service.Util')
from Company.Service.Util.Diagnostics import IServiceInspector
bind = System.ServiceModel.BasicHttpBinding()
endpoint = System.ServiceModel.EndpointAddress("http://localhost:40099/ServiceInspector")
channel = System.ServiceModel.ChannelFactory[IServiceInspector](bind, endpoint)
client = channel.CreateChannel()
pi = client.GetProcessInfo()
print "GetProcessInfo() returned:\n%s" % pi
Не получено.
Как basicHttpBinding, так и tcpBinding работают одинаково.