public Message ProcessMessage(Message request) { try { string req = SoapMessageHelper.DumpWCFMessage(request); if (req == null || req.Length < 1) { return(null); } string rsp = null; if (!_server.NotifyMessageReceived(req, out rsp) || string.IsNullOrEmpty(rsp)) { _server._log.Write("Preparing SOAP error message from file: " + _server._soapErrFile); rsp = _server._soapErrEnvelope; } Message msg = SoapMessageHelper.CreateWCFMessageWithEnvelope( SoapEnvelopeVersion.Soap11, WSAddressingVersion.None, "*", rsp); return(msg); } catch (Exception e) { _server._log.Write(e); return(null); } }
public Message ProcessMessage(Message request) { string req = SoapMessageHelper.DumpWCFMessage(request); _server.DisplayRequestMessage(req); //Message msg = SoapMessageHelper.CreateEmptyWCFMessage( // SoapEnvelopeVersion.Soap11, // WSAddressingVersion.None, // "SomeReplyAction"); string response = _server._response; Message msg = SoapMessageHelper.CreateWCFMessageWithEnvelope( SoapEnvelopeVersion.Soap11, WSAddressingVersion.None, "*", response); return(msg); }
public Message ProcessMessage(Message request) { try { string req = SoapMessageHelper.DumpWCFMessage(request); if (req == null || req.Length < 1) { return(null); } SOAPReceiverSession session = new SOAPReceiverSession(req, _receiver._enableSessionStatusLog); _receiver._log.Write("Begin processing " + session.ToString()); string rsp = ""; if (_receiver.NotifyMessageReceived(session)) { rsp = session.OutgoingSOAPEnvelope; } else { _receiver._log.Write("Preparing SOAP error message from file: " + _receiver._cfg.GetSOAPErrorMessageFileFullPath()); rsp = _receiver._cfg.GetSOAPErrorMessageContent(); } Message msg = SoapMessageHelper.CreateWCFMessageWithEnvelope( SoapEnvelopeVersion.Soap11, WSAddressingVersion.None, "*", rsp); if (_receiver._enableSessionStatusLog) { _receiver._log.Write("Session status history: " + session.GetStatusLog()); } _receiver._log.Write("End processing " + session.ToString()); _receiver._log.Write(""); return(msg); } catch (Exception e) { _receiver._log.Write(e); return(null); } }