зеркало из https://github.com/mozilla/gecko-dev.git
Changing odd whitespace usage in template variable (nsCOMPtr) declarations to 'normal' whitespace usage. No code change.
This commit is contained in:
Родитель
98c9b7e62f
Коммит
ff6fe94eee
|
@ -735,7 +735,7 @@ nsWebScriptsAccess::IsPublicService(const char* aHost, PRBool* aReturn)
|
||||||
|
|
||||||
block->SetName(NS_LITERAL_STRING("fqdn"));
|
block->SetName(NS_LITERAL_STRING("fqdn"));
|
||||||
|
|
||||||
nsCOMPtr <nsIWritableVariant> variant =
|
nsCOMPtr<nsIWritableVariant> variant =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
|
||||||
|
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
|
|
@ -197,7 +197,7 @@ static nsresult GetSupertype(nsISOAPEncoding * aEncoding, nsISchemaType* aType,
|
||||||
switch (typevalue) {
|
switch (typevalue) {
|
||||||
case nsISchemaType::SCHEMA_TYPE_COMPLEX:
|
case nsISchemaType::SCHEMA_TYPE_COMPLEX:
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsISchemaComplexType > type =
|
nsCOMPtr<nsISchemaComplexType> type =
|
||||||
do_QueryInterface(aType);
|
do_QueryInterface(aType);
|
||||||
rc = type->GetBaseType(getter_AddRefs(base));
|
rc = type->GetBaseType(getter_AddRefs(base));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
|
@ -206,7 +206,7 @@ static nsresult GetSupertype(nsISOAPEncoding * aEncoding, nsISchemaType* aType,
|
||||||
}
|
}
|
||||||
case nsISchemaType::SCHEMA_TYPE_SIMPLE:
|
case nsISchemaType::SCHEMA_TYPE_SIMPLE:
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsISchemaSimpleType > type =
|
nsCOMPtr<nsISchemaSimpleType> type =
|
||||||
do_QueryInterface(aType);
|
do_QueryInterface(aType);
|
||||||
PRUint16 simpletypevalue;
|
PRUint16 simpletypevalue;
|
||||||
rc = type->GetSimpleType(&simpletypevalue);
|
rc = type->GetSimpleType(&simpletypevalue);
|
||||||
|
@ -224,9 +224,9 @@ static nsresult GetSupertype(nsISOAPEncoding * aEncoding, nsISchemaType* aType,
|
||||||
// guarantees.
|
// guarantees.
|
||||||
case nsISchemaSimpleType::SIMPLE_TYPE_RESTRICTION:
|
case nsISchemaSimpleType::SIMPLE_TYPE_RESTRICTION:
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsISchemaRestrictionType > simpletype =
|
nsCOMPtr<nsISchemaRestrictionType> simpletype =
|
||||||
do_QueryInterface(type);
|
do_QueryInterface(type);
|
||||||
nsCOMPtr < nsISchemaSimpleType > simplebasetype;
|
nsCOMPtr<nsISchemaSimpleType> simplebasetype;
|
||||||
rc = simpletype->GetBaseType(getter_AddRefs(simplebasetype));
|
rc = simpletype->GetBaseType(getter_AddRefs(simplebasetype));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -235,7 +235,7 @@ static nsresult GetSupertype(nsISOAPEncoding * aEncoding, nsISchemaType* aType,
|
||||||
}
|
}
|
||||||
case nsISchemaSimpleType::SIMPLE_TYPE_BUILTIN:
|
case nsISchemaSimpleType::SIMPLE_TYPE_BUILTIN:
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsISchemaBuiltinType > builtintype =
|
nsCOMPtr<nsISchemaBuiltinType> builtintype =
|
||||||
do_QueryInterface(type);
|
do_QueryInterface(type);
|
||||||
PRUint16 builtintypevalue;
|
PRUint16 builtintypevalue;
|
||||||
rc = builtintype->GetBuiltinType(&builtintypevalue);
|
rc = builtintype->GetBuiltinType(&builtintypevalue);
|
||||||
|
@ -491,15 +491,15 @@ EncodeSimpleValue(nsISOAPEncoding * aEncoding,
|
||||||
}
|
}
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIDOMDocument > document;
|
nsCOMPtr<nsIDOMDocument> document;
|
||||||
rc = aDestination->GetOwnerDocument(getter_AddRefs(document));
|
rc = aDestination->GetOwnerDocument(getter_AddRefs(document));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
rc = document->CreateElementNS(ns, name, getter_AddRefs(element));
|
rc = document->CreateElementNS(ns, name, getter_AddRefs(element));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIDOMNode > ignore;
|
nsCOMPtr<nsIDOMNode> ignore;
|
||||||
rc = aDestination->AppendChild(element, getter_AddRefs(ignore));
|
rc = aDestination->AppendChild(element, getter_AddRefs(ignore));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -520,7 +520,7 @@ EncodeSimpleValue(nsISOAPEncoding * aEncoding,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (!aValue.IsEmpty()) {
|
if (!aValue.IsEmpty()) {
|
||||||
nsCOMPtr < nsIDOMText > text;
|
nsCOMPtr<nsIDOMText> text;
|
||||||
rc = document->CreateTextNode(aValue, getter_AddRefs(text));
|
rc = document->CreateTextNode(aValue, getter_AddRefs(text));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -586,9 +586,9 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISOAPEncoder > encoder;
|
nsCOMPtr<nsISOAPEncoder> encoder;
|
||||||
if (aSchemaType) {
|
if (aSchemaType) {
|
||||||
nsCOMPtr < nsISchemaType > lookupType = aSchemaType;
|
nsCOMPtr<nsISchemaType> lookupType = aSchemaType;
|
||||||
do {
|
do {
|
||||||
nsAutoString schemaType;
|
nsAutoString schemaType;
|
||||||
nsAutoString schemaURI;
|
nsAutoString schemaURI;
|
||||||
|
@ -752,7 +752,7 @@ NS_IMETHODIMP
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPEncoder > encoder;
|
nsCOMPtr<nsISOAPEncoder> encoder;
|
||||||
nsAutoString encodingKey;
|
nsAutoString encodingKey;
|
||||||
SOAPEncodingKey(nativeSchemaURI, nativeSchemaType, encodingKey);
|
SOAPEncodingKey(nativeSchemaURI, nativeSchemaType, encodingKey);
|
||||||
rc = aEncoding->GetEncoder(encodingKey, getter_AddRefs(encoder));
|
rc = aEncoding->GetEncoder(encodingKey, getter_AddRefs(encoder));
|
||||||
|
@ -764,7 +764,7 @@ NS_IMETHODIMP
|
||||||
type = aSchemaType;
|
type = aSchemaType;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr < nsISchemaCollection > collection;
|
nsCOMPtr<nsISchemaCollection> collection;
|
||||||
nsresult rc =
|
nsresult rc =
|
||||||
aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
|
@ -1172,7 +1172,7 @@ static nsresult EncodeArray(nsISOAPEncoding* aEncoding, nsIVariant* aSource, nsI
|
||||||
#define ENCODE_SIMPLE_ARRAY(XPType, VType, Source) \
|
#define ENCODE_SIMPLE_ARRAY(XPType, VType, Source) \
|
||||||
{\
|
{\
|
||||||
XPType* values = NS_STATIC_CAST(XPType*, array);\
|
XPType* values = NS_STATIC_CAST(XPType*, array);\
|
||||||
nsCOMPtr < nsIWritableVariant > p =\
|
nsCOMPtr<nsIWritableVariant> p =\
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);\
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);\
|
||||||
if (NS_FAILED(rc)) break;\
|
if (NS_FAILED(rc)) break;\
|
||||||
for (i = 0; i < count; i++) {\
|
for (i = 0; i < count; i++) {\
|
||||||
|
@ -1270,7 +1270,7 @@ static nsresult EncodeArray(nsISOAPEncoding* aEncoding, nsIVariant* aSource, nsI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
||||||
if (NS_FAILED(rc)) break;
|
if (NS_FAILED(rc)) break;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
|
@ -1377,7 +1377,7 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISchemaCollection > collection;
|
nsCOMPtr<nsISchemaCollection> collection;
|
||||||
nsresult rc =
|
nsresult rc =
|
||||||
aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
|
@ -1839,10 +1839,10 @@ NS_IMETHODIMP
|
||||||
NS_ENSURE_ARG_POINTER(aSource);
|
NS_ENSURE_ARG_POINTER(aSource);
|
||||||
NS_ENSURE_ARG_POINTER(_retval);
|
NS_ENSURE_ARG_POINTER(_retval);
|
||||||
*_retval = nsnull;
|
*_retval = nsnull;
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding = aEncoding; // First, handle encoding redesignation, if any
|
nsCOMPtr<nsISOAPEncoding> encoding = aEncoding; // First, handle encoding redesignation, if any
|
||||||
|
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMAttr > enc;
|
nsCOMPtr<nsIDOMAttr> enc;
|
||||||
nsresult rv =
|
nsresult rv =
|
||||||
aSource->
|
aSource->
|
||||||
GetAttributeNodeNS(*gSOAPStrings->kSOAPEnvURI[mSOAPVersion],
|
GetAttributeNodeNS(*gSOAPStrings->kSOAPEnvURI[mSOAPVersion],
|
||||||
|
@ -1860,7 +1860,7 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
if (!style.Equals(oldstyle)) {
|
if (!style.Equals(oldstyle)) {
|
||||||
nsCOMPtr < nsISOAPEncoding > newencoding;
|
nsCOMPtr<nsISOAPEncoding> newencoding;
|
||||||
rv = encoding->GetAssociatedEncoding(style, PR_FALSE,
|
rv = encoding->GetAssociatedEncoding(style, PR_FALSE,
|
||||||
getter_AddRefs(newencoding));
|
getter_AddRefs(newencoding));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
@ -1886,11 +1886,11 @@ NS_IMETHODIMP
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_NILL_VALUE","The value of the nill attribute must be true or false.");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_NILL_VALUE","The value of the nill attribute must be true or false.");
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr < nsISchemaType > type = aSchemaType;
|
nsCOMPtr<nsISchemaType> type = aSchemaType;
|
||||||
nsCOMPtr < nsISOAPDecoder > decoder; // All that comes out of this block is decoder, type, and some checks.
|
nsCOMPtr<nsISOAPDecoder> decoder; // All that comes out of this block is decoder, type, and some checks.
|
||||||
{ // Look up type element and schema attribute, if possible
|
{ // Look up type element and schema attribute, if possible
|
||||||
nsCOMPtr < nsISchemaType > subType;
|
nsCOMPtr<nsISchemaType> subType;
|
||||||
nsCOMPtr < nsISchemaCollection > collection;
|
nsCOMPtr<nsISchemaCollection> collection;
|
||||||
nsresult rc =
|
nsresult rc =
|
||||||
aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
|
@ -1907,7 +1907,7 @@ NS_IMETHODIMP
|
||||||
rc = aSource->GetLocalName(name);
|
rc = aSource->GetLocalName(name);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsISchemaElement > element;
|
nsCOMPtr<nsISchemaElement> element;
|
||||||
rc = collection->GetElement(name, ns, getter_AddRefs(element));
|
rc = collection->GetElement(name, ns, getter_AddRefs(element));
|
||||||
// if (NS_FAILED(rc)) return rc;
|
// if (NS_FAILED(rc)) return rc;
|
||||||
if (element) {
|
if (element) {
|
||||||
|
@ -1934,7 +1934,7 @@ NS_IMETHODIMP
|
||||||
if (!subType)
|
if (!subType)
|
||||||
subType = type;
|
subType = type;
|
||||||
|
|
||||||
nsCOMPtr < nsISchemaType > subsubType;
|
nsCOMPtr<nsISchemaType> subsubType;
|
||||||
nsAutoString explicitType;
|
nsAutoString explicitType;
|
||||||
if (nsSOAPUtils::GetAttribute(aEncoding, aSource, gSOAPStrings->kXSIURI,
|
if (nsSOAPUtils::GetAttribute(aEncoding, aSource, gSOAPStrings->kXSIURI,
|
||||||
gSOAPStrings->kXSITypeAttribute,
|
gSOAPStrings->kXSITypeAttribute,
|
||||||
|
@ -1953,7 +1953,7 @@ NS_IMETHODIMP
|
||||||
|
|
||||||
if (subsubType) { // Loop up the hierarchy, to check and look for decoders
|
if (subsubType) { // Loop up the hierarchy, to check and look for decoders
|
||||||
for(;;) {
|
for(;;) {
|
||||||
nsCOMPtr < nsISchemaType > lookupType = subsubType;
|
nsCOMPtr<nsISchemaType> lookupType = subsubType;
|
||||||
do {
|
do {
|
||||||
if (lookupType == subType) { // Tick off the located super classes
|
if (lookupType == subType) { // Tick off the located super classes
|
||||||
subType = nsnull;
|
subType = nsnull;
|
||||||
|
@ -2056,7 +2056,7 @@ NS_IMETHODIMP
|
||||||
SOAPEncodingKey(gSOAPStrings->kXSURI,
|
SOAPEncodingKey(gSOAPStrings->kXSURI,
|
||||||
gSOAPStrings->kAnySimpleTypeSchemaType, decodingKey);
|
gSOAPStrings->kAnySimpleTypeSchemaType, decodingKey);
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISOAPDecoder > decoder;
|
nsCOMPtr<nsISOAPDecoder> decoder;
|
||||||
nsresult rc =
|
nsresult rc =
|
||||||
aEncoding->GetDecoder(decodingKey, getter_AddRefs(decoder));
|
aEncoding->GetDecoder(decodingKey, getter_AddRefs(decoder));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
|
@ -2324,11 +2324,11 @@ NS_IMETHODIMP
|
||||||
rc = SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_LEFTOVERS","Decoded struct contained extra items not mentioned in the content model.");
|
rc = SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_LEFTOVERS","Decoded struct contained extra items not mentioned in the content model.");
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIPropertyBag > bag;
|
nsCOMPtr<nsIPropertyBag> bag;
|
||||||
rc = mutator->GetPropertyBag(getter_AddRefs(bag));
|
rc = mutator->GetPropertyBag(getter_AddRefs(bag));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -2355,7 +2355,7 @@ NS_IMETHODIMP
|
||||||
nsresult rc = nsSOAPUtils::GetElementTextContent(aSource, value);
|
nsresult rc = nsSOAPUtils::GetElementTextContent(aSource, value);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -2573,7 +2573,7 @@ NS_IMETHODIMP
|
||||||
*_retval = nsnull;
|
*_retval = nsnull;
|
||||||
nsAutoString ns;
|
nsAutoString ns;
|
||||||
nsAutoString name;
|
nsAutoString name;
|
||||||
nsCOMPtr < nsISchemaType > schemaArrayType;
|
nsCOMPtr<nsISchemaType> schemaArrayType;
|
||||||
nsAutoString value;
|
nsAutoString value;
|
||||||
PRUint32 dimensionCount = 0; // Number of dimensions
|
PRUint32 dimensionCount = 0; // Number of dimensions
|
||||||
PRInt32 dimensionSizes[MAX_ARRAY_DIMENSIONS];
|
PRInt32 dimensionSizes[MAX_ARRAY_DIMENSIONS];
|
||||||
|
@ -2632,7 +2632,7 @@ NS_IMETHODIMP
|
||||||
}
|
}
|
||||||
|
|
||||||
// The array type is either array if ']' or other specific type.
|
// The array type is either array if ']' or other specific type.
|
||||||
nsCOMPtr < nsISchemaCollection > collection;
|
nsCOMPtr<nsISchemaCollection> collection;
|
||||||
rc = aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
rc = aEncoding->GetSchemaCollection(getter_AddRefs(collection));
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -2656,7 +2656,7 @@ NS_IMETHODIMP
|
||||||
|
|
||||||
if (subtype) { // Loop up the hierarchy, to ensure suitability of subtype
|
if (subtype) { // Loop up the hierarchy, to ensure suitability of subtype
|
||||||
if (schemaArrayType) {
|
if (schemaArrayType) {
|
||||||
nsCOMPtr < nsISchemaType > lookupType = subtype;
|
nsCOMPtr<nsISchemaType> lookupType = subtype;
|
||||||
do {
|
do {
|
||||||
if (lookupType == schemaArrayType) { // Tick off the located super classes
|
if (lookupType == schemaArrayType) { // Tick off the located super classes
|
||||||
schemaArrayType = nsnull;
|
schemaArrayType = nsnull;
|
||||||
|
@ -2906,7 +2906,7 @@ NS_IMETHODIMP
|
||||||
nsresult rc = nsSOAPUtils::GetElementTextContent(aSource, value);
|
nsresult rc = nsSOAPUtils::GetElementTextContent(aSource, value);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -2943,7 +2943,7 @@ NS_IMETHODIMP
|
||||||
} else
|
} else
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_BOOLEAN","Illegal value discovered for boolean");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_BOOLEAN","Illegal value discovered for boolean");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -2974,7 +2974,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_DOUBLE","Illegal value discovered for double");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_DOUBLE","Illegal value discovered for double");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3005,7 +3005,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_FLOAT","Illegal value discovered for float");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_FLOAT","Illegal value discovered for float");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3036,7 +3036,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_LONG","Illegal value discovered for long");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_LONG","Illegal value discovered for long");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3067,7 +3067,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_INT","Illegal value discovered for int");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_INT","Illegal value discovered for int");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3098,7 +3098,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_SHORT","Illegal value discovered for short");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_SHORT","Illegal value discovered for short");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3129,7 +3129,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length() || f < -128 || f > 127)
|
if (r == 0 || n < value.Length() || f < -128 || f > 127)
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_BYTE","Illegal value discovered for byte");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_BYTE","Illegal value discovered for byte");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3160,7 +3160,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_ULONG","Illegal value discovered for unsigned long");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_ULONG","Illegal value discovered for unsigned long");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3191,7 +3191,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_UINT","Illegal value discovered for unsigned int");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_UINT","Illegal value discovered for unsigned int");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3222,7 +3222,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length())
|
if (r == 0 || n < value.Length())
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_USHORT","Illegal value discovered for unsigned short");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_USHORT","Illegal value discovered for unsigned short");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -3253,7 +3253,7 @@ NS_IMETHODIMP
|
||||||
if (r == 0 || n < value.Length() || f > 255)
|
if (r == 0 || n < value.Length() || f > 255)
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_UBYTE","Illegal value discovered for unsigned byte");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_ILLEGAL_UBYTE","Illegal value discovered for unsigned byte");
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID,&rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -315,9 +315,9 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
|
||||||
NS_ENSURE_ARG(aCall);
|
NS_ENSURE_ARG(aCall);
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsIXMLHttpRequest > request;
|
nsCOMPtr<nsIXMLHttpRequest> request;
|
||||||
|
|
||||||
nsCOMPtr < nsIDOMDocument > messageDocument;
|
nsCOMPtr<nsIDOMDocument> messageDocument;
|
||||||
rv = aCall->GetMessage(getter_AddRefs(messageDocument));
|
rv = aCall->GetMessage(getter_AddRefs(messageDocument));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -367,7 +367,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > variant =
|
nsCOMPtr<nsIWritableVariant> variant =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -392,7 +392,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (aResponse) {
|
if (aResponse) {
|
||||||
nsCOMPtr < nsIDOMDocument > response;
|
nsCOMPtr<nsIDOMDocument> response;
|
||||||
rv = request->GetResponseXML(getter_AddRefs(response));
|
rv = request->GetResponseXML(getter_AddRefs(response));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -437,7 +437,7 @@ NS_IMETHODIMP
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG(aResponse);
|
NS_ENSURE_ARG(aResponse);
|
||||||
*aResponse =
|
*aResponse =
|
||||||
mRequest ? (nsCOMPtr < nsISOAPResponse >) nsnull : mResponse;
|
mRequest ? (nsCOMPtr<nsISOAPResponse>) nsnull : mResponse;
|
||||||
NS_IF_ADDREF(*aResponse);
|
NS_IF_ADDREF(*aResponse);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -490,7 +490,7 @@ NS_IMETHODIMP
|
||||||
rv = NS_ERROR_FAILURE;
|
rv = NS_ERROR_FAILURE;
|
||||||
#endif
|
#endif
|
||||||
if (mResponse) { // && NS_SUCCEEDED(rv)) {
|
if (mResponse) { // && NS_SUCCEEDED(rv)) {
|
||||||
nsCOMPtr < nsIDOMDocument > document;
|
nsCOMPtr<nsIDOMDocument> document;
|
||||||
rv = mRequest->GetResponseXML(getter_AddRefs(document));
|
rv = mRequest->GetResponseXML(getter_AddRefs(document));
|
||||||
if (NS_SUCCEEDED(rv) && document) {
|
if (NS_SUCCEEDED(rv) && document) {
|
||||||
rv = mResponse->SetMessage(document);
|
rv = mResponse->SetMessage(document);
|
||||||
|
@ -503,7 +503,7 @@ NS_IMETHODIMP
|
||||||
} else {
|
} else {
|
||||||
mResponse = nsnull;
|
mResponse = nsnull;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISOAPCallCompletion > kungFuDeathGrip = this;
|
nsCOMPtr<nsISOAPCallCompletion> kungFuDeathGrip = this;
|
||||||
mRequest = nsnull; // Break cycle of references by releas.
|
mRequest = nsnull; // Break cycle of references by releas.
|
||||||
PRBool c; // In other transports, this may signal to stop returning if multiple returns
|
PRBool c; // In other transports, this may signal to stop returning if multiple returns
|
||||||
mListener->HandleResponse(mResponse, mCall, rv, PR_TRUE, &c);
|
mListener->HandleResponse(mResponse, mCall, rv, PR_TRUE, &c);
|
||||||
|
@ -522,9 +522,9 @@ NS_IMETHODIMP
|
||||||
NS_ENSURE_ARG(aCompletion);
|
NS_ENSURE_ARG(aCompletion);
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsIXMLHttpRequest > request;
|
nsCOMPtr<nsIXMLHttpRequest> request;
|
||||||
|
|
||||||
nsCOMPtr < nsIDOMDocument > messageDocument;
|
nsCOMPtr<nsIDOMDocument> messageDocument;
|
||||||
rv = aCall->GetMessage(getter_AddRefs(messageDocument));
|
rv = aCall->GetMessage(getter_AddRefs(messageDocument));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -535,7 +535,7 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
nsCOMPtr < nsIDOMEventTarget > eventTarget =
|
nsCOMPtr<nsIDOMEventTarget> eventTarget =
|
||||||
do_QueryInterface(request, &rv);
|
do_QueryInterface(request, &rv);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -578,7 +578,7 @@ NS_IMETHODIMP
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr < nsIWritableVariant > variant =
|
nsCOMPtr<nsIWritableVariant> variant =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -588,7 +588,7 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPCallCompletion > completion;
|
nsCOMPtr<nsISOAPCallCompletion> completion;
|
||||||
|
|
||||||
if (aListener) {
|
if (aListener) {
|
||||||
completion =
|
completion =
|
||||||
|
@ -597,7 +597,7 @@ NS_IMETHODIMP
|
||||||
if (!completion)
|
if (!completion)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
nsCOMPtr < nsIDOMEventListener > listener =
|
nsCOMPtr<nsIDOMEventListener> listener =
|
||||||
do_QueryInterface(completion);
|
do_QueryInterface(completion);
|
||||||
rv = eventTarget->AddEventListener(NS_LITERAL_STRING("load"), listener,
|
rv = eventTarget->AddEventListener(NS_LITERAL_STRING("load"), listener,
|
||||||
PR_FALSE);
|
PR_FALSE);
|
||||||
|
|
|
@ -80,10 +80,10 @@ public:
|
||||||
NS_IMETHOD HandleEvent(nsIDOMEvent * aEvent);
|
NS_IMETHOD HandleEvent(nsIDOMEvent * aEvent);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsCOMPtr < nsISOAPCall > mCall;
|
nsCOMPtr<nsISOAPCall> mCall;
|
||||||
nsCOMPtr < nsISOAPResponse > mResponse;
|
nsCOMPtr<nsISOAPResponse> mResponse;
|
||||||
nsCOMPtr < nsIXMLHttpRequest > mRequest;
|
nsCOMPtr<nsIXMLHttpRequest> mRequest;
|
||||||
nsCOMPtr < nsISOAPResponseListener > mListener;
|
nsCOMPtr<nsISOAPResponseListener> mListener;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NS_HTTPSOAPTRANSPORT_CID \
|
#define NS_HTTPSOAPTRANSPORT_CID \
|
||||||
|
|
|
@ -216,9 +216,9 @@ NS_IMETHODIMP
|
||||||
&s3))
|
&s3))
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_BLOCK_INIT", "Could not interpret block initialization arguments.");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_BLOCK_INIT", "Could not interpret block initialization arguments.");
|
||||||
|
|
||||||
nsCOMPtr < nsIVariant > value = dont_AddRef(s1);
|
nsCOMPtr<nsIVariant> value = dont_AddRef(s1);
|
||||||
nsCOMPtr < nsISupports > schemaType = dont_AddRef(s2);
|
nsCOMPtr<nsISupports> schemaType = dont_AddRef(s2);
|
||||||
nsCOMPtr < nsISupports > encoding = dont_AddRef(s3);
|
nsCOMPtr<nsISupports> encoding = dont_AddRef(s3);
|
||||||
|
|
||||||
nsresult rc = SetValue(value);
|
nsresult rc = SetValue(value);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
|
@ -230,7 +230,7 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
if (schemaType) {
|
if (schemaType) {
|
||||||
nsCOMPtr < nsISchemaType > v = do_QueryInterface(schemaType, &rc);
|
nsCOMPtr<nsISchemaType> v = do_QueryInterface(schemaType, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
rc = SetSchemaType(v);
|
rc = SetSchemaType(v);
|
||||||
|
@ -238,7 +238,7 @@ NS_IMETHODIMP
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (encoding) {
|
if (encoding) {
|
||||||
nsCOMPtr < nsISOAPEncoding > v = do_QueryInterface(encoding, &rc);
|
nsCOMPtr<nsISOAPEncoding> v = do_QueryInterface(encoding, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
rc = SetEncoding(v);
|
rc = SetEncoding(v);
|
||||||
|
|
|
@ -99,7 +99,7 @@ nsresult nsSOAPCall::GetTransport(nsISOAPTransport ** aTransport)
|
||||||
*aTransport = nsnull;
|
*aTransport = nsnull;
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsIURI > uri;
|
nsCOMPtr<nsIURI> uri;
|
||||||
|
|
||||||
rv = NS_NewURI(getter_AddRefs(uri), mTransportURI);
|
rv = NS_NewURI(getter_AddRefs(uri), mTransportURI);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
@ -120,7 +120,7 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(_retval);
|
NS_ENSURE_ARG_POINTER(_retval);
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsISOAPTransport > transport;
|
nsCOMPtr<nsISOAPTransport> transport;
|
||||||
|
|
||||||
if (mTransportURI.IsEmpty()) {
|
if (mTransportURI.IsEmpty()) {
|
||||||
return SOAP_EXCEPTION(NS_ERROR_NOT_INITIALIZED,"SOAP_TRANSPORT_URI", "No transport URI was specified.");
|
return SOAP_EXCEPTION(NS_ERROR_NOT_INITIALIZED,"SOAP_TRANSPORT_URI", "No transport URI was specified.");
|
||||||
|
@ -130,7 +130,7 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPResponse >
|
nsCOMPtr<nsISOAPResponse>
|
||||||
response(do_CreateInstance(NS_SOAPRESPONSE_CONTRACTID, &rv));
|
response(do_CreateInstance(NS_SOAPRESPONSE_CONTRACTID, &rv));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -142,7 +142,7 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
nsCOMPtr < nsIDOMDocument > document;
|
nsCOMPtr<nsIDOMDocument> document;
|
||||||
rv = response->GetMessage(getter_AddRefs(document)); // No XML response.
|
rv = response->GetMessage(getter_AddRefs(document)); // No XML response.
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -162,7 +162,7 @@ NS_IMETHODIMP
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aCompletion);
|
NS_ENSURE_ARG_POINTER(aCompletion);
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsISOAPTransport > transport;
|
nsCOMPtr<nsISOAPTransport> transport;
|
||||||
|
|
||||||
if (mTransportURI.IsEmpty()) {
|
if (mTransportURI.IsEmpty()) {
|
||||||
return SOAP_EXCEPTION(NS_ERROR_NOT_INITIALIZED,"SOAP_TRANSPORT_URI", "No transport URI was specified.");
|
return SOAP_EXCEPTION(NS_ERROR_NOT_INITIALIZED,"SOAP_TRANSPORT_URI", "No transport URI was specified.");
|
||||||
|
@ -172,7 +172,7 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPResponse >
|
nsCOMPtr<nsISOAPResponse>
|
||||||
response(do_CreateInstance(NS_SOAPRESPONSE_CONTRACTID, &rv));
|
response(do_CreateInstance(NS_SOAPRESPONSE_CONTRACTID, &rv));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
|
@ -90,13 +90,13 @@ nsSOAPEncodingRegistry::GetAssociatedEncoding(const nsAString & aStyleURI,
|
||||||
nsStringKey styleKey(aStyleURI);
|
nsStringKey styleKey(aStyleURI);
|
||||||
*aEncoding = (nsISOAPEncoding *) mEncodings.Get(&styleKey);
|
*aEncoding = (nsISOAPEncoding *) mEncodings.Get(&styleKey);
|
||||||
if (!*aEncoding) {
|
if (!*aEncoding) {
|
||||||
nsCOMPtr < nsISOAPEncoding > defaultEncoding;
|
nsCOMPtr<nsISOAPEncoding> defaultEncoding;
|
||||||
nsCAutoString encodingContractid;
|
nsCAutoString encodingContractid;
|
||||||
encodingContractid.Assign(NS_SOAPENCODING_CONTRACTID_PREFIX);
|
encodingContractid.Assign(NS_SOAPENCODING_CONTRACTID_PREFIX);
|
||||||
encodingContractid.Append(NS_ConvertUCS2toUTF8(aStyleURI));
|
encodingContractid.Append(NS_ConvertUCS2toUTF8(aStyleURI));
|
||||||
defaultEncoding = do_GetService(encodingContractid.get());
|
defaultEncoding = do_GetService(encodingContractid.get());
|
||||||
if (defaultEncoding || aCreateIf) {
|
if (defaultEncoding || aCreateIf) {
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding = new nsSOAPEncoding(aStyleURI,this,defaultEncoding);
|
nsCOMPtr<nsISOAPEncoding> encoding = new nsSOAPEncoding(aStyleURI,this,defaultEncoding);
|
||||||
*aEncoding = encoding;
|
*aEncoding = encoding;
|
||||||
if (encoding) {
|
if (encoding) {
|
||||||
NS_ADDREF(*aEncoding);
|
NS_ADDREF(*aEncoding);
|
||||||
|
@ -130,7 +130,7 @@ nsresult
|
||||||
NS_ENSURE_ARG_POINTER(aSchemaCollection);
|
NS_ENSURE_ARG_POINTER(aSchemaCollection);
|
||||||
if (!mSchemaCollection) {
|
if (!mSchemaCollection) {
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsISchemaLoader > loader =
|
nsCOMPtr<nsISchemaLoader> loader =
|
||||||
do_CreateInstance(NS_SCHEMALOADER_CONTRACTID, &rv);
|
do_CreateInstance(NS_SCHEMALOADER_CONTRACTID, &rv);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -307,7 +307,7 @@ NS_IMETHODIMP
|
||||||
NS_ENSURE_ARG(aSource);
|
NS_ENSURE_ARG(aSource);
|
||||||
NS_ENSURE_ARG_POINTER(_retval);
|
NS_ENSURE_ARG_POINTER(_retval);
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPEncoder > encoder;
|
nsCOMPtr<nsISOAPEncoder> encoder;
|
||||||
nsresult rv = GetDefaultEncoder(getter_AddRefs(encoder));
|
nsresult rv = GetDefaultEncoder(getter_AddRefs(encoder));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -329,7 +329,7 @@ NS_IMETHODIMP
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG(aSource);
|
NS_ENSURE_ARG(aSource);
|
||||||
NS_ENSURE_ARG_POINTER(_retval);
|
NS_ENSURE_ARG_POINTER(_retval);
|
||||||
nsCOMPtr < nsISOAPDecoder > decoder;
|
nsCOMPtr<nsISOAPDecoder> decoder;
|
||||||
nsresult rv = GetDefaultDecoder(getter_AddRefs(decoder));
|
nsresult rv = GetDefaultDecoder(getter_AddRefs(decoder));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -403,7 +403,7 @@ nsSOAPEncoding::MapSchemaURI(const nsAString & aExternalURI,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
nsresult rc;
|
nsresult rc;
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -413,7 +413,7 @@ nsSOAPEncoding::MapSchemaURI(const nsAString & aExternalURI,
|
||||||
mMappedInternal.Put(&internalKey, p);
|
mMappedInternal.Put(&internalKey, p);
|
||||||
}
|
}
|
||||||
nsresult rc;
|
nsresult rc;
|
||||||
nsCOMPtr < nsIWritableVariant > p =
|
nsCOMPtr<nsIWritableVariant> p =
|
||||||
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
do_CreateInstance(NS_VARIANT_CONTRACTID, &rc);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsObjectHashtable mEncodings;
|
nsObjectHashtable mEncodings;
|
||||||
nsCOMPtr < nsISchemaCollection > mSchemaCollection;
|
nsCOMPtr<nsISchemaCollection> mSchemaCollection;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,9 +101,9 @@ protected:
|
||||||
// Weak Reference to avoid cyclic refs and leaks. See notes above.
|
// Weak Reference to avoid cyclic refs and leaks. See notes above.
|
||||||
nsISOAPEncodingRegistry *mRegistry;
|
nsISOAPEncodingRegistry *mRegistry;
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPEncoding > mDefaultEncoding;
|
nsCOMPtr<nsISOAPEncoding> mDefaultEncoding;
|
||||||
nsCOMPtr < nsISOAPEncoder > mDefaultEncoder;
|
nsCOMPtr<nsISOAPEncoder> mDefaultEncoder;
|
||||||
nsCOMPtr < nsISOAPDecoder > mDefaultDecoder;
|
nsCOMPtr<nsISOAPDecoder> mDefaultDecoder;
|
||||||
nsSupportsHashtable mMappedInternal;
|
nsSupportsHashtable mMappedInternal;
|
||||||
nsSupportsHashtable mMappedExternal;
|
nsSupportsHashtable mMappedExternal;
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ NS_IMETHODIMP nsSOAPFault::GetFaultCode(nsAString & aFaultCode)
|
||||||
if (!mFaultElement)
|
if (!mFaultElement)
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
return NS_ERROR_ILLEGAL_VALUE;
|
||||||
aFaultCode.Truncate();
|
aFaultCode.Truncate();
|
||||||
nsCOMPtr < nsIDOMElement > faultcode;
|
nsCOMPtr<nsIDOMElement> faultcode;
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
||||||
gSOAPStrings->kEmpty,
|
gSOAPStrings->kEmpty,
|
||||||
gSOAPStrings->kFaultCodeTagName,
|
gSOAPStrings->kFaultCodeTagName,
|
||||||
|
@ -117,7 +117,7 @@ NS_IMETHODIMP nsSOAPFault::GetFaultNamespaceURI(nsAString & aNamespaceURI)
|
||||||
if (!mFaultElement)
|
if (!mFaultElement)
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
return NS_ERROR_ILLEGAL_VALUE;
|
||||||
aNamespaceURI.Truncate();
|
aNamespaceURI.Truncate();
|
||||||
nsCOMPtr < nsIDOMElement > faultcode;
|
nsCOMPtr<nsIDOMElement> faultcode;
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
||||||
gSOAPStrings->kEmpty,
|
gSOAPStrings->kEmpty,
|
||||||
gSOAPStrings->kFaultCodeTagName,
|
gSOAPStrings->kFaultCodeTagName,
|
||||||
|
@ -140,7 +140,7 @@ NS_IMETHODIMP nsSOAPFault::GetFaultString(nsAString & aFaultString)
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
return NS_ERROR_ILLEGAL_VALUE;
|
||||||
|
|
||||||
aFaultString.Truncate();
|
aFaultString.Truncate();
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
||||||
gSOAPStrings->kEmpty,
|
gSOAPStrings->kEmpty,
|
||||||
gSOAPStrings->kFaultStringTagName,
|
gSOAPStrings->kFaultStringTagName,
|
||||||
|
@ -161,7 +161,7 @@ NS_IMETHODIMP nsSOAPFault::GetFaultActor(nsAString & aFaultActor)
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
return NS_ERROR_ILLEGAL_VALUE;
|
||||||
|
|
||||||
aFaultActor.Truncate();
|
aFaultActor.Truncate();
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
|
||||||
gSOAPStrings->kEmpty,
|
gSOAPStrings->kEmpty,
|
||||||
gSOAPStrings->kFaultActorTagName,
|
gSOAPStrings->kFaultActorTagName,
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
// nsISOAPFault
|
// nsISOAPFault
|
||||||
NS_DECL_NSISOAPFAULT protected:
|
NS_DECL_NSISOAPFAULT protected:
|
||||||
nsCOMPtr < nsIDOMElement > mFaultElement;
|
nsCOMPtr<nsIDOMElement> mFaultElement;
|
||||||
PRUint16 mVersion;
|
PRUint16 mVersion;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -85,7 +85,7 @@ NS_IMETHODIMP nsSOAPMessage::GetEnvelope(nsIDOMElement * *aEnvelope)
|
||||||
NS_ENSURE_ARG_POINTER(aEnvelope);
|
NS_ENSURE_ARG_POINTER(aEnvelope);
|
||||||
|
|
||||||
if (mMessage) {
|
if (mMessage) {
|
||||||
nsCOMPtr < nsIDOMElement > root;
|
nsCOMPtr<nsIDOMElement> root;
|
||||||
mMessage->GetDocumentElement(getter_AddRefs(root));
|
mMessage->GetDocumentElement(getter_AddRefs(root));
|
||||||
if (root) {
|
if (root) {
|
||||||
nsAutoString namespaceURI;
|
nsAutoString namespaceURI;
|
||||||
|
@ -116,7 +116,7 @@ NS_IMETHODIMP nsSOAPMessage::GetVersion(PRUint16 * aVersion)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aVersion);
|
NS_ENSURE_ARG_POINTER(aVersion);
|
||||||
if (mMessage) {
|
if (mMessage) {
|
||||||
nsCOMPtr < nsIDOMElement > root;
|
nsCOMPtr<nsIDOMElement> root;
|
||||||
mMessage->GetDocumentElement(getter_AddRefs(root));
|
mMessage->GetDocumentElement(getter_AddRefs(root));
|
||||||
if (root) {
|
if (root) {
|
||||||
nsAutoString namespaceURI;
|
nsAutoString namespaceURI;
|
||||||
|
@ -148,7 +148,7 @@ NS_IMETHODIMP nsSOAPMessage::GetVersion(PRUint16 * aVersion)
|
||||||
PRUint16 nsSOAPMessage::GetEnvelopeWithVersion(nsIDOMElement * *aEnvelope)
|
PRUint16 nsSOAPMessage::GetEnvelopeWithVersion(nsIDOMElement * *aEnvelope)
|
||||||
{
|
{
|
||||||
if (mMessage) {
|
if (mMessage) {
|
||||||
nsCOMPtr < nsIDOMElement > root;
|
nsCOMPtr<nsIDOMElement> root;
|
||||||
mMessage->GetDocumentElement(getter_AddRefs(root));
|
mMessage->GetDocumentElement(getter_AddRefs(root));
|
||||||
if (root) {
|
if (root) {
|
||||||
nsAutoString namespaceURI;
|
nsAutoString namespaceURI;
|
||||||
|
@ -178,7 +178,7 @@ PRUint16 nsSOAPMessage::GetEnvelopeWithVersion(nsIDOMElement * *aEnvelope)
|
||||||
NS_IMETHODIMP nsSOAPMessage::GetHeader(nsIDOMElement * *aHeader)
|
NS_IMETHODIMP nsSOAPMessage::GetHeader(nsIDOMElement * *aHeader)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aHeader);
|
NS_ENSURE_ARG_POINTER(aHeader);
|
||||||
nsCOMPtr < nsIDOMElement > env;
|
nsCOMPtr<nsIDOMElement> env;
|
||||||
PRUint16 version = GetEnvelopeWithVersion(getter_AddRefs(env));
|
PRUint16 version = GetEnvelopeWithVersion(getter_AddRefs(env));
|
||||||
if (env) {
|
if (env) {
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, env,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, env,
|
||||||
|
@ -195,7 +195,7 @@ NS_IMETHODIMP nsSOAPMessage::GetHeader(nsIDOMElement * *aHeader)
|
||||||
NS_IMETHODIMP nsSOAPMessage::GetBody(nsIDOMElement * *aBody)
|
NS_IMETHODIMP nsSOAPMessage::GetBody(nsIDOMElement * *aBody)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aBody);
|
NS_ENSURE_ARG_POINTER(aBody);
|
||||||
nsCOMPtr < nsIDOMElement > env;
|
nsCOMPtr<nsIDOMElement> env;
|
||||||
PRUint16 version = GetEnvelopeWithVersion(getter_AddRefs(env));
|
PRUint16 version = GetEnvelopeWithVersion(getter_AddRefs(env));
|
||||||
if (env) {
|
if (env) {
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, env,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, env,
|
||||||
|
@ -226,10 +226,10 @@ NS_IMETHODIMP nsSOAPMessage::SetActionURI(const nsAString & aActionURI)
|
||||||
NS_IMETHODIMP nsSOAPMessage::GetMethodName(nsAString & aMethodName)
|
NS_IMETHODIMP nsSOAPMessage::GetMethodName(nsAString & aMethodName)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(&aMethodName);
|
NS_ENSURE_ARG_POINTER(&aMethodName);
|
||||||
nsCOMPtr < nsIDOMElement > body;
|
nsCOMPtr<nsIDOMElement> body;
|
||||||
GetBody(getter_AddRefs(body));
|
GetBody(getter_AddRefs(body));
|
||||||
if (body) {
|
if (body) {
|
||||||
nsCOMPtr < nsIDOMElement > method;
|
nsCOMPtr<nsIDOMElement> method;
|
||||||
nsSOAPUtils::GetFirstChildElement(body, getter_AddRefs(method));
|
nsSOAPUtils::GetFirstChildElement(body, getter_AddRefs(method));
|
||||||
if (method) {
|
if (method) {
|
||||||
body->GetLocalName(aMethodName);
|
body->GetLocalName(aMethodName);
|
||||||
|
@ -245,10 +245,10 @@ NS_IMETHODIMP nsSOAPMessage::
|
||||||
GetTargetObjectURI(nsAString & aTargetObjectURI)
|
GetTargetObjectURI(nsAString & aTargetObjectURI)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(&aTargetObjectURI);
|
NS_ENSURE_ARG_POINTER(&aTargetObjectURI);
|
||||||
nsCOMPtr < nsIDOMElement > body;
|
nsCOMPtr<nsIDOMElement> body;
|
||||||
GetBody(getter_AddRefs(body));
|
GetBody(getter_AddRefs(body));
|
||||||
if (body) {
|
if (body) {
|
||||||
nsCOMPtr < nsIDOMElement > method;
|
nsCOMPtr<nsIDOMElement> method;
|
||||||
nsSOAPUtils::GetFirstChildElement(body, getter_AddRefs(method));
|
nsSOAPUtils::GetFirstChildElement(body, getter_AddRefs(method));
|
||||||
if (method) {
|
if (method) {
|
||||||
nsCOMPtr<nsISOAPEncoding> encoding;
|
nsCOMPtr<nsISOAPEncoding> encoding;
|
||||||
|
@ -292,8 +292,8 @@ NS_IMETHODIMP
|
||||||
// Construct the message skeleton
|
// Construct the message skeleton
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr < nsIDOMNode > ignored;
|
nsCOMPtr<nsIDOMNode> ignored;
|
||||||
nsCOMPtr < nsIDOMParser > parser = do_CreateInstance(kDOMParserCID, &rv);
|
nsCOMPtr<nsIDOMParser> parser = do_CreateInstance(kDOMParserCID, &rv);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
|
@ -304,11 +304,11 @@ NS_IMETHODIMP
|
||||||
|
|
||||||
// Declare the default encoding. This should always be non-null, but may be empty string.
|
// Declare the default encoding. This should always be non-null, but may be empty string.
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding;
|
nsCOMPtr<nsISOAPEncoding> encoding;
|
||||||
rv = GetEncoding(getter_AddRefs(encoding));
|
rv = GetEncoding(getter_AddRefs(encoding));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIDOMElement > envelope;
|
nsCOMPtr<nsIDOMElement> envelope;
|
||||||
rv = GetEnvelope(getter_AddRefs(envelope));
|
rv = GetEnvelope(getter_AddRefs(envelope));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -348,12 +348,12 @@ NS_IMETHODIMP
|
||||||
// Encode and add headers, if any were specified
|
// Encode and add headers, if any were specified
|
||||||
|
|
||||||
if (aHeaderBlockCount) {
|
if (aHeaderBlockCount) {
|
||||||
nsCOMPtr < nsIDOMElement > parent;
|
nsCOMPtr<nsIDOMElement> parent;
|
||||||
rv = GetHeader(getter_AddRefs(parent));
|
rv = GetHeader(getter_AddRefs(parent));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsISOAPHeaderBlock > header;
|
nsCOMPtr<nsISOAPHeaderBlock> header;
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
nsAutoString name;
|
nsAutoString name;
|
||||||
nsAutoString namespaceURI;
|
nsAutoString namespaceURI;
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
|
@ -363,9 +363,9 @@ NS_IMETHODIMP
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_NULL_HEADER","Cannot encode null in header array.");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_NULL_HEADER","Cannot encode null in header array.");
|
||||||
rv = header->GetElement(getter_AddRefs(element));
|
rv = header->GetElement(getter_AddRefs(element));
|
||||||
if (element) {
|
if (element) {
|
||||||
nsCOMPtr < nsIDOMNode > node1;
|
nsCOMPtr<nsIDOMNode> node1;
|
||||||
node1 = element;
|
node1 = element;
|
||||||
nsCOMPtr < nsIDOMNode > node2;
|
nsCOMPtr<nsIDOMNode> node2;
|
||||||
rv = mMessage->ImportNode(node1, PR_TRUE, getter_AddRefs(node1));
|
rv = mMessage->ImportNode(node1, PR_TRUE, getter_AddRefs(node1));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -396,11 +396,11 @@ NS_IMETHODIMP
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISchemaType > schemaType;
|
nsCOMPtr<nsISchemaType> schemaType;
|
||||||
rv = header->GetSchemaType(getter_AddRefs(schemaType));
|
rv = header->GetSchemaType(getter_AddRefs(schemaType));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIVariant > value;
|
nsCOMPtr<nsIVariant> value;
|
||||||
rv = header->GetValue(getter_AddRefs(value));
|
rv = header->GetValue(getter_AddRefs(value));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -432,7 +432,7 @@ NS_IMETHODIMP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMElement > body;
|
nsCOMPtr<nsIDOMElement> body;
|
||||||
rv = GetBody(getter_AddRefs(body));
|
rv = GetBody(getter_AddRefs(body));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -442,12 +442,12 @@ NS_IMETHODIMP
|
||||||
if (!aMethodName.IsEmpty()) {
|
if (!aMethodName.IsEmpty()) {
|
||||||
nsAutoString temp;
|
nsAutoString temp;
|
||||||
rv = encoding->GetExternalSchemaURI(aTargetObjectURI, temp);
|
rv = encoding->GetExternalSchemaURI(aTargetObjectURI, temp);
|
||||||
nsCOMPtr < nsIDOMElement > call;
|
nsCOMPtr<nsIDOMElement> call;
|
||||||
rv = mMessage->CreateElementNS(temp, aMethodName,
|
rv = mMessage->CreateElementNS(temp, aMethodName,
|
||||||
getter_AddRefs(call));
|
getter_AddRefs(call));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIDOMNode > ignored;
|
nsCOMPtr<nsIDOMNode> ignored;
|
||||||
rv = body->AppendChild(call, getter_AddRefs(ignored));
|
rv = body->AppendChild(call, getter_AddRefs(ignored));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -455,9 +455,9 @@ NS_IMETHODIMP
|
||||||
}
|
}
|
||||||
// Encode and add all of the parameters into the body
|
// Encode and add all of the parameters into the body
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPParameter > param;
|
nsCOMPtr<nsISOAPParameter> param;
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
nsCOMPtr < nsISOAPEncoding > newencoding;
|
nsCOMPtr<nsISOAPEncoding> newencoding;
|
||||||
nsAutoString name;
|
nsAutoString name;
|
||||||
nsAutoString namespaceURI;
|
nsAutoString namespaceURI;
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
|
@ -467,9 +467,9 @@ NS_IMETHODIMP
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_NULL_PARAMETER","Cannot encode null in parameter array.");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_NULL_PARAMETER","Cannot encode null in parameter array.");
|
||||||
rv = param->GetElement(getter_AddRefs(element));
|
rv = param->GetElement(getter_AddRefs(element));
|
||||||
if (element) {
|
if (element) {
|
||||||
nsCOMPtr < nsIDOMNode > node1;
|
nsCOMPtr<nsIDOMNode> node1;
|
||||||
node1 = element;
|
node1 = element;
|
||||||
nsCOMPtr < nsIDOMNode > node2;
|
nsCOMPtr<nsIDOMNode> node2;
|
||||||
rv = mMessage->ImportNode(node1, PR_TRUE, getter_AddRefs(node1));
|
rv = mMessage->ImportNode(node1, PR_TRUE, getter_AddRefs(node1));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -490,11 +490,11 @@ NS_IMETHODIMP
|
||||||
if (!newencoding) {
|
if (!newencoding) {
|
||||||
newencoding = encoding;
|
newencoding = encoding;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISchemaType > schemaType;
|
nsCOMPtr<nsISchemaType> schemaType;
|
||||||
rv = param->GetSchemaType(getter_AddRefs(schemaType));
|
rv = param->GetSchemaType(getter_AddRefs(schemaType));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIVariant > value;
|
nsCOMPtr<nsIVariant> value;
|
||||||
rv = param->GetValue(getter_AddRefs(value));
|
rv = param->GetValue(getter_AddRefs(value));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -525,21 +525,21 @@ nsresult
|
||||||
PRUint16 * aVersion,
|
PRUint16 * aVersion,
|
||||||
nsISOAPEncoding ** aEncoding)
|
nsISOAPEncoding ** aEncoding)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding;
|
nsCOMPtr<nsISOAPEncoding> encoding;
|
||||||
nsresult rv = GetEncoding(getter_AddRefs(encoding));
|
nsresult rv = GetEncoding(getter_AddRefs(encoding));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
rv = GetVersion(aVersion);
|
rv = GetVersion(aVersion);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIDOMElement > element = aFirst;
|
nsCOMPtr<nsIDOMElement> element = aFirst;
|
||||||
|
|
||||||
// Check for stray encodingStyle attributes. If none found, then
|
// Check for stray encodingStyle attributes. If none found, then
|
||||||
// use empty string encoding style.
|
// use empty string encoding style.
|
||||||
|
|
||||||
nsAutoString style;
|
nsAutoString style;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
nsCOMPtr < nsIDOMAttr > enc;
|
nsCOMPtr<nsIDOMAttr> enc;
|
||||||
rv = element->GetAttributeNodeNS(*gSOAPStrings->kSOAPEnvURI[*aVersion],
|
rv = element->GetAttributeNodeNS(*gSOAPStrings->kSOAPEnvURI[*aVersion],
|
||||||
gSOAPStrings->kEncodingStyleAttribute,
|
gSOAPStrings->kEncodingStyleAttribute,
|
||||||
getter_AddRefs(enc));
|
getter_AddRefs(enc));
|
||||||
|
@ -551,7 +551,7 @@ nsresult
|
||||||
return rv;
|
return rv;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
nsCOMPtr < nsIDOMNode > next;
|
nsCOMPtr<nsIDOMNode> next;
|
||||||
rv = element->GetParentNode(getter_AddRefs(next));
|
rv = element->GetParentNode(getter_AddRefs(next));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -586,18 +586,18 @@ NS_IMETHODIMP
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
nsresult rv = GetHeader(getter_AddRefs(element));
|
nsresult rv = GetHeader(getter_AddRefs(element));
|
||||||
if (NS_FAILED(rv) || !element)
|
if (NS_FAILED(rv) || !element)
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding;
|
nsCOMPtr<nsISOAPEncoding> encoding;
|
||||||
PRUint16 version;
|
PRUint16 version;
|
||||||
rv = GetEncodingWithVersion(element, &version, getter_AddRefs(encoding));
|
rv = GetEncodingWithVersion(element, &version, getter_AddRefs(encoding));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIDOMElement > next;
|
nsCOMPtr<nsIDOMElement> next;
|
||||||
|
|
||||||
nsCOMPtr < nsISOAPHeaderBlock > header;
|
nsCOMPtr<nsISOAPHeaderBlock> header;
|
||||||
nsSOAPUtils::GetFirstChildElement(element, getter_AddRefs(next));
|
nsSOAPUtils::GetFirstChildElement(element, getter_AddRefs(next));
|
||||||
while (next) {
|
while (next) {
|
||||||
if (length == count) {
|
if (length == count) {
|
||||||
|
@ -659,12 +659,12 @@ NS_IMETHODIMP
|
||||||
*aParameters = nsnull;
|
*aParameters = nsnull;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
nsCOMPtr < nsIDOMElement > element;
|
nsCOMPtr<nsIDOMElement> element;
|
||||||
nsresult rv = GetBody(getter_AddRefs(element));
|
nsresult rv = GetBody(getter_AddRefs(element));
|
||||||
if (NS_FAILED(rv) || !element)
|
if (NS_FAILED(rv) || !element)
|
||||||
return rv;
|
return rv;
|
||||||
nsCOMPtr < nsIDOMElement > next;
|
nsCOMPtr<nsIDOMElement> next;
|
||||||
nsCOMPtr < nsISOAPParameter > param;
|
nsCOMPtr<nsISOAPParameter> param;
|
||||||
nsSOAPUtils::GetFirstChildElement(element, getter_AddRefs(next));
|
nsSOAPUtils::GetFirstChildElement(element, getter_AddRefs(next));
|
||||||
if (!aDocumentStyle) {
|
if (!aDocumentStyle) {
|
||||||
element = next;
|
element = next;
|
||||||
|
@ -672,7 +672,7 @@ NS_IMETHODIMP
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_MISSING_METHOD","Cannot decode rpc-style message due to missing method element.");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_MISSING_METHOD","Cannot decode rpc-style message due to missing method element.");
|
||||||
nsSOAPUtils::GetFirstChildElement(element, getter_AddRefs(next));
|
nsSOAPUtils::GetFirstChildElement(element, getter_AddRefs(next));
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding;
|
nsCOMPtr<nsISOAPEncoding> encoding;
|
||||||
PRUint16 version;
|
PRUint16 version;
|
||||||
rv = GetEncodingWithVersion(element, &version, getter_AddRefs(encoding));
|
rv = GetEncodingWithVersion(element, &version, getter_AddRefs(encoding));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
@ -734,7 +734,7 @@ NS_IMETHODIMP nsSOAPMessage::GetEncoding(nsISOAPEncoding * *aEncoding)
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
if (version != nsISOAPMessage::VERSION_UNKNOWN) {
|
if (version != nsISOAPMessage::VERSION_UNKNOWN) {
|
||||||
nsCOMPtr < nsISOAPEncoding > encoding =
|
nsCOMPtr<nsISOAPEncoding> encoding =
|
||||||
do_CreateInstance(NS_SOAPENCODING_CONTRACTID);
|
do_CreateInstance(NS_SOAPENCODING_CONTRACTID);
|
||||||
if (!encoding)
|
if (!encoding)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
|
@ -60,8 +60,8 @@ NS_DECL_NSISOAPMESSAGE protected:
|
||||||
nsresult GetEncodingWithVersion(nsIDOMElement * aFirst,
|
nsresult GetEncodingWithVersion(nsIDOMElement * aFirst,
|
||||||
PRUint16 * aVersion,
|
PRUint16 * aVersion,
|
||||||
nsISOAPEncoding ** aEncoding);
|
nsISOAPEncoding ** aEncoding);
|
||||||
nsCOMPtr < nsIDOMDocument > mMessage;
|
nsCOMPtr<nsIDOMDocument> mMessage;
|
||||||
nsCOMPtr < nsISOAPEncoding > mEncoding;
|
nsCOMPtr<nsISOAPEncoding> mEncoding;
|
||||||
nsString mActionURI;
|
nsString mActionURI;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsString mName;
|
nsString mName;
|
||||||
nsCOMPtr < nsIVariant > mValue;
|
nsCOMPtr<nsIVariant> mValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
class nsSOAPPropertyBagEnumerator:public nsISimpleEnumerator {
|
class nsSOAPPropertyBagEnumerator:public nsISimpleEnumerator {
|
||||||
|
@ -85,7 +85,7 @@ public:
|
||||||
virtual ~nsSOAPPropertyBagEnumerator();
|
virtual ~nsSOAPPropertyBagEnumerator();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsCOMPtr < nsSupportsArray > mProperties;
|
nsCOMPtr<nsSupportsArray> mProperties;
|
||||||
PRUint32 mCurrent;
|
PRUint32 mCurrent;
|
||||||
};
|
};
|
||||||
NS_IMPL_ISUPPORTS2_CI(nsSOAPPropertyBag, nsIPropertyBag, nsIXPCScriptable)
|
NS_IMPL_ISUPPORTS2_CI(nsSOAPPropertyBag, nsIPropertyBag, nsIXPCScriptable)
|
||||||
|
@ -139,7 +139,7 @@ NS_IMETHODIMP
|
||||||
JS_GetStringChars(str));
|
JS_GetStringChars(str));
|
||||||
nsDependentString namestr(name);
|
nsDependentString namestr(name);
|
||||||
nsStringKey nameKey(namestr);
|
nsStringKey nameKey(namestr);
|
||||||
nsCOMPtr < nsIVariant > value =
|
nsCOMPtr<nsIVariant> value =
|
||||||
dont_AddRef(NS_STATIC_CAST
|
dont_AddRef(NS_STATIC_CAST
|
||||||
(nsIVariant *, mProperties->Get(&nameKey)));
|
(nsIVariant *, mProperties->Get(&nameKey)));
|
||||||
if (!value)
|
if (!value)
|
||||||
|
|
|
@ -65,7 +65,7 @@ NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPResponse, nsISOAPMessage,
|
||||||
NS_IMETHODIMP nsSOAPResponse::GetFault(nsISOAPFault * *aFault)
|
NS_IMETHODIMP nsSOAPResponse::GetFault(nsISOAPFault * *aFault)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aFault);
|
NS_ENSURE_ARG_POINTER(aFault);
|
||||||
nsCOMPtr < nsIDOMElement > body;
|
nsCOMPtr<nsIDOMElement> body;
|
||||||
|
|
||||||
*aFault = nsnull;
|
*aFault = nsnull;
|
||||||
nsresult rc = GetBody(getter_AddRefs(body));
|
nsresult rc = GetBody(getter_AddRefs(body));
|
||||||
|
@ -77,13 +77,13 @@ NS_IMETHODIMP nsSOAPResponse::GetFault(nsISOAPFault * *aFault)
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
if (rc != nsSOAPMessage::VERSION_UNKNOWN) {
|
if (rc != nsSOAPMessage::VERSION_UNKNOWN) {
|
||||||
nsCOMPtr < nsIDOMElement > fault;
|
nsCOMPtr<nsIDOMElement> fault;
|
||||||
nsSOAPUtils::GetSpecificChildElement(nsnull, body,
|
nsSOAPUtils::GetSpecificChildElement(nsnull, body,
|
||||||
*gSOAPStrings->kSOAPEnvURI[version],
|
*gSOAPStrings->kSOAPEnvURI[version],
|
||||||
gSOAPStrings->kFaultTagName,
|
gSOAPStrings->kFaultTagName,
|
||||||
getter_AddRefs(fault));
|
getter_AddRefs(fault));
|
||||||
if (fault) {
|
if (fault) {
|
||||||
nsCOMPtr < nsISOAPFault > f =
|
nsCOMPtr<nsISOAPFault> f =
|
||||||
do_CreateInstance(NS_SOAPFAULT_CONTRACTID);
|
do_CreateInstance(NS_SOAPFAULT_CONTRACTID);
|
||||||
if (!f)
|
if (!f)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
|
@ -122,7 +122,7 @@ void nsSOAPUtils::GetSpecificChildElement(nsISOAPEncoding * aEncoding,
|
||||||
const nsAString & aType,
|
const nsAString & aType,
|
||||||
nsIDOMElement * *aElement)
|
nsIDOMElement * *aElement)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMElement > sibling;
|
nsCOMPtr<nsIDOMElement> sibling;
|
||||||
|
|
||||||
*aElement = nsnull;
|
*aElement = nsnull;
|
||||||
GetFirstChildElement(aParent, getter_AddRefs(sibling));
|
GetFirstChildElement(aParent, getter_AddRefs(sibling));
|
||||||
|
@ -137,7 +137,7 @@ void nsSOAPUtils::GetSpecificSiblingElement(nsISOAPEncoding * aEncoding,
|
||||||
const nsAString & aType,
|
const nsAString & aType,
|
||||||
nsIDOMElement * *aElement)
|
nsIDOMElement * *aElement)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMElement > sibling;
|
nsCOMPtr<nsIDOMElement> sibling;
|
||||||
|
|
||||||
*aElement = nsnull;
|
*aElement = nsnull;
|
||||||
sibling = aSibling;
|
sibling = aSibling;
|
||||||
|
@ -159,7 +159,7 @@ void nsSOAPUtils::GetSpecificSiblingElement(nsISOAPEncoding * aEncoding,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMElement > temp = sibling;
|
nsCOMPtr<nsIDOMElement> temp = sibling;
|
||||||
GetNextSiblingElement(temp, getter_AddRefs(sibling));
|
GetNextSiblingElement(temp, getter_AddRefs(sibling));
|
||||||
} while (sibling);
|
} while (sibling);
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ void nsSOAPUtils::GetSpecificSiblingElement(nsISOAPEncoding * aEncoding,
|
||||||
void nsSOAPUtils::GetFirstChildElement(nsIDOMElement * aParent,
|
void nsSOAPUtils::GetFirstChildElement(nsIDOMElement * aParent,
|
||||||
nsIDOMElement ** aElement)
|
nsIDOMElement ** aElement)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMNode > child;
|
nsCOMPtr<nsIDOMNode> child;
|
||||||
|
|
||||||
*aElement = nsnull;
|
*aElement = nsnull;
|
||||||
aParent->GetFirstChild(getter_AddRefs(child));
|
aParent->GetFirstChild(getter_AddRefs(child));
|
||||||
|
@ -178,7 +178,7 @@ void nsSOAPUtils::GetFirstChildElement(nsIDOMElement * aParent,
|
||||||
child->QueryInterface(NS_GET_IID(nsIDOMElement), (void **) aElement);
|
child->QueryInterface(NS_GET_IID(nsIDOMElement), (void **) aElement);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMNode > temp = child;
|
nsCOMPtr<nsIDOMNode> temp = child;
|
||||||
GetNextSibling(temp, getter_AddRefs(child));
|
GetNextSibling(temp, getter_AddRefs(child));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ void nsSOAPUtils::GetFirstChildElement(nsIDOMElement * aParent,
|
||||||
void nsSOAPUtils::GetNextSiblingElement(nsIDOMElement * aStart,
|
void nsSOAPUtils::GetNextSiblingElement(nsIDOMElement * aStart,
|
||||||
nsIDOMElement ** aElement)
|
nsIDOMElement ** aElement)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMNode > sibling;
|
nsCOMPtr<nsIDOMNode> sibling;
|
||||||
|
|
||||||
*aElement = nsnull;
|
*aElement = nsnull;
|
||||||
GetNextSibling(aStart, getter_AddRefs(sibling));
|
GetNextSibling(aStart, getter_AddRefs(sibling));
|
||||||
|
@ -198,7 +198,7 @@ void nsSOAPUtils::GetNextSiblingElement(nsIDOMElement * aStart,
|
||||||
(void **) aElement);
|
(void **) aElement);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMNode > temp = sibling;
|
nsCOMPtr<nsIDOMNode> temp = sibling;
|
||||||
GetNextSibling(temp, getter_AddRefs(sibling));
|
GetNextSibling(temp, getter_AddRefs(sibling));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ nsresult
|
||||||
nsAString & aText)
|
nsAString & aText)
|
||||||
{
|
{
|
||||||
aText.Truncate();
|
aText.Truncate();
|
||||||
nsCOMPtr < nsIDOMNode > child;
|
nsCOMPtr<nsIDOMNode> child;
|
||||||
nsAutoString rtext;
|
nsAutoString rtext;
|
||||||
aElement->GetFirstChild(getter_AddRefs(child));
|
aElement->GetFirstChild(getter_AddRefs(child));
|
||||||
while (child) {
|
while (child) {
|
||||||
|
@ -216,14 +216,14 @@ nsresult
|
||||||
child->GetNodeType(&type);
|
child->GetNodeType(&type);
|
||||||
if (nsIDOMNode::TEXT_NODE == type
|
if (nsIDOMNode::TEXT_NODE == type
|
||||||
|| nsIDOMNode::CDATA_SECTION_NODE == type) {
|
|| nsIDOMNode::CDATA_SECTION_NODE == type) {
|
||||||
nsCOMPtr < nsIDOMText > text = do_QueryInterface(child);
|
nsCOMPtr<nsIDOMText> text = do_QueryInterface(child);
|
||||||
nsAutoString data;
|
nsAutoString data;
|
||||||
text->GetData(data);
|
text->GetData(data);
|
||||||
rtext.Append(data);
|
rtext.Append(data);
|
||||||
} else if (nsIDOMNode::ELEMENT_NODE == type) {
|
} else if (nsIDOMNode::ELEMENT_NODE == type) {
|
||||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_UNEXPECTED_ELEMENT", "Unable to retrieve simple content because a child element was present.");
|
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_UNEXPECTED_ELEMENT", "Unable to retrieve simple content because a child element was present.");
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMNode > temp = child;
|
nsCOMPtr<nsIDOMNode> temp = child;
|
||||||
GetNextSibling(temp, getter_AddRefs(child));
|
GetNextSibling(temp, getter_AddRefs(child));
|
||||||
}
|
}
|
||||||
aText.Assign(rtext);
|
aText.Assign(rtext);
|
||||||
|
@ -232,7 +232,7 @@ nsresult
|
||||||
|
|
||||||
PRBool nsSOAPUtils::HasChildElements(nsIDOMElement * aElement)
|
PRBool nsSOAPUtils::HasChildElements(nsIDOMElement * aElement)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMNode > child;
|
nsCOMPtr<nsIDOMNode> child;
|
||||||
|
|
||||||
aElement->GetFirstChild(getter_AddRefs(child));
|
aElement->GetFirstChild(getter_AddRefs(child));
|
||||||
while (child) {
|
while (child) {
|
||||||
|
@ -241,7 +241,7 @@ PRBool nsSOAPUtils::HasChildElements(nsIDOMElement * aElement)
|
||||||
if (nsIDOMNode::ELEMENT_NODE == type) {
|
if (nsIDOMNode::ELEMENT_NODE == type) {
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMNode > temp = child;
|
nsCOMPtr<nsIDOMNode> temp = child;
|
||||||
GetNextSibling(temp, getter_AddRefs(child));
|
GetNextSibling(temp, getter_AddRefs(child));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,8 +251,8 @@ PRBool nsSOAPUtils::HasChildElements(nsIDOMElement * aElement)
|
||||||
void nsSOAPUtils::GetNextSibling(nsIDOMNode * aSibling,
|
void nsSOAPUtils::GetNextSibling(nsIDOMNode * aSibling,
|
||||||
nsIDOMNode ** aNext)
|
nsIDOMNode ** aNext)
|
||||||
{
|
{
|
||||||
nsCOMPtr < nsIDOMNode > last;
|
nsCOMPtr<nsIDOMNode> last;
|
||||||
nsCOMPtr < nsIDOMNode > current;
|
nsCOMPtr<nsIDOMNode> current;
|
||||||
PRUint16 type;
|
PRUint16 type;
|
||||||
|
|
||||||
*aNext = nsnull;
|
*aNext = nsnull;
|
||||||
|
@ -303,9 +303,9 @@ nsresult
|
||||||
else {
|
else {
|
||||||
|
|
||||||
nsresult rc;
|
nsresult rc;
|
||||||
nsCOMPtr < nsIDOMNode > current = aScope;
|
nsCOMPtr<nsIDOMNode> current = aScope;
|
||||||
nsCOMPtr < nsIDOMNamedNodeMap > attrs;
|
nsCOMPtr<nsIDOMNamedNodeMap> attrs;
|
||||||
nsCOMPtr < nsIDOMNode > temp;
|
nsCOMPtr<nsIDOMNode> temp;
|
||||||
nsAutoString value;
|
nsAutoString value;
|
||||||
while (current) {
|
while (current) {
|
||||||
rc = current->GetAttributes(getter_AddRefs(attrs));
|
rc = current->GetAttributes(getter_AddRefs(attrs));
|
||||||
|
@ -374,9 +374,9 @@ nsresult
|
||||||
aPrefix.Assign(gSOAPStrings->kXMLPrefix);
|
aPrefix.Assign(gSOAPStrings->kXMLPrefix);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
nsCOMPtr < nsIDOMNode > current = aScope;
|
nsCOMPtr<nsIDOMNode> current = aScope;
|
||||||
nsCOMPtr < nsIDOMNamedNodeMap > attrs;
|
nsCOMPtr<nsIDOMNamedNodeMap> attrs;
|
||||||
nsCOMPtr < nsIDOMNode > temp;
|
nsCOMPtr<nsIDOMNode> temp;
|
||||||
nsAutoString tstr;
|
nsAutoString tstr;
|
||||||
nsresult rc;
|
nsresult rc;
|
||||||
PRUint32 maxns = 0; // Keep track of max generated NS
|
PRUint32 maxns = 0; // Keep track of max generated NS
|
||||||
|
@ -403,9 +403,9 @@ nsresult
|
||||||
rc = temp->GetLocalName(prefix);
|
rc = temp->GetLocalName(prefix);
|
||||||
if (NS_FAILED(rc))
|
if (NS_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
nsCOMPtr < nsIDOMNode > check = aScope;
|
nsCOMPtr<nsIDOMNode> check = aScope;
|
||||||
PRBool hasDecl;
|
PRBool hasDecl;
|
||||||
nsCOMPtr < nsIDOMElement > echeck;
|
nsCOMPtr<nsIDOMElement> echeck;
|
||||||
while (check != current) { // Make sure prefix is not overridden
|
while (check != current) { // Make sure prefix is not overridden
|
||||||
echeck = do_QueryInterface(check);
|
echeck = do_QueryInterface(check);
|
||||||
if (echeck) {
|
if (echeck) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче