16 #include <QXmlStreamReader>
18 class KDSoapMessageData :
public QSharedData
24 , hasMessageAddressingProperties(false)
30 bool hasMessageAddressingProperties;
35 : d(new KDSoapMessageData)
65 return !(*
this == other);
72 void KDSoapMessage::addArgument(
const QString &argumentName,
const QVariant &argumentValue,
const QString &typeNameSpace,
const QString &typeName)
74 KDSoapValue soapValue(argumentName, argumentValue, typeNameSpace, typeName);
82 const QString &typeName)
84 KDSoapValue soapValue(argumentName, argumentValueList, typeNameSpace, typeName);
117 if (
namespaceUri() == QLatin1String(
"http://www.w3.org/2003/05/soap-envelope")) {
118 QString faultCodeStr;
120 while (!faultCode.
isNull()) {
121 if (!faultCodeStr.isEmpty()) {
122 faultCodeStr += QLatin1String(
" ");
127 return QObject::tr(
"Fault %1: %2")
133 QString ret = QObject::tr(
"Fault code %1: %2%3")
136 actor.isEmpty() ? QString() : QString::fromLatin1(
" (%1)").arg(actor));
138 if (!detail.isEmpty()) {
139 if (!ret.endsWith(QLatin1Char(
'.'))) {
140 ret += QLatin1Char(
'.');
142 ret += QLatin1String(
" Error detail: ") + detail;
156 setName(QString::fromLatin1(
"Fault"));
161 codeValueList.
addArgument(QString::fromLatin1(
"Value"), faultCode);
162 addArgument(QString::fromLatin1(
"Code"), codeValueList);
164 reasonValueList.
addArgument(QString::fromLatin1(
"Text"), faultText);
165 addArgument(QString::fromLatin1(
"Reason"), reasonValueList);
168 addArgument(QString::fromLatin1(
"faultcode"), faultCode);
169 addArgument(QString::fromLatin1(
"faultstring"), faultText);
175 return d->messageAddressingProperties;
180 d->messageAddressingProperties = map;
181 d->hasMessageAddressingProperties =
true;
186 return d->hasMessageAddressingProperties;
220 bool KDSoapMessage::isNull()
const
QDebug operator<<(QDebug dbg, const KDSoapMessage &msg)
void setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map)
bool operator==(const KDSoapMessage &other) const
void createFaultMessage(const QString &faultCode, const QString &faultText, KDSoap::SoapVersion soapVersion)
void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())
void setFault(bool fault)
QString faultAsString() const
KDSoapMessage & operator=(const KDSoapMessage &other)
bool operator!=(const KDSoapMessage &other) const
bool hasMessageAddressingProperties() const
KDSoapValueList & arguments()
KDSoapMessageAddressingProperties messageAddressingProperties() const
static QString soapEnvelope()
static QString soapEnvelope200305()
QList< KDSoapValue > & attributes()
KDSoapValue child(const QString &name) const
void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())
KDSoapValueList & childValues() const
void setNamespaceUri(const QString &ns)
void setName(const QString &name)
QString namespaceUri() const
bool operator==(const KDSoapValue &other) const
KDSoapValue & operator=(const KDSoapValue &other)
void setQualified(bool qualified)