Domanda

Ho un processo BW esposto come servizio Web e desiderio consumare utilizzando un modulo C # .NET. Tuttavia, la mia applicazione continua a mostrare l'eccezione: nessun gestore per il corpo dell'elemento, più la seguente traccia dello stack (sotto). Ho eseguito il processo BW in modalità Test per verificare lo stato del processo e ha scoperto che la richiesta non ha mai raggiunto BW. Ho anche testato lo stesso processo usando Saplei, che ha attivato perfettamente la richiesta del servizio Web. Qualche suggerimento?

Il mio codice è il seguente:

        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));
.

Server Stack Trace: presso System.ServiceModel.Channels.ServiceChannel.HandleReply (ProxyOperationRuntime Operation, ProxyRPC & RPC) presso System.ServiceModel.Channels.ServiceChannel.Call (Azione stringa, Boolean ONEWAY, FUNZIONAMENTO PROSXYOPERATIONALTUE, Object [] Ins, Object [] outs, TimeSpan Timeout) presso System.ServiceModel.Channels.ServiceChannel.Call (Azione stringa, Boolean Oneway, operazione proxyopationaltime, oggetto [] ins, oggetto [] outs) presso System.ServiceModel.Channels.ServiceChannelProxy.invokeservice (imethodcallmessage Methodcall, operazione proxyopationaltime) presso System.ServiceModel.Channels.ServiceChannelProxy.invoke (Message IMessage)

Eccezione ritrovata a [0]: a System.Runtime.Remoting.proxies.realproxy.handleReturnMessage (IMessage Reqmsg, IMessage Retmsg) a System.Runtime.Remoting.proxies.realproxy.PrivateInvoke (Messagedata e msgdata, INT32 Tipo) A MyWebServiceConsumer.ServicereFerence1.PortType.ProcessOpration (ProcessOprationRequest Richiesta) A MyWebServiceConsumer.ServicereFerence1.Portypeclient.mywebserviceconsumer.servicereference1.portType.ProcessOpration (ProcessiPationAryREQuest Richiesta) in C: \ Utenti \ Ystan.2009 \ Documents \ Visual Studio 2010 \ Progetti \ MyWebServiceConsumer \ MyWebServiceConsumer \ MyWebServiceConsumer \ Riferimenti di servizio \ ServicerFerence1 \ Riferimenti.cs: Linea 327. A MyWebServiceConsumer.servicereFerence1.Portypeclient.ProcessOperation (new_incident_report new_incident_report) in c: \ Users \ ystan.2009 \ Documents \ Visual Studio 2010 \ Progetti \ MyWebServiceConsumer \ MyWebServiceConsumer \ MyWebServiceConsumer \ Riferimenti di servizio \ ServicerFerence1 \ reference.cs: Line 333 A MyWebServiceConsumer.Form1.button1_Click (oggetto mittente, EventArgs E) in C: \ Utenti \ Ystan.2009 \ Documents \ Visual Studio 2010 \ Progetti \ MyWebServiceConsumer \ MyWebServiceConsumer \ MyWebServiceConsumer \ Form1.cs: Linea 44

È stato utile?

Soluzione

Per chiunque sia ancora in cerca di questo, la soluzione sembra coinvolgere manualmente la creazione del pacchetto di sapone, che viene inviato correttamente a BW.L'utilità di riferimento del web .NET e BW sembrano essere incompatibili per qualche motivo.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top