Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsSOAPResponse.cpp File Reference
#include "nsSOAPResponse.h"
#include "nsSOAPUtils.h"
#include "nsSOAPFault.h"
#include "nsISOAPFault.h"
#include "nsCOMPtr.h"
#include "nsISOAPParameter.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"

Go to the source code of this file.

Functions

 NS_IMPL_CI_INTERFACE_GETTER2 (nsSOAPResponse, nsISOAPMessage, nsISOAPResponse) NS_IMETHODIMP nsSOAPResponse

Function Documentation

Definition at line 56 of file nsSOAPResponse.cpp.

{
  NS_ENSURE_ARG_POINTER(aFault);
  nsCOMPtr<nsIDOMElement> body;

  *aFault = nsnull;
  nsresult rc = GetBody(getter_AddRefs(body));
  if (NS_FAILED(rc))
    return rc;
  if (body) {
    PRUint16 version;
    rc = GetVersion(&version);
    if (NS_FAILED(rc))
      return rc;
    if (rc != nsSOAPMessage::VERSION_UNKNOWN) {
      nsCOMPtr<nsIDOMElement> fault;
      nsSOAPUtils::GetSpecificChildElement(nsnull, body,
                                           *gSOAPStrings->kSOAPEnvURI[version],
                                           gSOAPStrings->kFaultTagName,
                                           getter_AddRefs(fault));
      if (fault) {
        nsCOMPtr<nsISOAPFault> f =
            do_CreateInstance(NS_SOAPFAULT_CONTRACTID);
        if (!f)
          return NS_ERROR_OUT_OF_MEMORY;
        rc = f->SetElement(fault);
        if (NS_FAILED(rc))
          return rc;
        *aFault = f;
        NS_ADDREF(*aFault);
      }
    }
  } else {
    *aFault = nsnull;
  }
  return NS_OK;
}

Here is the call graph for this function: