WCF Endpoint


Use the following to generate a service reference in your Connected Services client application…

        <binding name="BasicHttpBinding_IService1" />
      <endpoint address="http://localhost:57945/Service1.svc" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
        name="BasicHttpBinding_IService1" />

After you have generated the service reference objects, you can call the service directly from within your client application.

using WCFClient1.ServiceReference1;

Service1Client client = new Service1Client();

MyDocument doc1 = new MyDocument();

doc1.DocumentName = "Test 123";
doc1.NumberOfPage = 1;

MyDocument doc2 = client.GetDocument(doc1);

string strNewDocumentName = doc2.DocumentName;
int intNewNumberOfPage = doc2.NumberOfPage;


If you have more that one end points, you will need to specify which end point to use.

WebServiceClient client = new WebServiceClient("BasicHttpBinding_IWebService");
Last modified: August 28, 2019



Write a Reply or Comment