Thank you Patrick for your help.
I have already abtained the information about Proxy configuration on the windows Registry..
but I do not understand than the solution proposed..
What I mean is..
I was expecting using the QtSoapHttpTransport class some method like
setProxy (ot setUser) like it is in QHTTP class..
but those similar methods are not there..right?
Can you then give a simple how to use the solution proposed..
I have something similar to the example proposed in the QT DOC
void WeatherFetcher
::findTemperature(const QString &city
) {
QtSoapMessage message;
message.setMethod("getTemperature", "http://weather.example.com/temperature");
message.setMethodArgument("city", "", city);
// transport is a private member of WeatherFetcher, of type QtSoapHttpTransport
transport.setHost("www.example.com");
connect(&transport, SIGNAL(responseReady()), SLOT(readResponse()));
transport.submitRequest(message, "/weatherfetcher/fetch.asp");
}
This is an example implementation of the readResponse() slot in the WeatherFetcher class:
void WeatherFetcher::readResponse()
{
const QtSoapMessage &response = transport.getResponse();
if (response.isFault()) {
cout << response.faultString().toString().toLatin1().constData() << endl;
return;
}
const QtSoapType &returnValue = response.returnValue();
if (returnValue["temperature"].isValid()) {
cout << "The current temperature is "
<< returnValue["temperature"].toString().toLatin1().constData()
<< " degrees Celcius." << endl;
}
void WeatherFetcher::findTemperature(const QString &city)
{
QtSoapMessage message;
message.setMethod("getTemperature", "http://weather.example.com/temperature");
message.setMethodArgument("city", "", city);
// transport is a private member of WeatherFetcher, of type QtSoapHttpTransport
transport.setHost("www.example.com");
connect(&transport, SIGNAL(responseReady()), SLOT(readResponse()));
transport.submitRequest(message, "/weatherfetcher/fetch.asp");
}
This is an example implementation of the readResponse() slot in the WeatherFetcher class:
void WeatherFetcher::readResponse()
{
const QtSoapMessage &response = transport.getResponse();
if (response.isFault()) {
cout << response.faultString().toString().toLatin1().constData() << endl;
return;
}
const QtSoapType &returnValue = response.returnValue();
if (returnValue["temperature"].isValid()) {
cout << "The current temperature is "
<< returnValue["temperature"].toString().toLatin1().constData()
<< " degrees Celcius." << endl;
}
To copy to clipboard, switch view to plain text mode
Many thanks
Bookmarks