Hi All,
If you get error with could not find default endpoint element that references contract
while trying in Plugins or Workflow Activity
Please use below code in your code
BasicHttpBinding myBinding = new BasicHttpBinding();
myBinding.Name = "BasicHttpBinding_Service";
myBinding.Security.Mode = BasicHttpSecurityMode.None;
myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
// Endpoint Address defining the asmx Service to be called.
EndpointAddress endPointAddress = new EndpointAddress(@"http://yourwebservice.com/sms_ws/Service.asmx");
// Call to the Web Service using the Binding and End Point Address.
SendSMS.ServiceSoapClient myClient = new SendSMS.ServiceSoapClient(myBinding, endPointAddress);
No comments:
Post a Comment