From e7eda6ecb588c6e4516477ef1946ac16fe08d10c Mon Sep 17 00:00:00 2001 From: "rayw%netscape.com" Date: Fri, 18 Jan 2002 18:28:37 +0000 Subject: [PATCH] Made another test work, with a couple of bug fixes. SOAP is not part of default build. git-svn-id: svn://10.0.0.236/trunk@112437 18797224-902f-48f8-a5cc-f745e15eee43 --- .../soap/src/nsDefaultSOAPEncoder.cpp | 2 +- .../webservices/soap/src/nsSOAPMessage.cpp | 10 +-- .../soap/tests/soapheadlinenews.html | 76 +++++++++++++++++++ .../soap/src/nsDefaultSOAPEncoder.cpp | 2 +- .../xmlextras/soap/src/nsSOAPMessage.cpp | 10 +-- .../xmlextras/tests/soapheadlinenews.html | 76 +++++++++++++++++++ 6 files changed, 164 insertions(+), 12 deletions(-) create mode 100644 mozilla/extensions/webservices/soap/tests/soapheadlinenews.html create mode 100644 mozilla/extensions/xmlextras/tests/soapheadlinenews.html diff --git a/mozilla/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp b/mozilla/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp index 0b5775fea7d..5c67e82002d 100644 --- a/mozilla/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp +++ b/mozilla/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp @@ -1083,7 +1083,7 @@ NS_IMETHODIMP nsCOMPtr < nsIDOMAttr > enc; nsresult rv = aSource-> - GetAttributeNodeNS(*nsSOAPUtils::kSOAPEncURI[mSOAPVersion], + GetAttributeNodeNS(*nsSOAPUtils::kSOAPEnvURI[mSOAPVersion], nsSOAPUtils::kEncodingStyleAttribute, getter_AddRefs(enc)); if (NS_FAILED(rv)) diff --git a/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp b/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp index 42b4d1fcf36..1d2b2622f29 100644 --- a/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp +++ b/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp @@ -304,7 +304,7 @@ NS_IMETHODIMP if (NS_FAILED(rv)) return rv; if (!enc.IsEmpty()) { - rv = envelope->SetAttributeNS(*nsSOAPUtils::kSOAPEncURI[aVersion], + rv = envelope->SetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[aVersion], nsSOAPUtils:: kEncodingStyleAttribute, enc); if (NS_FAILED(rv)) @@ -393,7 +393,7 @@ NS_IMETHODIMP nsAutoString enc; encoding->GetStyleURI(enc); element-> - SetAttributeNS(*nsSOAPUtils::kSOAPEncURI[aVersion], + SetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[aVersion], nsSOAPUtils::kEncodingStyleAttribute, enc); } } @@ -479,7 +479,7 @@ NS_IMETHODIMP if (encoding != newencoding) { nsAutoString enc; newencoding->GetStyleURI(enc); - element->SetAttributeNS(*nsSOAPUtils::kSOAPEncURI[aVersion], + element->SetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[aVersion], nsSOAPUtils::kEncodingStyleAttribute, enc); } } @@ -514,7 +514,7 @@ nsresult nsAutoString style; for (;;) { nsCOMPtr < nsIDOMAttr > enc; - rv = element->GetAttributeNodeNS(*nsSOAPUtils::kSOAPEncURI[*aVersion], + rv = element->GetAttributeNodeNS(*nsSOAPUtils::kSOAPEnvURI[*aVersion], nsSOAPUtils::kEncodingStyleAttribute, getter_AddRefs(enc)); if (NS_FAILED(rv)) @@ -531,7 +531,7 @@ nsresult return rv; if (next) { PRUint16 type; - rv = element->GetNodeType(&type); + rv = next->GetNodeType(&type); if (NS_FAILED(rv)) return rv; if (type != nsIDOMNode::ELEMENT_NODE) { diff --git a/mozilla/extensions/webservices/soap/tests/soapheadlinenews.html b/mozilla/extensions/webservices/soap/tests/soapheadlinenews.html new file mode 100644 index 00000000000..b2934d61b37 --- /dev/null +++ b/mozilla/extensions/webservices/soap/tests/soapheadlinenews.html @@ -0,0 +1,76 @@ + + + + +

