我的bw进程暴露为Web服务,希望使用C#.NET表单来消耗它。但是,我的应用程序一直显示出例外:身体元素的任何处理程序,以及以下堆栈跟踪(下面的方式)。我在测试模式下运行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操作,ProxyPC和RPC) 在System.ServiceModel.Channels.ServiceChannel.call(String Action,Boolean Oneway,ProxyoperationRuntime操作,Object [] Ins,Object [] Outs,Timespan超时) 在System.ServiceModel.Channels.ServiceChannel.call(String Action,Boolean Oneway,ProxyoperationRuntime操作,Object [] Ins,Object [] Outs) 在system.servicemodel.cannels.servicechannelproxy.invokeservice(ImethodcallMessage MethodCall,ProxyoperationRuntime操作) 在system.servicemodel.cannels.servicechannelproxy.invoke(Imessage消息)

异常rethrown在[0]: 在system.runtime.remoting.proies.realproxy.handlereturnMessage(Imessage Reqmsg,imessage Retmsg) 在system.runtime.remoting.proxies.realproxy.privateinvoke(MessageTata&Msgdata,Int32类型) 在MyWebServiceConsumer.ServicEreference1.PortType.Processoperation(ProcessOperationRequest请求) 在MyWebServiceConsumer.ServicEreference1.porttypeclient.mywebserviceConsumer.servicEreference1.porttype.processoperation(processoperationRequest请求)在c:\ users \ ystan.2009 \ documents \ projects \ products \ mywebserviconmonerumer \ mywebserviceConsumer \ service references \ servicereference1 \ conference.cs:行327. 在MyWebServiceConsumer.ServicEreference1.porttypeclient.processoperation(new_incident_report new_incident_report)c:\ users \ ystan.2009 \ documents \ designstudio 2010 \ projects \ mywebserviceConsumer \ MyWebServiceConsumer \ Service引用\ ServicEreference1 \ Recestion.cs:行333 在mywebserviceConsumer.form1.button1_click(对象发件人,eventargs e)中的c:\ users \ ystan.2009 \ documents \ projects \ projects \ mywebservicononsumer \ mywebserviceConsumer \ form1.cs:line 44

有帮助吗?

解决方案

对于任何仍在查看此,解决方案似乎涉及手动制作SOAP数据包,该数据包被正确分派给BW。由于某种原因,.NET Web参考实用程序和BW似乎是不兼容的。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top