当前位置: 首页>>代码示例>>C++>>正文


C++ QtSoapMessage::returnValue方法代码示例

本文整理汇总了C++中QtSoapMessage::returnValue方法的典型用法代码示例。如果您正苦于以下问题:C++ QtSoapMessage::returnValue方法的具体用法?C++ QtSoapMessage::returnValue怎么用?C++ QtSoapMessage::returnValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QtSoapMessage的用法示例。


在下文中一共展示了QtSoapMessage::returnValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getResponse

void TPDownload::getResponse(const QtSoapMessage &message)
{
    downloading = false;
    QString result;
    QDomDocument pwx("PWX");

    if (!message.isFault()) {
        const QtSoapType &response = message.returnValue();
        QDomNode workout = response.toDomElement(pwx).firstChild();
        pwx.appendChild(workout);
    }
    completed(pwx);
}
开发者ID:deanjunk,项目名称:GoldenCheetah,代码行数:13,代码来源:TPDownload.cpp

示例2: getResponse

void TPUpload::getResponse(const QtSoapMessage &message)
{
    uploading = false;
    QString result;

    if (message.isFault()) {
	    result = tr("Error:") + qPrintable(message.faultString().toString());
    } else {
        // SOAP call succeeded, but was the file accepted?
        if (message.returnValue().toString() == "true") result = tr("Upload successful");
        else result = tr("Upload failed - file rejected");
    }
    completed(result);
}
开发者ID:FuzzyBunnys,项目名称:GoldenCheetah,代码行数:14,代码来源:TPUpload.cpp

示例3: getResponse

