Note that there are some explanatory texts on larger screens.

plurals
  1. POWSDL web reference client and alter method to return soap string
    primarykey
    data
    text
    <p>First of all I am complete noob in WCF/WSDL area so please be patient with me</p> <p>Okay, I have got a WSDL,XSD for complex message types, I generated a test client in C# console application. I added a web reference to WSDL got code generated in reference.cs.</p> <p>I called methods available in reference.cs, fine works perfect. I added soap trace extension on methods in reference.cs to log soap requests/response, works fine.</p> <p>In client I get WSDL complex type class object, where I see everything is returned fine for both sync and async calls. </p> <p>Now this is what I want/trying to do, I want methods to return not deserialized class object but soap string, like they are received in stream and before deserialization.</p> <p>How do I alter method to return soap string? It's not about accessing them(which I succceed to do) but to return directly from method.</p> <p>Please point me in right direction else I have to go in implementing a soapclient, which I trying to avoid.</p> <p>I appreciate any help. Let me know if I should clarify things.</p> <p>Update:</p> <p>Okay sir, this is what I did: </p> <p>generated a class from WSDL using svcutil, then:</p> <pre><code>ServiceClient1 sc1 = new ServiceClient1(); TestResponseClass trc1 = sc1.method1("Testinput"); System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(typeof(TestResponseClass ),"http://xxx.xxx.xxx.local/Service1.wsdl"); StringWriter stringWriter = new StringWriter(); x.Serialize(stringWriter, trc1); Console.Write(stringWriter.ToString()); </code></pre> <p>this way I got xml response. more close to what I was willing to have, I'll try to convert it to soap response. I hope I am on right track now. Please correct if not. learning and learning fast...I guess</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