Monday, 1 August 2016

Mscrm Plugin to call the WebService Using C#

Mscrm Plugin to call WCF Service Using Custom bindings
--------------------------------------------------------------------------------------------

BasicHttpBinding myBinding = new BasicHttpBinding();
                myBinding.Name = "BasicHttpBinding_GetOpportunityDetails";
                myBinding.Security.Mode = BasicHttpSecurityMode.None;
                myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
                myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
                myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
                EndpointAddress endPointAddress = new EndpointAddress("http://10.1980.89/LoginPortal/Services/LoginPortal.svc?wsdl");
                ServiceReference1.ConTractDetailsClient Case = new ServiceReference1.ConTractDetailsClient(myBinding, endPointAddress);
                string str = Case.UpdateStatus(CaseNumber, UpdateStatus, Comments, ContactName,
PhoneNumber);

-------------------------------------------------------------------------------------------

No comments:

Post a Comment