Note that there are some explanatory texts on larger screens.

plurals
  1. POConfused about WCF Services
    primarykey
    data
    text
    <p>I'm totally new to this WCF Services thing so any guidelines would be greatly appreciated.</p> <p>I have received a large project with a code that checks for the network status of a certain device. My boss told me to search for TCPSocket creation and change certain options on the socket.</p> <p>The function that checks for the status of the network is ReqDDCNetworkStatus. Naturally, I searched for the origin of code and found this interface under my Service References:</p> <pre><code>public interface LGeDDC { [System.ServiceModel] [System.ServiceModel.XmlSerializerFormatAttribute()] [return: System.ServiceModel.MessageParameterAttribute(Name="result")] string ReqDDCNetworkStatus(out string status); } </code></pre> <p>This file was called References.cs and I assume it was generated from running svcutil.exe on a WSDL (SOAP) file which is used to communicate between the program and the device in question.</p> <p>This is the class with the actual function that gets called:</p> <pre><code>namespace XrayEngines.DDCService { public partial class LGeDDCClient : System.ServiceModel.ClientBase&lt;LGeDDC&gt;, LGeDDC { public LGeDDCClient(string endpointConfigurationName, string remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public string ReqDDCNetworkStatus(out string status) { return base.Channel.ReqDDCNetworkStatus(out status); } } } </code></pre> <p>So the function would be called in the following way:</p> <pre><code>try { for (int i = 0; i &lt; p.Length; i++) { v = ddc.ReqDDCNetworkStatus(out r); writeMessage("v:" + v + " , r:" + r); } } catch (Exception e) { writeMessage("Network Exception Occurred: ."+e.ToString()); } </code></pre> <p>And I'm lost. I literally do not see anything that does any establishment of connection between the client and the server, but the program works. If somebody can provide an explanation behind how the connection is established this way, I'd really appreciate it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload