I need to use a web service that has the following requirements:
I do not control this web service and need to consume it. Since I am new to WCF, I need help with some basic stuff. My questions are:
Thanks
If you add service reference and you don't get any error, warning or any commented section in configuration file you already have what you need. Just use the code you get. The reference will create client proxy for you and this will have methods needed to pass binary data to the server. Proxy also allows setting client credentials:
var proxy = new ServiceContractNameClient();
proxy.ClientCredentials.UserName.Name = "userName";
proxy.ClientCredentials.UserName.Password = "pwd";
var result = proxy.SendSomeVeryLargeData(new SomeDataContract() { Data = yourData });
BasicHttpBinding supports both credentials in SOAP header and MTOM encoding.