BONJOUR !
Points finaux de serveur :
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 "
Points finaux de client :
" binding= " de http://localhost:8080/Greetings/ws wsHttpBinding "
contract= " ServiceReference1.IGreeting " de " WSHttpBinding_IGreeting " de bindingConfiguration=
name= " WSHttpBinding_IGreeting " >
/>
" binding= " de http://localhost:8081/Greetings/basicI basicHttpBinding "
contract= " ServiceReference1.IGreeting " de " BasicHttpBinding_IGreeting " de bindingConfiguration=
name= " BasicHttpBinding_IGreeting "/>
" binding= " de http://localhost:8091/Greetings/basicII basicHttpBinding "
contract= " ServiceReference1.IGreeting " de " BasicHttpBinding_IGreeting " de bindingConfiguration=
name= " BasicHttpBinding_IGreeting1 "/>
Force de programme de client :
Client de ServiceReference1.GreetingClient = nouveau ServiceReference1.GreetingClient (nouveau BasicHttpBinding ()
, nouveau System.ServiceModel.EndpointAddress (« http://localhost:8081/Greetings/basicII ")) ;
Console.WriteLine (client.GoodEvening (« Navneet »));
Console.ReadLine () ;
Client de ServiceReference1.GreetingClient = nouveau ServiceReference1.GreetingClient (nouveau BasicHttpBinding ()
, nouveau System.ServiceModel.EndpointAddress (« http://localhost:8091/Greetings/basicII ")) ;
Console.WriteLine (client.GoodEvening (« Navneet »));
Console.ReadLine () ;
Voici que si vous me voyez pour votre clarté avoir le point final withdiffrent basicHttpBinding
basicI, basicII
pareillement si vous voulez commuter entre wsHttpBinding et basicHttpBinding vous devez également changer l'attache avec l'adresse.
Cependant vous pouvez également commuter entre l'EnpPoint comme
Client de ServiceReference1.GreetingClient = nouveau ServiceReference1.GreetingClient (« BasicHttpBinding_IGreeting1 ») ;
OU
Client de ServiceReference1.GreetingClient = nouveaux ServiceReference1.GreetingClient («
BasicHttpBinding_IGreeting ") ;
Espérer que ceci aide !