为什么WSDL类型提供程序不能消除歧义歧义?

Dav*_*ier 5 f# wsdl type-providers

#r "FSharp.Data.TypeProviders"
#r "System.ServiceModel"

open Microsoft.FSharp.Data.TypeProviders

[<Literal>]
let serviceAddress = "http://localhost/Microsoft/Dynamics/GP/eConnect/mex"

type Dynamics = WsdlService<serviceAddress>
type DynTypes = Dynamics.ServiceTypes.SimpleDataContextTypes
type Address = System.ServiceModel.EndpointAddress
Run Code Online (Sandbox Code Playgroud)

无论我做什么,WSDL类型提供程序都无法消除函数调用的歧义:

let svc: DynTypes.eConnectClient = Dynamics.GeteConnectServiceEndpoint()
let svc2 = (Dynamics.GeteConnectServiceEndpoint : unit -> DynTypes.eConnectClient)()
let svc3 = (Dynamics.GeteConnectServiceEndpoint : Address -> DynTypes.eConnectClient)(Address serviceAddress)
Run Code Online (Sandbox Code Playgroud)

它们都不起作用.

禁用其他端点并仅留下eConnectClient的端点解决了问题,但我甚至不知道我是否可能最终需要其他端点.

Eug*_*hev 0

不熟悉架构或类型提供程序,但 WSDL 标准不支持重载。如果 WSDL 是在运行时从实现生成的(通常是这种情况),则运行时可能会生成这样一个无效的 WSDL。