SOAP Test: Headline News

+The entered domain name will be searched, and the result displayed. +X Methods Website. 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. +

Experimenters may wish to add other tests which exercize services, with specific +user interfaces such as the one in this test. + +

+

+ + + + + + diff --git a/mozilla/extensions/xmlextras/soap/src/nsDefaultSOAPEncoder.cpp b/mozilla/extensions/xmlextras/soap/src/nsDefaultSOAPEncoder.cpp index 0b5775fea7d..5c67e82002d 100644 --- a/mozilla/extensions/xmlextras/soap/src/nsDefaultSOAPEncoder.cpp +++ b/mozilla/extensions/xmlextras/soap/src/nsDefaultSOAPEncoder.cpp @@ -1083,7 +1083,7 @@ NS_IMETHODIMP nsCOMPtr < nsIDOMAttr > enc; nsresult rv = aSource-> - GetAttributeNodeNS(*nsSOAPUtils::kSOAPEncURI[mSOAPVersion], + GetAttributeNodeNS(*nsSOAPUtils::kSOAPEnvURI[mSOAPVersion], nsSOAPUtils::kEncodingStyleAttribute, getter_AddRefs(enc)); if (NS_FAILED(rv)) diff --git a/mozilla/extensions/xmlextras/soap/src/nsSOAPMessage.cpp b/mozilla/extensions/xmlextras/soap/src/nsSOAPMessage.cpp index 42b4d1fcf36..1d2b2622f29 100644 --- a/mozilla/extensions/xmlextras/soap/src/nsSOAPMessage.cpp +++ b/mozilla/extensions/xmlextras/soap/src/nsSOAPMessage.cpp @@ -304,7 +304,7 @@ NS_IMETHODIMP if (NS_FAILED(rv)) return rv; if (!enc.IsEmpty()) { - rv = envelope->SetAttributeNS(*nsSOAPUtils::kSOAPEncURI[aVersion], + rv = envelope->SetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[aVersion], nsSOAPUtils:: kEncodingStyleAttribute, enc); if (NS_FAILED(rv)) @@ -393,7 +393,7 @@ NS_IMETHODIMP nsAutoString enc; encoding->GetStyleURI(enc); element-> - SetAttributeNS(*nsSOAPUtils::kSOAPEncURI[aVersion], + SetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[aVersion], nsSOAPUtils::kEncodingStyleAttribute, enc); } } @@ -479,7 +479,7 @@ NS_IMETHODIMP if (encoding != newencoding) { nsAutoString enc; newencoding->GetStyleURI(enc); - element->SetAttributeNS(*nsSOAPUtils::kSOAPEncURI[aVersion], + element->SetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[aVersion], nsSOAPUtils::kEncodingStyleAttribute, enc); } } @@ -514,7 +514,7 @@ nsresult nsAutoString style; for (;;) { nsCOMPtr < nsIDOMAttr > enc; - rv = element->GetAttributeNodeNS(*nsSOAPUtils::kSOAPEncURI[*aVersion], + rv = element->GetAttributeNodeNS(*nsSOAPUtils::kSOAPEnvURI[*aVersion], nsSOAPUtils::kEncodingStyleAttribute, getter_AddRefs(enc)); if (NS_FAILED(rv)) @@ -531,7 +531,7 @@ nsresult return rv; if (next) { PRUint16 type; - rv = element->GetNodeType(&type); + rv = next->GetNodeType(&type); if (NS_FAILED(rv)) return rv; if (type != nsIDOMNode::ELEMENT_NODE) { diff --git a/mozilla/extensions/xmlextras/tests/soapheadlinenews.html b/mozilla/extensions/xmlextras/tests/soapheadlinenews.html new file mode 100644 index 00000000000..b2934d61b37 --- /dev/null +++ b/mozilla/extensions/xmlextras/tests/soapheadlinenews.html @@ -0,0 +1,76 @@ + + + + +

SOAP Test: Headline News

+The entered domain name will be searched, and the result displayed. +X Methods Website. 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. +

Experimenters may wish to add other tests which exercize services, with specific +user interfaces such as the one in this test. + +

+ + + + + + +