<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QtSoap generates wrong xml request]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have problem with QtSoap plugin that generates wrong xml request.<br />
Plugin from link: <a href="https://github.com/commontk/QtSOAP" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/commontk/QtSOAP</a></p>
<p dir="auto">In response I always receive message that echo parameter is not given, so I wrote a simple soap client using PHP (response is correct).<br />
I'm sure the problem only affects xml request (not header), because I injected PHP xml request statically in QtSoap plugin (reponse was correct).</p>
<p dir="auto">PHP xml request:</p>
<pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:StWebApi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
   &lt;SOAP-ENV:Body&gt;
      &lt;ns1:test&gt;
         &lt;test xsi:type="ns1:test"&gt;
            &lt;echo xsi:type="xsd:string"&gt;aaaaaaaaaaaaaaddd&lt;/echo&gt;
         &lt;/test&gt;
      &lt;/ns1:test&gt;
   &lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;
</code></pre>
<p dir="auto">C++ xml request:</p>
<pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
   &lt;SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;test&gt;
         &lt;echo xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:type="xsd:string"&gt;aaaaaaaaaaaaaaddd&lt;/echo&gt;
      &lt;/test&gt;
   &lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;
</code></pre>
<p dir="auto">C++ code:</p>
<pre><code>Test::Test(QObject* parent) :
    QObject(parent)
{
    connect(&amp;http, SIGNAL(responseReady()), SLOT(getResponse()));
    http.setAction("urn:StWebApiSoapServer");
    http.setHost("mywebpage.com", true);
}

Test::~Test()
{
}

void Test::sendRequest()
{
    QtSoapMessage request;
    request.setMethod(QtSoapQName("test", ""));
    request.addMethodArgument("echo", "", "aaaaaaaaaaaaaaddd");

    // Submit the method request to the web service.
    http.submitRequest(request, "/backend.php/webapi/soap");
}

void Test::getResponse()
{
    // Get the response, check for error.
    const QtSoapMessage &amp;resp = http.getResponse();
    if (resp.isFault())
    {
        qDebug() &lt;&lt; (tr("Query failed: ")
                    + resp.faultString().value().toString());
        return;
    }

    // Extract the return value from this method response, check for
    // errors.
    const QtSoapType &amp;res = resp.returnValue();
    if (!res.isValid())
    {
        qDebug() &lt;&lt; (tr("Invalid return value"));
        return;
    }
    qDebug() &lt;&lt; "response: " &lt;&lt; resp.toXmlString();
            return;
}
</code></pre>
<p dir="auto">As You can see xml requests are a bit different.<br />
What's wrong with my code?</p>
]]></description><link>https://forum.qt.io/topic/101338/qtsoap-generates-wrong-xml-request</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 12:49:17 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/101338.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Apr 2019 12:19:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QtSoap generates wrong xml request on Wed, 03 Apr 2019 13:26:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/devoo">@<bdi>Devoo</bdi></a> said in <a href="/post/520974">QtSoap generates wrong xml request</a>:</p>
<blockquote>
<p dir="auto">Yeah, but KDAB's KDSoap is paid.</p>
</blockquote>
<p dir="auto">That is not accurate:</p>
<p dir="auto">From the projects readme:</p>
<pre><code>License

KD Soap is (C) 2010-2019, Klaralvdalens Datakonsult AB, and is available under the terms of:

* the LGPL (see LICENSE.LGPL.txt for details) (except libkdsoap-server, see LICENSE.AGPL3-modified.txt)

* the GPL (see LICENSE.GPL.txt for details) (except libkdsoap-server, see LICENSE.AGPL3-modified.txt)

* the KDAB commercial license, provided that you buy a license. please contact sales@kdab.com if you are interested in buying commercial licenses.
</code></pre>
]]></description><link>https://forum.qt.io/post/521002</link><guid isPermaLink="true">https://forum.qt.io/post/521002</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 03 Apr 2019 13:26:43 GMT</pubDate></item><item><title><![CDATA[Reply to QtSoap generates wrong xml request on Wed, 03 Apr 2019 11:30:38 GMT]]></title><description><![CDATA[<p dir="auto">Yeah, but KDAB's KDSoap is paid.<br />
I just wrote my own class and it looks that everything works correctly.</p>
]]></description><link>https://forum.qt.io/post/520974</link><guid isPermaLink="true">https://forum.qt.io/post/520974</guid><dc:creator><![CDATA[Devoo]]></dc:creator><pubDate>Wed, 03 Apr 2019 11:30:38 GMT</pubDate></item><item><title><![CDATA[Reply to QtSoap generates wrong xml request on Tue, 02 Apr 2019 20:03:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">That's likely something you should as the author of the fork since he's likely the most recent developer having touch that code.</p>
<p dir="auto">As an alternative you might want to check <a href="https://github.com/KDAB/KDSoap" target="_blank" rel="noopener noreferrer nofollow ugc">KDAB's KDSoap</a> project which is actively maintained.</p>
]]></description><link>https://forum.qt.io/post/520864</link><guid isPermaLink="true">https://forum.qt.io/post/520864</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 02 Apr 2019 20:03:26 GMT</pubDate></item></channel></rss>