public BLZServicePortTypeClient(EndpointConfiguration endpointConfiguration) : base(BLZServicePortTypeClient.GetBindingForEndpoint(endpointConfiguration), BLZServicePortTypeClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
private void button1_Click(object sender, EventArgs e) { var client = new BLZServicePortTypeClient("BLZServiceSOAP12port_http"); var result = client.getBank(textBox1.Text); //label1.Text = string.Format("{0}\n{1}\n{2} {3}", result.bezeichnung, result.bic, result.plz, result.ort); label1.Text = $"{result.bezeichnung}\n{result.bic}\n{result.plz} {result.ort}"; }
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; }
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); }
public BLZServicePortTypeClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(BLZServicePortTypeClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }