rc = aEncoding->GetEncoder(schemaType, schemaURI, getter_AddRefs(encoder));
rc = aEncoding->GetEncoder(schemaURI, schemaType, getter_AddRefs(encoder));
NS_IMETHODIMP nsDefaultEncoder::Encode(nsISOAPEncoding* aEncoding,		                          nsIVariant* aSource,		                          const nsAReadableString & aNamespaceURI, 		                          const nsAReadableString & aName, 					  nsISchemaType *aSchemaType,					  nsISOAPAttachments* aAttachments,					  nsIDOMElement* aDestination,					  nsIDOMElement* * aReturnValue){  nsCOMPtr<nsISOAPEncoder> encoder;  if (aSchemaType) {    nsCOMPtr<nsISchemaType> lookupType = aSchemaType;    do {      nsAutoString schemaType;      nsAutoString schemaURI;      nsresult rc = lookupType->GetName(schemaType);      if (NS_FAILED(rc)) return rc;      rc = lookupType->GetTargetNamespace(schemaURI);      if (NS_FAILED(rc)) return rc;      rc = aEncoding->GetEncoder(schemaType, schemaURI, getter_AddRefs(encoder));      if (NS_FAILED(rc)) return rc;      if (encoder) break;      PRUint16 typevalue;      rc = lookupType->GetSchemaType(&typevalue);      if (NS_FAILED(rc)) return rc;      if (typevalue == nsISchemaType::SCHEMA_TYPE_COMPLEX) {        nsCOMPtr<nsISchemaComplexType> oldtype = do_QueryInterface(lookupType);        oldtype->GetBaseType(getter_AddRefs(lookupType));      }      else {	break;      }    } while(lookupType);  }  if (!encoder) {    PRUint16 typevalue;    if (aSchemaType) {      nsresult rc = aSchemaType->GetSchemaType(&typevalue);      if (NS_FAILED(rc)) return rc;    }    else {      typevalue = nsISchemaType::SCHEMA_TYPE_COMPLEX;    }    nsAutoString schemaType;    if (typevalue == nsISchemaType::SCHEMA_TYPE_COMPLEX) {      schemaType.Assign(kAnyTypeSchemaType);    }    else {      schemaType.Assign(kAnySimpleTypeSchemaType);    }    nsresult rc = aEncoding->GetEncoder(schemaType, kSchemaDatatypesNamespaceURI, getter_AddRefs(encoder));    if (NS_FAILED(rc)) return rc;  }  if (encoder) {    return encoder->Encode(aEncoding, aSource, aNamespaceURI, aName, aSchemaType, aAttachments, aDestination, aReturnValue);  }  return NS_ERROR_NOT_IMPLEMENTED;}