2012-04-20 4 views
0

私はWebサイトを通じて公開しようとしている単純なWCF Webサービスを作成しました。WCFサービスのWSDLに正しいschemaLocationを取得するにはどうすればよいですか?

ウェブサイト(web.configのサービス参照とバインディングが含まれています)をサーバーにアップロードしました。https://domain/ServiceRoute?wsdlを使用してwsdlを参照できます。

WSDLがschemaLocationの不正なパスを示しています。

次に、WCFテストクライアントを使用してサービスをテストしようとします。 WCFテストクライアントが私に次のエラーを表示します:

Error: Cannot obtain Metadata from https://domain/ServiceRoute?wsdl If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https://domain/ServiceRoute?wsdl Metadata contains a reference that cannot be resolved: 'https://domain/ServiceRoute?wsdl'. Sendera:ActionNotSupported The message with Action 'http://schemas.xmlsoap.org/ws/2004/09/transfer/Get' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).HTTP GET Error URI: https://domain/ServiceRoute?wsdl The document was understood, but it could not be processed. - The WSDL document contains links that could not be resolved. - There was an error downloading 'https://incorrectSchemaLocation/ServiceRoute?xsd=xsd0'. - The remote name could not be resolved: 'IncorrectSchemaLocation'

私はこれについて何をすべきか分かりません。変更が必要なサーバー設定はありますか?または、schemaLocationhttps://domain/ServiceRouteに明示的に使用するようにバインディングを更新することはできますか?

また、wsdlを参照すると、SSL証明書のエラーが発生しないことに注意してください。それが役立つかどうかはわかりません。

答えて

0

私は、コマンドラインユーティリティを使用してWebサーバーの設定を変更することにより、このエラーを回避することができました:

<site identifier>がIISサイトの識別子であり、 <host header>がアクセスするために使用されるURLです
cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>" 

外部からのサービス(例:subdomain.domain.com)

関連する問題