2009-06-12 4 views
1

を処理できませんでした。私は、WSDL文書を含めるように私の奉仕プロジェクトにwsdlextrasを追加する前に、私のテストプロジェクトでそれを使用しようとすると、私は参照を追加し、私はこのエラーWCF-文書が理解されていたが、それは私は私が私のテストサーバーにデプロイWCFサービスを持っている

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 'http://localhost:8731/somewhere.nowhere.com/service1/?xsd=xsd2'. 
    - Unable to connect to remote server 
    - No connection could be made because the target machine actively refused it 
Metadata contains a reference that cannot be resolved: 'http://192.1.1.1/TestService/somewhere.nowhere.com.svc?wsdl'. 
Content Type application/soap+xml; charset=utf-8 was not supported by service . The client and service bindings may be mismatched. 
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. 
If the service is defined in the current solution, try building the solution and adding the service reference again. 

を取得し、私は働いて私のテストのアプリを持っていました。

これは私のWSDLからスキーマです:1を修正する

<wsdl:types> 
<xsd:schema targetNamespace="http://tempuri.org/Imports"> 
<xsd:import schemaLocation="http://localhost:8731/somewhere.nowhere.com/?xsd=xsd2" namespace="http://tempuri.org/"/> 
<xsd:import schemaLocation="http://localhost:8731/somewhere.nowhere.com/?xsd=xsd1" namespace="http://schemas.datacontract.org/2004/07/TestService"/> 
<xsd:import schemaLocation="http://localhost:8731/somewhere.nowhere.com/?xsd=xsd0" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/> 
<xsd:import schemaLocation="http://localhost:8731/somewhere.nowhere.com/?xsd=xsd3" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> 
</xsd:schema> 
</wsdl:types> 

試み: 私は私のスキーマ内の私のアドレスすべてがアップmmatch私

<host> 
<baseAddresses> 
    <add baseAddress /> 
</baseAddresses> 
</host> 

を変更しました。テストプロジェクトでサービス参照を更新できますが、私のwcfサービスで公開されているメソッドは表示できません。

私のサービスは、Windows 2003上で展開されていると私のテストのアプリは、それがインポートされたXSDファイルxsd2を見つけることができないかのようなエラーメッセージからだけでなく

+0

のping 192.1.1.1しようとするあなたは、結果は、サーバーへの接続を持っている場合、ファイアウォールの接続をブロックすることができるチェックするのtelnet 192.1.1.1 8731コマンドを実行してください取得する場合、あなたはVista上でサーバーを展開していますか? –

答えて

0

XPです。

サービスへの呼び出しは、それがポート80にあるように見えますが、インクルードファイルが8731.

2

答えはここにあるポイントから参照されています 短期でWCF IIS server configuration

... 問題でしたWCF IDパーミッションを持ちます。 WCFサービスをホストするアプリケーションプールに使用されるIDには、%WINDIR%\ tempフォルダに対する完全なNTFSアクセス許可が必要です。そのアクセス許可をC:\ Windows \ Tempの自分のID(LOCAL SERVICE)に変更した後、WCFサービスにサービス参照を追加することができました。

関連する問題