だから - 私は次のサービスへのプロキシクライアントを作成する任務を負っていますが、要件に満足しているクライアントを生成するのにかなりの時間を費やしています. WSDL は次の場所にあります: https://ws.conf.ebs.health.gov.on.ca:1441/EDTService/EDTService?wsdl
svcutil を実行すると、次の出力が得られます。
C:\Temp>"C:\Program Files (x86)\Microsof
t SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\svcutil.exe" /t:code https://ws.conf.
ebs.health.gov.on.ca:1441/EDTService/EDTService?wsdl /out:ebs.cs /config:ebs.con
fig
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.32559]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'https://ws.conf.ebs.health.gov.on.ca:1441/
EDTService/EDTService?wsdl' using WS-Metadata Exchange or DISCO.
Warning: The policy expression was not fully imported because its normalized for
m was too large.
XPath:"XPath Unavailable"
Error: Cannot import wsdl:binding
Detail: Object reference not set to an instance of an object.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://edt.health.on
tario.ca/']/wsdl:binding[@name='EDTPortBinding']
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is depend
ent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://edt.health.on
tario.ca/']/wsdl:binding[@name='EDTPortBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://edt.health.on
tario.ca/']/wsdl:service[@name='EDTService']/wsdl:port[@name='EDTPort']
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is depend
ent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://edt.health.on
tario.ca/']/wsdl:binding[@name='EDTPortBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://edt.health.on
tario.ca/']/wsdl:service[@name='EDTService']/wsdl:port[@name='EDTPort.2']
バージョン 3.0.4506.2152、4.0.30319.18020、および 4.0.30319.32559 を使用して同じコマンドを試しましたが、結果は同じでした。何か案は?
ある時点で WSDL.exe (Microsoft.Web.Services3.WebServicesClientProtocol から継承) を使用してプロキシを作成しましたが、自分ですべてを構成する必要があり、応答を受け取るたびに例外が発生します (例外をキャッチし、応答本文を手動で復号化し、繰り返します)。また、MTOM を使用する必要があるため、このカスタム コードはさらに機能しなくなります。