Exemple #1
0
        public static bool RaiseEvent(DataRow userDetails, DataRow mfpDetails, DataRow eventDetails)
        {
            string serializedEventPath        = string.Empty;
            string serializedAuthenticatePath = string.Empty;
            string serializedAuthorizePath    = string.Empty;

            string serializedEvent         = SerializeEvent(userDetails, mfpDetails, eventDetails, out serializedEventPath, out serializedAuthenticatePath, out serializedAuthorizePath);
            string accountingWebServiceUrl = ConfigurationManager.AppSettings["AccountingWebServiceUrl"];

            string soapResponse = string.Empty;

            if (!string.IsNullOrEmpty(serializedAuthenticatePath))
            {
                soapResponse = SoapTransmitter.SendRequest("Authenticate", accountingWebServiceUrl, serializedAuthenticatePath);
            }

            if (!string.IsNullOrEmpty(serializedAuthorizePath))
            {
                soapResponse = SoapTransmitter.SendRequest("Authorize", accountingWebServiceUrl, serializedAuthorizePath);
                soapResponse = SoapTransmitter.SendRequest("Authorize", accountingWebServiceUrl, serializedAuthorizePath);
            }

            if (!string.IsNullOrEmpty(serializedEvent))
            {
                soapResponse = SoapTransmitter.SendRequest("Event", accountingWebServiceUrl, serializedEventPath);
            }

            return(false);
        }
Exemple #2
0
        public static bool RaiseHelloEvent(DataRow mfpDetails)
        {
            string serializedEvent         = SerializeHelloEvent(mfpDetails);
            string accountingWebServiceUrl = ConfigurationManager.AppSettings["AccountingWebServiceUrl"];
            string eventDataPath           = Path.Combine(ConfigurationManager.AppSettings["EventDataPath"], "Hello.xml");


            string soapResponse = SoapTransmitter.SendRequest("Hello", accountingWebServiceUrl, serializedEvent);

            return(false);
        }