PCLプロジェクトとして.netstandard 2.0を使用してXamarin.Formsプロジェクトを作成しました。私はそのプロジェクトでWCFサービスを利用しようとしています。 WCFサービスの接続サービスを追加しました。私はサービスで提供される任意のメソッドを呼び出すためにしようとしているとき、それは以下のようにエラーを与える:.netstandardでXamarin.FormsプロジェクトでWCFサービスを使用するにはどうすればいいですか?
System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Error in deserializing body of request message for operation 'GetData'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'GetData' and namespace ' http://tempuri.org/ '. Found node type 'Element' with name 'GetDataAsync' and namespace ' http://tempuri.org/ '
私はまた、古いバージョンに.netstandardバージョンを変更しようとしたが、それは同じエラーを与えます。
エラーが体の形状が正しくない、というよりない実装方法であることを示唆しています。モデルは正しいですか? – Neil
@Neilはいモデルが正しいです。実際にGetDataメソッドには、Visual StudioのWCFサービスプロバイダによって生成されたプロキシクラスに問題がある可能性があります。 – vishgarg
こんにちは! Xamarinがタスクベースの非同期WCFプロキシメソッドと互換性があるかどうかは誰にも分かりますか?ありがとうございました。 – Ignacio