Create SOAP UI Request using C# Client Application RRS feed

All replies

  • Hi Namdeo42,

    Thank you for posting here.

    Since this thread is related to WCF, I will move it to Windows Communication Foundation, Serialization, and Networking forum to get professional support.

    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, July 30, 2019 1:55 AM
  • Hi,

    Generally speaking, there are two ways to call web service which based on SOAP message.
    1. By using the client proxy class we could call the service like calling the local static method. 
    ServiceReference1.ServiceClient client = new ServiceClient();
                var result = client.GetData();

    We could use SVCutil tool or adding service reference in VS to generate the client proxy class. Besides, it also generates the configuration file. We should modify the service endpoint address in the configuration file to conform to the actual service address before calling.

    2. Channel Factory also is an optional solution to call the service given that we have known the service information, such as service contract, service binding, and service address.
        class Program
            static void Main(string[] args)
                Uri uri = new Uri("");
                BasicHttpBinding binding = new BasicHttpBinding();
                ChannelFactory<IService> factory = new ChannelFactory<IService>(binding, new EndpointAddress(uri));
                IService service = factory.CreateChannel();
                    var result = service.GetData();
                catch (Exception)
        interface IService
            string GetData();
    Feel free to let me know if there is anything I can help with.
    Best Regards

    Tuesday, July 30, 2019 8:19 AM