void Easter::getResponse(const QtSoapMessage &message)
{
    if (message.isFault()) {
	qDebug("Error: %s", qPrintable(message.faultString().toString()));
    }
    else {
        QString res = message.returnValue().toString();
        QDateTime dt = QDateTime::fromString(res, Qt::ISODate);
        if (dt.isValid())
            res = QLocale::c().toString(dt.date());

        qDebug("Easter is: %s", res.toLatin1().constData());
    }
    QCoreApplication::quit();
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:15,代码来源:easter.cpp

示例4: getResponse

void TPAthlete::getResponse(const QtSoapMessage &message)
{
    waiting = false;
    QString resultStr;
    QList< QMap<QString, QString> > athletelist;

    if (message.isFault()) {
        resultStr = tr("Error:") + qPrintable(message.faultString().toString());
    }
    else {
        const QtSoapType &response = message.returnValue();

        if (response.isValid()) {

            // lets take look at the payload as a DomDocument
            // I tried to use the QtSoapType routines to walk
            // through the reponse tree but couldn't get them
            // to work. This code could be simplified if we
            // use the QtSoap routines instead.
            QDomDocument doc;
            QDomElement results = response.toDomElement(doc);
            QMap<QString, QString> athlete;

            for (QDomElement personbase = results.firstChildElement("PersonBase");
                 !personbase.isNull();
                 personbase = personbase.nextSiblingElement()) {

                athlete.clear();

                // shove all the personbase attribs into a QMap
                for (QDomNode child = personbase.firstChild();
                     !child.isNull();
                    child = child.nextSibling()) {

                    athlete.insert(child.nodeName(), child.toElement().text());
                }
                athletelist << athlete;
            }
        }
    }

    // return what we got (empty if non-valid response)
    completed(resultStr, athletelist);
}
开发者ID:Deadolus,项目名称:GoldenCheetah,代码行数:44,代码来源:TPDownload.cpp

示例5: getResponse

 void KEcm::getResponse(const QtSoapMessage &message)
 {
   
   //std::cout << "\nresponse " << message.toXmlString().toStdString();
     if (message.isFault()) {
       
       std::cout << "\n" << message.faultDetail().toString().toStdString();
	qDebug("Errorssssss: %s", qPrintable(message.faultString().toString()));
    }else {
       /* QString res = message.returnValue().toString();
        QDateTime dt = QDateTime::fromString(res, Qt::ISODate);
        if (dt.isValid())
            res = QLocale::c().toString(dt.date());
*/
       const QtSoapType &docInfo = message.returnValue();
       qDebug() << docInfo[QtSoapQName("dDocName","http://www.stellent.com/DocInfo/")].toString().toLatin1().constData();
        //qDebug("Easter is: %s", docInfo["DocInfoByNameResponse"].value().toString().toLatin1().constData());
       //qDebug("Easter is: %s", docInfo.count());
       std::cout << "\n\n\n\n\n\nTeste ";
       //qDebug() << docInfo["DocInfoByNameResponse"]["DocInfoByNameResult"]["ContentInfo"]["dDocName"].toString().toLatin1().constData();
       //qDebug() << 	"TDDDD" << docInfo[0]["dDocName"].value().toString().toLatin1().constData();
       int docInfoCount = docInfo.count();
       int docInfoCounty = 0;
       for(int x= 0; x < docInfoCount; x++){
	  
	 docInfoCounty = docInfo[x].count();
	 
	 for(int y= 0; y < docInfoCounty; y++){
	    qDebug("Nome: %s \t Value: %s",
	      QString(docInfo[x][y].name().name()).toLatin1().constData(),
	      docInfo[x][y].value().toString().toLatin1().constData());
	  }
	  qDebug("\n\n");
       }
       
       std::cout << "\n\n\n\n\n\nTeste ";
    }
 }
开发者ID:cassioarmy,项目名称:KEcm,代码行数:38,代码来源:KEcm.cpp

示例6: getResponse

void QGenieGetRouterWlanInfoThread::getResponse(QtSoapMessage &message,QUuid &uuid,QString &session)
{
    GeniePlugin_WSetupPlugin::output_log(QString("recv:get wlan infomation response,uuid-%1").arg(uuid.toString()));
    if(!m_bcontinue)
        return;

/*    if(uuid == QUuid("{14E65BB7-0D3B-4c90-871E-187E58D6712C}"))//start
    {
        if(message.isFault())
        {
            qDebug("Error: %s", message.faultString().value().toString().toLatin1().constData());
        }
        else
        {
            if( message.returnResponseCode().toString().toInt() == 0)
            {
                m_bstart_ok = true;
            }
        }

        if(!m_bstart_ok)
        {
            m_bcontinue = false;
            emit getwlaninfo_complete(false,QString(),QString(),QString(),QString());
        }
    }
    else */if(uuid == QUuid("{CFE911FE-C5E8-4a0e-A073-6FD28B017E41}"))//ssid
    {
        if(message.isFault())
        {
            qDebug("Error: %s", message.faultString().value().toString().toLatin1().constData());
        }
        else
        {
            if( message.returnResponseCode().toString().toInt() == 0)
            {
                m_bgetssid_ok = true;
                const QtSoapType &value = message.returnValue();
                m_strssid = value["NewSSID"].value().toString();
            }
        }

        if(!m_bgetssid_ok)
        {
            m_bcontinue = false;
            emit getwlaninfo_complete(false,QString(),QString(),QString(),QString());
        }

    }
    else if(uuid == QUuid("{B8D2DCFD-0A58-4e46-882A-5EB1DC77EBB4}"))//key
    {
        if(message.isFault())
        {
            qDebug("Error: %s", message.faultString().value().toString().toLatin1().constData());
        }
        else
        {
            if( message.returnResponseCode().toString().toInt() == 0)
            {
                m_bgetkey_ok = true;
                const QtSoapType &value = message.returnValue();
                m_strkey = value["NewWPAPassphrase"].value().toString();
            }
        }

        if(!m_bgetkey_ok)
        {
            m_bcontinue = false;
            emit getwlaninfo_complete(false,QString(),QString(),QString(),QString());
        }
    }


    if(m_bgetssid_ok && m_bgetkey_ok)
    {
        m_bcontinue = false;
        emit getwlaninfo_complete(true,m_strssid,m_strkey,QString(),QString());
    }
}
开发者ID:daddyreb,项目名称:Bigit_Genie,代码行数:79,代码来源:QGenieGetRouterWlanInfoThread.cpp


注:本文中的QtSoapMessage::returnValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。