Esempio n. 1
0
        public BLZServicePortTypeClient CreateServiceFor(BankDataAccessor accessor)
        {
            var messageInspector = new XmlMessageInspector ();
            // bind some simple handling methods to connect our crafted events
            messageInspector.SoapXmlRequestOccured += accessor.OnSoapXmlActionOccured;
            messageInspector.SoapXmlResponseOccured += accessor.OnSoapXmlActionOccured;

            // inject our inspector into a concrete behavior
            var messageBehavior = new InterceptMessageBehavior (messageInspector);

            var client = new BLZServicePortTypeClient (new BasicHttpBinding (),
                            new EndpointAddress ("http://www.thomas-bayer.com/axis2/services/BLZService"));

            // here we can inject an interception object, which itself calls in our case
            // the inspector, that catches the XML Messages and raises the defined events
            client.Endpoint.Behaviors.Add (messageBehavior);

            // and now we have the client ready for "action" :-)
            return client;
        }
Esempio n. 2
0
        public BLZServicePortTypeClient CreateServiceFor(BankDataAccessor accessor)
        {
            var messageInspector = new XmlMessageInspector();

            // bind some simple handling methods to connect our crafted events
            messageInspector.SoapXmlRequestOccured  += accessor.OnSoapXmlActionOccured;
            messageInspector.SoapXmlResponseOccured += accessor.OnSoapXmlActionOccured;

            // inject our inspector into a concrete behavior
            var messageBehavior = new InterceptMessageBehavior(messageInspector);

            var client = new BLZServicePortTypeClient(new BasicHttpBinding(),
                                                      new EndpointAddress("http://www.thomas-bayer.com/axis2/services/BLZService"));

            // here we can inject an interception object, which itself calls in our case
            // the inspector, that catches the XML Messages and raises the defined events
            client.Endpoint.Behaviors.Add(messageBehavior);

            // and now we have the client ready for "action" :-)
            return(client);
        }
Esempio n. 3
0
 public static void Main(string[] args)
 {
     var accessor = new BankDataAccessor ();
     accessor.GetBankDataByUserInput ();
 }
Esempio n. 4
0
        public static void Main(string[] args)
        {
            var accessor = new BankDataAccessor();

            accessor.GetBankDataByUserInput();
        }