You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB
C++

#include "webcc/soap_globals.h"
#include <ostream>
namespace webcc {
const std::string kSoapAction = "SOAPAction";
// According to www.w3.org when placing SOAP messages in HTTP bodies, the HTTP
// Content-type header must be chosen as "application/soap+xml" [RFC 3902].
// But in practice, many web servers cannot understand it.
// See: https://www.w3.org/TR/2007/REC-soap12-part0-20070427/#L26854
const std::string kTextXmlUtf8 = "text/xml; charset=utf-8";
const std::string kAppSoapXmlUtf8 = "application/soap+xml; charset=utf-8";
// NOTE:
// According to HTTP 1.1 RFC7231, the following examples are all equivalent,
// but the first is preferred for consistency:
// text/html;charset=utf-8
// text/html;charset=UTF-8
// Text/HTML;Charset="utf-8"
// text/html; charset="utf-8"
// See: https://tools.ietf.org/html/rfc7231#section-3.1.1.1
const SoapNamespace kSoapEnvNamespaceV11{
"soap",
"http://schemas.xmlsoap.org/soap/envelope/"
};
const SoapNamespace kSoapEnvNamespaceV12{
"soap",
"http://www.w3.org/2003/05/soap-envelope"
};
std::ostream& operator<<(std::ostream& os, const SoapFault& fault) {
os << "Fault: {" << std::endl
<< " faultcode: " << fault.faultcode << std::endl
<< " faultstring: " << fault.faultstring << std::endl
<< " detail: " << fault.detail << std::endl
<< "}";
return os;
}
} // namespace webcc