0

BWプロセスをWebサービスとして公開していて、C#.NETフォームを使用してそれを利用したいと考えています。ただし、私のアプリケーションは例外を表示し続けます:body要素のハンドラーがなく、次のスタックトレース(下の方)。BWプロセスをテストモードで実行してプロセスのステータスを確認しましたが、リクエストがBWに到達しなかったことがわかりました。また、soapUIを使用して同じプロセスをテストしました。これにより、Webサービスリクエストが完全にトリガーされました。助言がありますか?

私のコードは次のとおりです。

        ServiceReference1.PortTypeClient client = new ServiceReference1.PortTypeClient();
        ServiceReference1.new_incident_report report = new ServiceReference1.new_incident_report();

        report.contact_details = new ServiceReference1.contact_details();
        report.contact_details.name = "John Doe";
        report.contact_details.contactno = "1234567890";
        report.incident_details = new ServiceReference1.incident_details();
        report.incident_details.date = new DateTime();
        report.incident_details.time = new DateTime();
        report.incident_details.location = "80 Dutch Road";
        report.operator_comments = new ServiceReference1.operator_comments();
        report.operator_comments.operator_name = "Bob";
        report.operator_comments.operator_summary = "Something";

        MessageBox.Show(client.processOperation(report));

サーバースタックトレース:System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation、ProxyRpc&rpc)at System.ServiceModel.Channels.ServiceChannel.Call(String action、Boolean oneway、ProxyOperationRuntime operation、Object [] ins、Object [] outs 、TimeSpanタイムアウト)at System.ServiceModel.Channels.ServiceChannel.Call(String action、Boolean oneway、ProxyOperationRuntime operation、Object [] ins、Object [] outs)at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall、ProxyOperationRuntime operation )System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessageメッセージ)で

[0]で再スローされた例外:System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg、IMessage retMsg)at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData、Int32 type)atMyWebServiceConsumer.ServiceReference1。 PortType.processOperation(processOperationRequest request)at MyWebServiceConsumer.ServiceReference1.PortTypeClient.MyWebServiceConsumer.ServiceReference1.PortType.processOperation(processOperationRequest request)in c:\ users \ ystan.2009 \ document \ visual studio 2010 \ Projects \ MyWebServiceConsumer \ MyWebServiceConsumer \ Service References \ c:\ users \ ystanのMyWebServiceConsumer.ServiceReference1.PortTypeClient.processOperation(new_incident_report new_incident_report)のServiceReference1 \ Reference.cs:line327。2009 \ document \ visual studio 2010 \ Projects \ MyWebServiceConsumer \ MyWebServiceConsumer \ Service References \ ServiceReference1 \ Reference.cs:line 333 at MyWebServiceConsumer.Form1.button1_Click(Object sender、EventArgs e)in c:\ users \ ystan.2009 \ document \ Visual Studio 2010 \ Projects \ MyWebServiceConsumer \ MyWebServiceConsumer \ Form1.cs:line 44

4

1 に答える 1

1

まだこれを見ている人にとって、解決策は、BWに正しくディスパッチされるSOAPパケットを手動で作成することを含むように見えます。.NETWebリファレンスユーティリティとBWは何らかの理由で互換性がないようです。

于 2015-04-09T02:23:33.317 に答える