从.NET表单中使用TIBCO BusinessWorks Web服务

时间:2011-03-27 06:19:32

标签: .net web-services integration tibco businessworks

我将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操作,ProxyRpc& rpc)    在System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)    在System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs)    在System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)    在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

在[0]处重新抛出异常:    在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)    在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type)    at MyWebServiceConsumer.ServiceReference1.PortType.processOperation(processOperationRequest request)    at myWebServiceConsumer.ServiceReference1.PortTypeClient.MyWebServiceConsumer.ServiceReference1.PortType.processOperation(processOperationRequest request)in c:\ users \ ystan.2009 \ documents \ visual studio 2010 \ Projects \ MyWebServiceConsumer \ MyWebServiceConsumer \ Service References \ ServiceReference1 \ Reference.cs:line 327    at myWebServiceConsumer.ServiceReference1.PortTypeClient.processOperation(new_incident_report new_incident_report)位于c:\ users \ ystan.2009 \ documents \ visual studio 2010 \ Projects \ MyWebServiceConsumer \ MyWebServiceConsumer \ Service References \ ServiceReference1 \ Reference.cs:line 333    at MyWebServiceConsumer.Form1.button1_Click(Object sender,EventArgs e)位于c:\ users \ ystan.2009 \ documents \ visual studio 2010 \ Projects \ MyWebServiceConsumer \ MyWebServiceConsumer \ Form1.cs:第44行

1 个答案:

答案 0 :(得分:1)

对于仍在查看此问题的人来说,该解决方案似乎涉及手动制作SOAP数据包,该数据包将被正确分派到BW。由于某种原因,.NET Web Reference实用程序和BW似乎不兼容。