OLÁ!!
Valores-limite do usuário:
binding= contract= " wsHttpBinding " " Greetings.IGreeting "/> de http://localhost:8080/Greetings/ws "
binding= contract= " basicHttpBinding " " Greetings.IGreeting "/> de http://localhost:8081/Greetings/basicI "
binding= contract= " basicHttpBinding " " Greetings.IGreeting "/> de http://localhost:8091/Greetings/basicII "
Valores-limite do cliente:
" binding= " de http://localhost:8080/Greetings/ws que wsHttpBinding "
contract= " ServiceReference1.IGreeting " de " WSHttpBinding_IGreeting " do bindingConfiguration=
name= " WSHttpBinding_IGreeting " >
/>
" binding= " de http://localhost:8081/Greetings/basicI que basicHttpBinding "
contract= " ServiceReference1.IGreeting " de " BasicHttpBinding_IGreeting " do bindingConfiguration=
name= " BasicHttpBinding_IGreeting "/>
" binding= " de http://localhost:8091/Greetings/basicII que basicHttpBinding "
contract= " ServiceReference1.IGreeting " de " BasicHttpBinding_IGreeting " do bindingConfiguration=
name= " BasicHttpBinding_IGreeting1 "/>
Cano principal do programa de cliente:
Cliente de ServiceReference1.GreetingClient = ServiceReference1.GreetingClient novo (BasicHttpBinding novo ()
, System.ServiceModel.EndpointAddress novo (“http://localhost:8081/Greetings/basicII "));
Console.WriteLine (client.GoodEvening (“Navneet”));
Console.ReadLine ();
Cliente de ServiceReference1.GreetingClient = ServiceReference1.GreetingClient novo (BasicHttpBinding novo ()
, System.ServiceModel.EndpointAddress novo (“http://localhost:8091/Greetings/basicII "));
Console.WriteLine (client.GoodEvening (“Navneet”));
Console.ReadLine ();
Aqui se você me vê para sua claridade ter o valor-limite withdiffrent basicHttpBinding
basicI, basicII
similarmente se você quer comutar entre wsHttpBinding e basicHttpBinding você igualmente tem que mudar o emperramento junto com o endereço.
Entretanto você pode igualmente comutar entre o EnpPoint como
Cliente de ServiceReference1.GreetingClient = ServiceReference1.GreetingClient novo (“BasicHttpBinding_IGreeting1”);
OU
Cliente de ServiceReference1.GreetingClient = ServiceReference1.GreetingClient novos (“
BasicHttpBinding_IGreeting ");
Esperar que isto ajuda!