Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF client not mapping and returning null objects
    primarykey
    data
    text
    <p>I've setup a Service Reference (WCF Client) to call a Java Web Service from a Console Application I've setup for testing. It is using HTTPS. I have Fiddler setup and can see the proper values being sent and returned from the service (in Fiddler). But no matter what method I call, the returned values, regardless if it is a String or an object, comes back as Null. </p> <p>I'm not sure if the proxy client mapping isn't working or if I need to change a configure value in app.config.</p> <p>app.config:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;startup&gt; &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt; &lt;/startup&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;customBinding&gt; &lt;binding name="ResultsSOAP12Binding"&gt; &lt;textMessageEncoding messageVersion="Soap12" /&gt; &lt;/binding&gt; &lt;binding name="ResultsSOAP12Binding1"&gt; &lt;textMessageEncoding messageVersion="Soap12" /&gt; &lt;httpsTransport /&gt; &lt;/binding&gt; &lt;binding name="ResultsSOAP12Binding2"&gt; &lt;textMessageEncoding messageVersion="Soap12" /&gt; &lt;/binding&gt; &lt;/customBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="https://services.acme.com/results" binding="customBinding" bindingConfiguration="ResultsSOAP12Binding1" contract="ResultsServiceReference.Result &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre> <p>Code:</p> <pre><code>static void CallResults() { var resultsRequest = new ResultsServiceReference.ResultsRequest(); var client = new ResultsServiceReference.ResultsPortTypeClient("ResultsSOAP12BindingQSPort"); Console.WriteLine("Call Results Service"); ResultsServiceReference.ResultsBatch result = client.latestResults(resultsRequest); Console.WriteLine(result.Status); Console.ReadLine(); } </code></pre> <p>In this code the variable <strong>result</strong> is null, even though when you look in Fiddler you can see the XML. No error is displayed until you try to use result.</p> <p>BTW, I tried setting a breakpoint inside the latestResults method in the proxy class reference.cs, but the debugger doesn't reach 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.
 

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