예제 #1
0
        protected override ReplayPortClient CreateClient(string address)
        {
            Binding binding = CreateBinding(false,
                                            new IChannelController[] { new SoapValidator(ReplaySchemasSet.GetInstance()) });
            ReplayPortClient client = new ReplayPortClient(binding, new EndpointAddress(address));

            return(client);
        }
예제 #2
0
        protected override ReplayPortClient CreateClient()
        {
            string address = GetReplayServiceAddress();

            BeginStep("Connect to Replay service");
            LogStepEvent(string.Format("Replay service address: {0}", address));
            if (!address.IsValidUrl())
            {
                throw new AssertException("Replay service address is invalid");
            }
            Binding binding = CreateBinding(false,
                                            new IChannelController[] { new SoapValidator(ReplaySchemasSet.GetInstance()) });
            ReplayPortClient client = new ReplayPortClient(binding, new EndpointAddress(address));

            StepPassed();
            return(client);
        }
        protected ReplayPortClient CreateReplayPortClient()
        {
            string address = GetReplayServiceAddress();

            BeginStep("Connect to Replay service");
            LogStepEvent(string.Format("Replay service address: {0}", address));
            if (string.IsNullOrEmpty(address))
            {
                throw new AssertException("Replay service not supported");
            }
            else
            {
                if (!address.IsValidUrl())
                {
                    throw new AssertException("Replay service address is invalid");
                }
            }
            Binding binding = CreateBinding(false,
                                            new IChannelController[] { new SoapValidator(ReplaySchemasSet.GetInstance()) });
            ReplayPortClient client = new ReplayPortClient(binding, new EndpointAddress(address));

            AttachSecurity(client.Endpoint);
            SetupChannel(client.InnerChannel);

            StepPassed();
            if (_replayClient != null)
            {
                CloseReplayClient();
            }
            return(_replayClient = client);
        }