Exemplo n.º 1
0
        public async Task RecordsThenPlaybacks()
        {
            using (_vcr.UseCassette("wcf", RecordMode.Once))
            {
                var client = new SoapResponderPortTypeClient(new BasicHttpBinding(), new EndpointAddress("http://www.soapclient.com/xml/soapresponder.wsdl"));
                client.Endpoint.EndpointBehaviors.Add(new VcrBehavior(_vcr));
                var response = await client.Method1Async("1", "2");
            }

            using (_vcr.UseCassette("wcf", RecordMode.None))
            {
                var client = new SoapResponderPortTypeClient(new BasicHttpBinding(), new EndpointAddress("http://www.soapclient.com/xml/soapresponder.wsdl"));
                client.Endpoint.EndpointBehaviors.Add(new VcrBehavior(_vcr));
                var response = await client.Method1Async("1", "2");
            }

            Assert.True(true);
        }
Exemplo n.º 2
0
 public SoapResponderPortTypeClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
     base(SoapResponderPortTypeClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemplo n.º 3
0
 public SoapResponderPortTypeClient(EndpointConfiguration endpointConfiguration) :
     base(SoapResponderPortTypeClient.GetBindingForEndpoint(endpointConfiguration), SoapResponderPortTypeClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemplo n.º 4
0
 public SoapResponderPortTypeClient() :
     base(SoapResponderPortTypeClient.GetDefaultBinding(), SoapResponderPortTypeClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.SoapResponderPortType.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemplo n.º 5
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(SoapResponderPortTypeClient.GetEndpointAddress(EndpointConfiguration.SoapResponderPortType));
 }
Exemplo n.º 6
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(SoapResponderPortTypeClient.GetBindingForEndpoint(EndpointConfiguration.SoapResponderPortType));
 }