It doesn't help.
I modified code:
void MainWindow::getResponse()
{
/*
* Get a reference to a response message.
*/
const QtSoapMessage &message = http.getResponse();
/*
* Check if the message is a SOAP Fault message.
*/
if(message.isFault()) {
QMessageBox::critical(this,
"Error", message.
faultString().
toString());
return;
} else {
// print the return value
const QtSoapType &response = message.returnValue();
if(response["GetWhoISResult"].isValid())
ui->textEdit->setText(response["GetWhoISResult"].value().toString());
else {
QMessageBox::critical(this,
"Info", response.
errorString());
ui->textEdit->setText(message.toXmlString());
}
}
void MainWindow::getResponse()
{
/*
* Get a reference to a response message.
*/
const QtSoapMessage &message = http.getResponse();
/*
* Check if the message is a SOAP Fault message.
*/
if(message.isFault()) {
QMessageBox::critical(this, "Error", message.faultString().toString());
return;
} else {
// print the return value
const QtSoapType &response = message.returnValue();
if(response["GetWhoISResult"].isValid())
ui->textEdit->setText(response["GetWhoISResult"].value().toString());
else {
QMessageBox::critical(this, "Info", response.errorString());
ui->textEdit->setText(message.toXmlString());
}
}
To copy to clipboard, switch view to plain text mode
Got error:
"Unknown error"
XML message:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<GetWhoISResponse xmlns="http://www.webservicex.net">
<GetWhoISResult xmlns="http://www.webservicex.net" xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
DOMAIN NAME: wp.pl
registrant type: organization
nameservers: ns2.wp.pl. [153.19.102.182]
ns1.wp.pl. [212.77.102.200]
ns1.task.gda.pl. [153.19.250.101]
created: 1998.04.28 13:00:00
last modified: 2008.12.18 10:11:20
renewal date: 2013.04.27 14:00:00

option created: 2011.01.27 17:08:58
option expiration date: 2014.01.27 17:08:58

dnssec: Unsigned


REGISTRAR:
NASK
ul. Wawozowa 18
02-796 Warszawa
Polska/Poland
+48.22 3808300
info@dns.pl

WHOIS displays data with a delay not exceeding 15 minutes in relation to the .pl Registry system
Registrant data available at http://dns.pl/cgi-bin/en_whois.pl</GetWhoISResult>
</GetWhoISResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<GetWhoISResponse xmlns="http://www.webservicex.net">
<GetWhoISResult xmlns="http://www.webservicex.net" xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
DOMAIN NAME: wp.pl
registrant type: organization
nameservers: ns2.wp.pl. [153.19.102.182]
ns1.wp.pl. [212.77.102.200]
ns1.task.gda.pl. [153.19.250.101]
created: 1998.04.28 13:00:00
last modified: 2008.12.18 10:11:20
renewal date: 2013.04.27 14:00:00

option created: 2011.01.27 17:08:58
option expiration date: 2014.01.27 17:08:58

dnssec: Unsigned


REGISTRAR:
NASK
ul. Wawozowa 18
02-796 Warszawa
Polska/Poland
+48.22 3808300
info@dns.pl

WHOIS displays data with a delay not exceeding 15 minutes in relation to the .pl Registry system
Registrant data available at http://dns.pl/cgi-bin/en_whois.pl</GetWhoISResult>
</GetWhoISResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
To copy to clipboard, switch view to plain text mode
If I type a name of wrong SOAP object I get the same: "Unknown error". However, it seems to me that "GetWhoISResult" is what I need.
Bookmarks