зеркало из https://github.com/mozilla/pjs.git
Minor fixes to namespace URI's in SOAPUtils, and fault handling in test.
SOAP is not part of the default build.
This commit is contained in:
Родитель
0e66cc0a33
Коммит
5705a1d7bd
|
@ -96,10 +96,10 @@ const nsAString& nsSOAPUtils::kEncodingSeparator = realEncodingSeparator;
|
|||
NS_NAMED_LITERAL_STRING(realQualifiedSeparator,":");
|
||||
const nsAString& nsSOAPUtils::kQualifiedSeparator = realQualifiedSeparator;
|
||||
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceNamespaceURI, "htp://www.w3.org/2000/xmlns/");
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceNamespaceURI, "http://www.w3.org/2000/xmlns/");
|
||||
const nsAString& nsSOAPUtils::kXMLNamespaceNamespaceURI = realXMLNamespaceNamespaceURI;
|
||||
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceURI, "htp://www.w3.org/XML/1998/namespace");
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceURI, "http://www.w3.org/XML/1998/namespace");
|
||||
const nsAString& nsSOAPUtils::kXMLNamespaceURI = realXMLNamespaceURI;
|
||||
|
||||
NS_NAMED_LITERAL_STRING(realXMLPrefix, "xml:");
|
||||
|
|
|
@ -8,11 +8,7 @@ reports <font color="green">prime</font> or <font color="red">nonprime</font>.
|
|||
<p>This works by calling a SOAP service listed on
|
||||
<A href="http://www.xmethods.com">X Methods Website</A>. View the source of this
|
||||
page for details on how it was called. If you compile mozilla DEBUG (you also need
|
||||
MOZ_SOAP), the message sent and received will be logged to the console. Notice
|
||||
that the response seems to be using an incorrect namespaceURI to identify the type
|
||||
of the returned boolean. For this reason, the script receives the value as a
|
||||
string instead of as a boolean, which is why it is necessary to compare it as a
|
||||
string.
|
||||
MOZ_SOAP), the message sent and received will be logged to the console.
|
||||
<p>Experimenters may wish to add other tests which exercize services, with specific
|
||||
user interfaces such as the one in this test.
|
||||
<SCRIPT>
|
||||
|
@ -30,16 +26,16 @@ function oncompletion(resp, call, status) {
|
|||
// Was there a SOAP fault in the response?
|
||||
if (resp.fault != null) {
|
||||
var f = resp.fault;
|
||||
var detail = f.detail;
|
||||
var element = f.element;
|
||||
var ds = new XMLSerializer();
|
||||
var detailStr = ds.serializeToString(detail);
|
||||
var elementStr = ds.serializeToString(element);
|
||||
alert("Fault:\nFault code: " + f.faultCode + "\nFault string: " + f.faultString
|
||||
+ "\nFault actor: " + f.faultActor + "\nDetail: " + detailStr);
|
||||
+ "\nFault actor: " + f.faultActor + "\nDetail: " + elementStr);
|
||||
}
|
||||
else {
|
||||
var ret = resp.getParameters(false, {});
|
||||
var val = ret[0].value;
|
||||
if (val == "true") {
|
||||
if (val) {
|
||||
document.getElementById("NUMBER").style.color="green";
|
||||
} else {
|
||||
document.getElementById("NUMBER").style.color="red";
|
||||
|
|
|
@ -96,10 +96,10 @@ const nsAString& nsSOAPUtils::kEncodingSeparator = realEncodingSeparator;
|
|||
NS_NAMED_LITERAL_STRING(realQualifiedSeparator,":");
|
||||
const nsAString& nsSOAPUtils::kQualifiedSeparator = realQualifiedSeparator;
|
||||
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceNamespaceURI, "htp://www.w3.org/2000/xmlns/");
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceNamespaceURI, "http://www.w3.org/2000/xmlns/");
|
||||
const nsAString& nsSOAPUtils::kXMLNamespaceNamespaceURI = realXMLNamespaceNamespaceURI;
|
||||
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceURI, "htp://www.w3.org/XML/1998/namespace");
|
||||
NS_NAMED_LITERAL_STRING(realXMLNamespaceURI, "http://www.w3.org/XML/1998/namespace");
|
||||
const nsAString& nsSOAPUtils::kXMLNamespaceURI = realXMLNamespaceURI;
|
||||
|
||||
NS_NAMED_LITERAL_STRING(realXMLPrefix, "xml:");
|
||||
|
|
|
@ -8,11 +8,7 @@ reports <font color="green">prime</font> or <font color="red">nonprime</font>.
|
|||
<p>This works by calling a SOAP service listed on
|
||||
<A href="http://www.xmethods.com">X Methods Website</A>. View the source of this
|
||||
page for details on how it was called. If you compile mozilla DEBUG (you also need
|
||||
MOZ_SOAP), the message sent and received will be logged to the console. Notice
|
||||
that the response seems to be using an incorrect namespaceURI to identify the type
|
||||
of the returned boolean. For this reason, the script receives the value as a
|
||||
string instead of as a boolean, which is why it is necessary to compare it as a
|
||||
string.
|
||||
MOZ_SOAP), the message sent and received will be logged to the console.
|
||||
<p>Experimenters may wish to add other tests which exercize services, with specific
|
||||
user interfaces such as the one in this test.
|
||||
<SCRIPT>
|
||||
|
@ -30,16 +26,16 @@ function oncompletion(resp, call, status) {
|
|||
// Was there a SOAP fault in the response?
|
||||
if (resp.fault != null) {
|
||||
var f = resp.fault;
|
||||
var detail = f.detail;
|
||||
var element = f.element;
|
||||
var ds = new XMLSerializer();
|
||||
var detailStr = ds.serializeToString(detail);
|
||||
var elementStr = ds.serializeToString(element);
|
||||
alert("Fault:\nFault code: " + f.faultCode + "\nFault string: " + f.faultString
|
||||
+ "\nFault actor: " + f.faultActor + "\nDetail: " + detailStr);
|
||||
+ "\nFault actor: " + f.faultActor + "\nDetail: " + elementStr);
|
||||
}
|
||||
else {
|
||||
var ret = resp.getParameters(false, {});
|
||||
var val = ret[0].value;
|
||||
if (val == "true") {
|
||||
if (val) {
|
||||
document.getElementById("NUMBER").style.color="green";
|
||||
} else {
|
||||
document.getElementById("NUMBER").style.color="red";
|
||||
|
|
Загрузка…
Ссылка в новой задаче