SOAP is not part of default build.
This commit is contained in:
rayw%netscape.com 2002-02-15 11:02:43 +00:00
Родитель e3f8c4ff5c
Коммит 676939544c
25 изменённых файлов: 409 добавлений и 409 удалений

Просмотреть файл

@ -35,32 +35,32 @@
#
# ***** END LICENSE BLOCK ***** *
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xmlextras
LIBRARY_NAME = xmlextrassoap_s
REQUIRES = xpcom string caps dom js widget xpconnect necko schema
MODULE = xmlextras
LIBRARY_NAME = xmlextrassoap_s
REQUIRES = xpcom string caps dom js widget xpconnect necko schema
CPPSRCS = \
nsDefaultSOAPEncoder.cpp\
nsHTTPSOAPTransport.cpp \
nsSOAPBlock.cpp \
nsSOAPCall.cpp \
nsSOAPEncoding.cpp \
nsSOAPException.cpp \
nsSOAPFault.cpp \
nsSOAPHeaderBlock.cpp \
nsSOAPMessage.cpp \
nsSOAPParameter.cpp \
nsSOAPPropertyBag.cpp \
nsSOAPResponse.cpp \
nsSOAPUtils.cpp \
$(NULL)
CPPSRCS = \
nsDefaultSOAPEncoder.cpp\
nsHTTPSOAPTransport.cpp \
nsSOAPBlock.cpp \
nsSOAPCall.cpp \
nsSOAPEncoding.cpp \
nsSOAPException.cpp \
nsSOAPFault.cpp \
nsSOAPHeaderBlock.cpp \
nsSOAPMessage.cpp \
nsSOAPParameter.cpp \
nsSOAPPropertyBag.cpp \
nsSOAPResponse.cpp \
nsSOAPUtils.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
@ -68,8 +68,8 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
DEFINES += -D_IMPL_NS_HTML
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DWIN32_LEAN_AND_MEAN
DEFINES += -DWIN32_LEAN_AND_MEAN
endif

Просмотреть файл

@ -69,14 +69,14 @@ NS_IMPL_ISUPPORTS1_CI(nsHTTPSOAPTransport, nsISOAPTransport)
#ifdef DEBUG
#define DEBUG_DUMP_DOCUMENT(message,doc) \
{ \
nsresult rcc;\
nsXPIDLString serial;\
nsCOMPtr<nsIDOMSerializer> serializer(do_CreateInstance(NS_XMLSERIALIZER_CONTRACTID, &rcc));\
if (NS_FAILED(rcc)) return rcc; \
rcc = serializer->SerializeToString(doc, getter_Copies(serial));\
if (NS_FAILED(rcc)) return rcc;\
nsAutoString result(serial);\
printf(message ":\n%s\n", NS_ConvertUCS2toUTF8(result).get());\
nsresult rcc;\
nsXPIDLString serial;\
nsCOMPtr<nsIDOMSerializer> serializer(do_CreateInstance(NS_XMLSERIALIZER_CONTRACTID, &rcc));\
if (NS_FAILED(rcc)) return rcc; \
rcc = serializer->SerializeToString(doc, getter_Copies(serial));\
if (NS_FAILED(rcc)) return rcc;\
nsAutoString result(serial);\
printf(message ":\n%s\n", NS_ConvertUCS2toUTF8(result).get());\
}
// Availble from the debugger...
nsresult DebugPrintDOM(nsIDOMNode * node)
@ -281,7 +281,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
return rv;
rv = request->OpenRequest("POST", NS_ConvertUCS2toUTF8(uri).get(),
PR_FALSE, nsnull, nsnull);
PR_FALSE, nsnull, nsnull);
if (NS_FAILED(rv))
return rv;
@ -291,7 +291,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
return rv;
if (!AStringIsNull(action)) {
rv = request->SetRequestHeader("SOAPAction",
NS_ConvertUCS2toUTF8(action).get());
NS_ConvertUCS2toUTF8(action).get());
if (NS_FAILED(rv))
return rv;
}
@ -302,7 +302,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
return rv;
rv = variant->SetAsInterface(NS_GET_IID(nsIDOMDocument),
messageDocument);
messageDocument);
if (NS_FAILED(rv))
return rv;
@ -336,7 +336,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
}
NS_IMPL_ISUPPORTS2_CI(nsHTTPSOAPTransportCompletion, nsIDOMEventListener,
nsISOAPCallCompletion)
nsISOAPCallCompletion)
nsHTTPSOAPTransportCompletion::nsHTTPSOAPTransportCompletion()
{
NS_INIT_ISUPPORTS();
@ -363,7 +363,7 @@ NS_IMETHODIMP nsHTTPSOAPTransportCompletion::GetCall(nsISOAPCall * *aCall)
/* readonly attribute nsISOAPResponse response; */
NS_IMETHODIMP
nsHTTPSOAPTransportCompletion::GetResponse(nsISOAPResponse *
*aResponse)
*aResponse)
{
*aResponse =
mRequest ? (nsCOMPtr < nsISOAPResponse >) nsnull : mResponse;
@ -374,7 +374,7 @@ NS_IMETHODIMP
/* readonly attribute nsISOAPResponseListener listener; */
NS_IMETHODIMP
nsHTTPSOAPTransportCompletion::GetListener(nsISOAPResponseListener *
*aListener)
*aListener)
{
*aListener = mListener;
NS_IF_ADDREF(*aListener);
@ -408,7 +408,7 @@ NS_IMETHODIMP
{
// PRUint32 status;
nsresult rv = NS_OK;
if (mRequest) { // Avoid if it has been aborted.
if (mRequest) { // Avoid if it has been aborted.
#if 0
rv = mRequest->GetStatus(&status);
if (NS_SUCCEEDED(rv) && (status < 200 || status >= 300))
@ -418,16 +418,16 @@ NS_IMETHODIMP
nsCOMPtr < nsIDOMDocument > document;
rv = mRequest->GetResponseXML(getter_AddRefs(document));
if (NS_SUCCEEDED(rv) && document) {
rv = mResponse->SetMessage(document);
rv = mResponse->SetMessage(document);
DEBUG_DUMP_DOCUMENT("Asynchronous Response", document)} else {
mResponse = nsnull;
mResponse = nsnull;
}
} else {
mResponse = nsnull;
}
nsCOMPtr < nsISOAPCallCompletion > kungFuDeathGrip = this;
mRequest = nsnull; // Break cycle of references by releas.
PRBool c; // In other transports, this may signal to stop returning if multiple returns
mRequest = nsnull; // Break cycle of references by releas.
PRBool c; // In other transports, this may signal to stop returning if multiple returns
mListener->HandleResponse(mResponse, mCall, rv, PR_TRUE, &c);
}
return NS_OK;
@ -436,9 +436,9 @@ NS_IMETHODIMP
/* void asyncCall (in nsISOAPCall aCall, in nsISOAPResponseListener aListener, in nsISOAPResponse aResponse); */
NS_IMETHODIMP
nsHTTPSOAPTransport::AsyncCall(nsISOAPCall * aCall,
nsISOAPResponseListener * aListener,
nsISOAPResponse * aResponse,
nsISOAPCallCompletion ** aCompletion)
nsISOAPResponseListener * aListener,
nsISOAPResponse * aResponse,
nsISOAPCallCompletion ** aCompletion)
{
NS_ENSURE_ARG(aCall);
@ -470,7 +470,7 @@ NS_IMETHODIMP
DEBUG_DUMP_DOCUMENT("Asynchronous Request", messageDocument)
rv = request->OpenRequest("POST", NS_ConvertUCS2toUTF8(uri).get(),
PR_TRUE, nsnull, nsnull);
PR_TRUE, nsnull, nsnull);
if (NS_FAILED(rv))
return rv;
@ -480,7 +480,7 @@ NS_IMETHODIMP
return rv;
if (!AStringIsNull(action)) {
rv = request->SetRequestHeader("SOAPAction",
NS_ConvertUCS2toUTF8(action).get());
NS_ConvertUCS2toUTF8(action).get());
if (NS_FAILED(rv))
return rv;
}
@ -491,7 +491,7 @@ NS_IMETHODIMP
return rv;
rv = variant->SetAsInterface(NS_GET_IID(nsIDOMDocument),
messageDocument);
messageDocument);
if (NS_FAILED(rv))
return rv;
@ -499,19 +499,19 @@ NS_IMETHODIMP
if (aListener) {
completion =
new nsHTTPSOAPTransportCompletion(aCall, aResponse, request,
aListener);
new nsHTTPSOAPTransportCompletion(aCall, aResponse, request,
aListener);
if (!completion)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr < nsIDOMEventListener > listener =
do_QueryInterface(completion);
do_QueryInterface(completion);
rv = eventTarget->AddEventListener(NS_LITERAL_STRING("load"), listener,
PR_FALSE);
PR_FALSE);
if (NS_FAILED(rv))
return rv;
rv = eventTarget->AddEventListener(NS_LITERAL_STRING("error"),
listener, PR_FALSE);
listener, PR_FALSE);
if (NS_FAILED(rv))
return rv;
}
@ -528,7 +528,7 @@ NS_IMETHODIMP
/* void addListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
NS_IMETHODIMP
nsHTTPSOAPTransport::AddListener(nsISOAPTransportListener * aListener,
PRBool aCapture)
PRBool aCapture)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -536,7 +536,7 @@ NS_IMETHODIMP
/* void removeListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
NS_IMETHODIMP
nsHTTPSOAPTransport::RemoveListener(nsISOAPTransportListener *
aListener, PRBool aCapture)
aListener, PRBool aCapture)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -55,7 +55,7 @@ nsSOAPBlock::~nsSOAPBlock()
NS_IMPL_ISUPPORTS2(nsSOAPBlock, nsISOAPBlock, nsIJSNativeInitializer)
NS_IMETHODIMP nsSOAPBlock::Init(nsISOAPAttachments * aAttachments,
PRUint16 aVersion)
PRUint16 aVersion)
{
if (aVersion == nsISOAPMessage::VERSION_1_1
|| aVersion == nsISOAPMessage::VERSION_1_2) {
@ -167,15 +167,15 @@ NS_IMETHODIMP nsSOAPBlock::SetElement(nsIDOMElement * aElement)
NS_IMETHODIMP nsSOAPBlock::GetValue(nsIVariant * *aValue)
{
NS_ENSURE_ARG_POINTER(aValue);
if (mElement) { // Check for auto-computation
if (mElement) { // Check for auto-computation
if (mComputeValue) {
mComputeValue = PR_FALSE;
if (mEncoding) {
mStatus =
mEncoding->Decode(mElement, mSchemaType, mAttachments,
getter_AddRefs(mValue));
mStatus =
mEncoding->Decode(mElement, mSchemaType, mAttachments,
getter_AddRefs(mValue));
} else {
mStatus = NS_ERROR_NOT_INITIALIZED;
mStatus = NS_ERROR_NOT_INITIALIZED;
}
}
}
@ -195,7 +195,7 @@ NS_IMETHODIMP nsSOAPBlock::SetValue(nsIVariant * aValue)
NS_IMETHODIMP
nsSOAPBlock::Initialize(JSContext * cx, JSObject * obj,
PRUint32 argc, jsval * argv)
PRUint32 argc, jsval * argv)
{
// Get the arguments.
@ -207,11 +207,11 @@ NS_IMETHODIMP
nsCOMPtr < nsISupports > encoding;
if (!JS_ConvertArguments(cx, argc, argv, "/%iv %is %is %ip %ip",
getter_AddRefs(value),
NS_STATIC_CAST(nsAString *, &name),
NS_STATIC_CAST(nsAString *, &namespaceURI),
getter_AddRefs(schemaType),
getter_AddRefs(encoding)))
getter_AddRefs(value),
NS_STATIC_CAST(nsAString *, &name),
NS_STATIC_CAST(nsAString *, &namespaceURI),
getter_AddRefs(schemaType),
getter_AddRefs(encoding)))
return NS_ERROR_ILLEGAL_VALUE;
nsresult rc = SetValue(value);

Просмотреть файл

@ -150,7 +150,7 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
return rv;
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))
return rv;
if (!document) {
@ -159,13 +159,13 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
}
return response->QueryInterface(NS_GET_IID(nsISOAPResponse),
(void **) _retval);
(void **) _retval);
}
/* void asyncInvoke (in nsISOAPResponseListener listener); */
NS_IMETHODIMP
nsSOAPCall::AsyncInvoke(nsISOAPResponseListener * listener,
nsISOAPCallCompletion ** aCompletion)
nsISOAPCallCompletion ** aCompletion)
{
nsresult rv;
nsCOMPtr < nsISOAPTransport > transport;

Просмотреть файл

@ -53,7 +53,7 @@
// First comes the registry which shares between associated encodings but is never seen by xpconnect.
NS_IMPL_ISUPPORTS1(nsSOAPEncodingRegistry, nsISOAPEncoding) nsSOAPEncodingRegistry::nsSOAPEncodingRegistry(nsISOAPEncoding * aEncoding):mEncodings(new
nsSupportsHashtable)
nsSupportsHashtable)
{
NS_INIT_ISUPPORTS();
@ -73,7 +73,7 @@ nsSOAPEncodingRegistry::~nsSOAPEncodingRegistry()
nsresult
nsSOAPEncodingRegistry::
GetAssociatedEncoding(const nsAString & aStyleURI, PRBool aCreateIf,
nsISOAPEncoding * *aEncoding)
nsISOAPEncoding * *aEncoding)
{
NS_SOAP_ENSURE_ARG_STRING(aStyleURI);
NS_ENSURE_ARG_POINTER(aEncoding);
@ -97,7 +97,7 @@ GetAssociatedEncoding(const nsAString & aStyleURI, PRBool aCreateIf,
nsresult
nsSOAPEncodingRegistry::SetSchemaCollection(nsISchemaCollection *
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG(aSchemaCollection);
mSchemaCollection = aSchemaCollection;
@ -106,13 +106,13 @@ nsresult
nsresult
nsSOAPEncodingRegistry::GetSchemaCollection(nsISchemaCollection **
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG_POINTER(aSchemaCollection);
if (!mSchemaCollection) {
nsresult rv;
nsCOMPtr < nsISchemaLoader > loader =
do_CreateInstance(NS_SCHEMALOADER_CONTRACTID, &rv);
do_CreateInstance(NS_SCHEMALOADER_CONTRACTID, &rv);
if (NS_FAILED(rv))
return rv;
mSchemaCollection = do_QueryInterface(loader);
@ -133,7 +133,7 @@ NS_IMETHODIMP nsSOAPEncodingRegistry::GetStyleURI(nsAString & aStyleURI)
/* nsISOAPEncoder setEncoder (in AString aKey, in nsISOAPEncoder aEncoder); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetEncoder(const nsAString & aKey,
nsISOAPEncoder * aEncoder)
nsISOAPEncoder * aEncoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -141,7 +141,7 @@ NS_IMETHODIMP
/* nsISOAPEncoder getEncoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetEncoder(const nsAString & aKey,
nsISOAPEncoder ** _retval)
nsISOAPEncoder ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -149,7 +149,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder setDecoder (in AString aKey, in nsISOAPDecoder aDecoder); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetDecoder(const nsAString & aKey,
nsISOAPDecoder * aDecoder)
nsISOAPDecoder * aDecoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -157,7 +157,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder getDecoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetDecoder(const nsAString & aKey,
nsISOAPDecoder ** _retval)
nsISOAPDecoder ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -165,14 +165,14 @@ NS_IMETHODIMP
/* attribute nsISOAPEncoder defaultEncoder; */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetDefaultEncoder(nsISOAPEncoder *
*aDefaultEncoder)
*aDefaultEncoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetDefaultEncoder(nsISOAPEncoder *
aDefaultEncoder)
aDefaultEncoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -180,14 +180,14 @@ NS_IMETHODIMP
/* attribute nsISOAPDecoder defaultDecoder; */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetDefaultDecoder(nsISOAPDecoder *
*aDefaultDecoder)
*aDefaultDecoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetDefaultDecoder(nsISOAPDecoder *
aDefaultDecoder)
aDefaultDecoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -195,12 +195,12 @@ NS_IMETHODIMP
/* nsIDOMElement encode (in nsIVariant aSource, in AString aNamespaceURI, in AString aName, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments, in nsIDOMElement aDestination); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::Encode(nsIVariant * aSource,
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -208,9 +208,9 @@ NS_IMETHODIMP
/* nsIVariant decode (in nsIDOMElement aSource, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::Decode(nsIDOMElement * aSource,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -277,7 +277,7 @@ nsSOAPEncoding::~nsSOAPEncoding()
nsresult
nsSOAPEncoding::SetSchemaCollection(nsISchemaCollection *
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG(aSchemaCollection);
return mRegistry->SetSchemaCollection(aSchemaCollection);
@ -285,7 +285,7 @@ nsresult
nsresult
nsSOAPEncoding::GetSchemaCollection(nsISchemaCollection **
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG_POINTER(aSchemaCollection);
return mRegistry->GetSchemaCollection(aSchemaCollection);
@ -302,8 +302,8 @@ NS_IMETHODIMP nsSOAPEncoding::GetStyleURI(nsAString & aStyleURI)
/* nsISOAPEncoding getAssociatedEncoding (in AString aStyleURI, in boolean aCreateIf); */
NS_IMETHODIMP
nsSOAPEncoding::GetAssociatedEncoding(const nsAString & aStyleURI,
PRBool aCreateIf,
nsISOAPEncoding ** _retval)
PRBool aCreateIf,
nsISOAPEncoding ** _retval)
{
NS_SOAP_ENSURE_ARG_STRING(aStyleURI);
NS_ENSURE_ARG_POINTER(_retval);
@ -313,7 +313,7 @@ NS_IMETHODIMP
/* nsISOAPEncoder setEncoder (in AString aKey, in nsISOAPEncoder aEncoder); */
NS_IMETHODIMP
nsSOAPEncoding::SetEncoder(const nsAString & aKey,
nsISOAPEncoder * aEncoder)
nsISOAPEncoder * aEncoder)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG(aEncoder);
@ -329,7 +329,7 @@ NS_IMETHODIMP
/* nsISOAPEncoder getEncoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncoding::GetEncoder(const nsAString & aKey,
nsISOAPEncoder ** _retval)
nsISOAPEncoder ** _retval)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG_POINTER(_retval);
@ -344,7 +344,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder setDecoder (in AString aKey, in nsISOAPDecoder aDecoder); */
NS_IMETHODIMP
nsSOAPEncoding::SetDecoder(const nsAString & aKey,
nsISOAPDecoder * aDecoder)
nsISOAPDecoder * aDecoder)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG(aDecoder);
@ -360,7 +360,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder getDecoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncoding::GetDecoder(const nsAString & aKey,
nsISOAPDecoder ** _retval)
nsISOAPDecoder ** _retval)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG_POINTER(_retval);
@ -375,12 +375,12 @@ NS_IMETHODIMP
/* nsIDOMElement encode (in nsIVariant aSource, in AString aNamespaceURI, in AString aName, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments, in nsIDOMElement aDestination); */
NS_IMETHODIMP
nsSOAPEncoding::Encode(nsIVariant * aSource,
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
{
NS_ENSURE_ARG(aSource);
NS_ENSURE_ARG_POINTER(_retval);
@ -391,8 +391,8 @@ NS_IMETHODIMP
return rv;
if (encoder) {
return encoder->Encode(this, aSource, aNamespaceURI, aName,
aSchemaType, aAttachments, aDestination,
_retval);
aSchemaType, aAttachments, aDestination,
_retval);
}
*_retval = nsnull;
return NS_ERROR_NOT_IMPLEMENTED;
@ -401,9 +401,9 @@ NS_IMETHODIMP
/* nsIVariant decode (in nsIDOMElement aSource, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments); */
NS_IMETHODIMP
nsSOAPEncoding::Decode(nsIDOMElement * aSource,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
{
NS_ENSURE_ARG(aSource);
NS_ENSURE_ARG_POINTER(_retval);
@ -413,7 +413,7 @@ NS_IMETHODIMP
return rv;
if (decoder) {
return decoder->Decode(this, aSource, aSchemaType, aAttachments,
_retval);
_retval);
}
*_retval = nsnull;
return NS_ERROR_NOT_IMPLEMENTED;

Просмотреть файл

@ -215,7 +215,7 @@ nsresult nsSOAPException::AddException(nsresult aStatus, const nsAString & aName
xs->GetCurrentException(getter_AddRefs(old));
nsCOMPtr<nsIException> exception = new nsSOAPException(aStatus,
aName.IsEmpty() ? NS_LITERAL_STRING("SOAP_FAILURE") : aName,
aMessage.IsEmpty() ? NS_LITERAL_STRING("No description") : aMessage, old);
aMessage.IsEmpty() ? NS_LITERAL_STRING("No description") : aMessage, old);
if (exception) {
xm->SetCurrentException(exception);
}

Просмотреть файл

@ -67,14 +67,14 @@ NS_IMETHODIMP nsSOAPFault::SetElement(nsIDOMElement * aElement)
return rc;
if (name.Equals(nsSOAPUtils::kFaultTagName)) {
if (namespaceURI.
Equals(*nsSOAPUtils::kSOAPEnvURI[nsISOAPMessage::VERSION_1_2])) {
mVersion = nsISOAPMessage::VERSION_1_2;
Equals(*nsSOAPUtils::kSOAPEnvURI[nsISOAPMessage::VERSION_1_2])) {
mVersion = nsISOAPMessage::VERSION_1_2;
} else if (namespaceURI.
Equals(*nsSOAPUtils::
kSOAPEnvURI[nsISOAPMessage::VERSION_1_1])) {
mVersion = nsISOAPMessage::VERSION_1_1;
Equals(*nsSOAPUtils::
kSOAPEnvURI[nsISOAPMessage::VERSION_1_1])) {
mVersion = nsISOAPMessage::VERSION_1_1;
} else {
return NS_ERROR_ILLEGAL_VALUE;
return NS_ERROR_ILLEGAL_VALUE;
}
} else {
return NS_ERROR_ILLEGAL_VALUE;
@ -101,9 +101,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultCode(nsAString & aFaultCode)
aFaultCode.Truncate();
nsCOMPtr < nsIDOMElement > faultcode;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
if (faultcode) {
nsAutoString combined;
nsSOAPUtils::GetElementTextContent(faultcode, combined);
@ -121,9 +121,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultNamespaceURI(nsAString & aNamespaceURI)
aNamespaceURI.Truncate();
nsCOMPtr < nsIDOMElement > faultcode;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
if (faultcode) {
nsAutoString combined;
nsSOAPUtils::GetElementTextContent(faultcode, combined);
@ -142,9 +142,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultString(nsAString & aFaultString)
aFaultString.Truncate();
nsCOMPtr < nsIDOMElement > element;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultStringTagName,
getter_AddRefs(element));
kEmpty,
nsSOAPUtils::kFaultStringTagName,
getter_AddRefs(element));
if (element) {
nsSOAPUtils::GetElementTextContent(element, aFaultString);
}
@ -161,9 +161,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultActor(nsAString & aFaultActor)
aFaultActor.Truncate();
nsCOMPtr < nsIDOMElement > element;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultActorTagName,
getter_AddRefs(element));
kEmpty,
nsSOAPUtils::kFaultActorTagName,
getter_AddRefs(element));
if (element) {
nsSOAPUtils::GetElementTextContent(element, aFaultActor);
}
@ -179,8 +179,8 @@ NS_IMETHODIMP nsSOAPFault::GetDetail(nsIDOMElement * *aDetail)
nsCOMPtr < nsIDOMElement > element;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultDetailTagName,
aDetail);
kEmpty,
nsSOAPUtils::kFaultDetailTagName,
aDetail);
return NS_OK;
}

Просмотреть файл

@ -50,7 +50,7 @@ nsSOAPHeaderBlock::nsSOAPHeaderBlock()
}
NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPHeaderBlock, nsISOAPBlock,
nsISOAPHeaderBlock)
nsISOAPHeaderBlock)
NS_IMPL_ADDREF_INHERITED(nsSOAPHeaderBlock, nsSOAPBlock)
NS_IMPL_RELEASE_INHERITED(nsSOAPHeaderBlock, nsSOAPBlock)
NS_INTERFACE_MAP_BEGIN(nsSOAPHeaderBlock)
@ -69,8 +69,8 @@ NS_IMETHODIMP nsSOAPHeaderBlock::GetActorURI(nsAString & aActorURI)
if (mVersion == nsISOAPMessage::VERSION_UNKNOWN)
return NS_ERROR_NOT_AVAILABLE;
return mElement->GetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[mVersion],
nsSOAPUtils::kActorAttribute,
aActorURI);
nsSOAPUtils::kActorAttribute,
aActorURI);
} else {
aActorURI.Assign(mActorURI);
}
@ -88,7 +88,7 @@ NS_IMETHODIMP nsSOAPHeaderBlock::SetActorURI(const nsAString & aActorURI)
/* attribute AString mustUnderstand; */
NS_IMETHODIMP nsSOAPHeaderBlock::GetMustUnderstand(PRBool *
aMustUnderstand)
aMustUnderstand)
{
NS_ENSURE_ARG_POINTER(&aMustUnderstand);
if (mElement) {
@ -96,19 +96,19 @@ NS_IMETHODIMP nsSOAPHeaderBlock::GetMustUnderstand(PRBool *
return NS_ERROR_NOT_AVAILABLE;
nsAutoString m;
nsresult
rc =
mElement->
GetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[mVersion],
nsSOAPUtils::kMustUnderstandAttribute, m);
rc =
mElement->
GetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[mVersion],
nsSOAPUtils::kMustUnderstandAttribute, m);
if (NS_FAILED(rc))
return rc;
if (m.Length() == 0)
*aMustUnderstand = PR_FALSE;
else if (m.Equals(nsSOAPUtils::kTrue)
|| m.Equals(nsSOAPUtils::kTrueA))
|| m.Equals(nsSOAPUtils::kTrueA))
*aMustUnderstand = PR_TRUE;
else if (m.Equals(nsSOAPUtils::kFalse)
|| m.Equals(nsSOAPUtils::kFalseA))
|| m.Equals(nsSOAPUtils::kFalseA))
*aMustUnderstand = PR_FALSE;
else
return NS_ERROR_ILLEGAL_VALUE;

Просмотреть файл

@ -49,7 +49,7 @@ nsSOAPParameter::nsSOAPParameter()
}
NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPParameter, nsISOAPBlock,
nsISOAPParameter)
nsISOAPParameter)
NS_IMPL_ADDREF_INHERITED(nsSOAPParameter, nsSOAPBlock)
NS_IMPL_RELEASE_INHERITED(nsSOAPParameter, nsSOAPBlock)
NS_INTERFACE_MAP_BEGIN(nsSOAPParameter)

Просмотреть файл

@ -106,7 +106,7 @@ nsSOAPPropertyBag::~nsSOAPPropertyBag()
/* nsIVariant getProperty (in AString name); */
NS_IMETHODIMP
nsSOAPPropertyBag::GetProperty(const nsAString & aName,
nsIVariant ** _retval)
nsIVariant ** _retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsStringKey nameKey(aName);
@ -116,7 +116,7 @@ NS_IMETHODIMP
NS_IMETHODIMP
nsSOAPPropertyBag::SetProperty(const nsAString & aName,
nsIVariant * aValue)
nsIVariant * aValue)
{
NS_ENSURE_ARG_POINTER(&aName);
NS_ENSURE_ARG_POINTER(aValue);
@ -129,22 +129,22 @@ NS_IMETHODIMP
#define XPC_MAP_QUOTED_CLASSNAME "SOAPPropertyBag"
#define XPC_MAP_WANT_GETPROPERTY
#define XPC_MAP_FLAGS 0
#include "xpc_map_end.h" /* This will #undef the above */
#include "xpc_map_end.h" /* This will #undef the above */
NS_IMETHODIMP
nsSOAPPropertyBag::GetProperty(nsIXPConnectWrappedNative * wrapper,
JSContext * cx, JSObject * obj,
jsval id, jsval * vp, PRBool * _retval)
JSContext * cx, JSObject * obj,
jsval id, jsval * vp, PRBool * _retval)
{
if (JSVAL_IS_STRING(id)) {
JSString *str = JSVAL_TO_STRING(id);
const PRUnichar *name = NS_REINTERPRET_CAST(const PRUnichar *,
JS_GetStringChars(str));
JS_GetStringChars(str));
nsDependentString namestr(name);
nsStringKey nameKey(namestr);
nsCOMPtr < nsIVariant > value =
dont_AddRef(NS_STATIC_CAST
(nsIVariant *, mProperties->Get(&nameKey)));
dont_AddRef(NS_STATIC_CAST
(nsIVariant *, mProperties->Get(&nameKey)));
if (value == nsnull)
return NS_OK;
void *mark;
@ -161,8 +161,8 @@ PRBool PropertyBagEnumFunc(nsHashKey * aKey, void *aData, void *aClosure)
nsAutoString name(NS_STATIC_CAST(nsStringKey *, aKey)->GetString());
properties->
AppendElement(new
nsSOAPProperty(name,
NS_STATIC_CAST(nsIVariant *, aData)));
nsSOAPProperty(name,
NS_STATIC_CAST(nsIVariant *, aData)));
return PR_TRUE;
}
@ -204,7 +204,7 @@ NS_IMETHODIMP
NS_IMPL_ISUPPORTS1_CI(nsSOAPProperty, nsIProperty)
nsSOAPProperty::nsSOAPProperty(const nsAString & aName,
nsIVariant * aValue):mName(aName), mValue(aValue) {
nsIVariant * aValue):mName(aName), mValue(aValue) {
NS_INIT_REFCNT();
}
nsSOAPProperty::~nsSOAPProperty()
@ -257,7 +257,7 @@ NS_IMETHODIMP nsSOAPPropertyBagMutator::GetPropertyBag(nsIPropertyBag ** aProper
NS_IMETHODIMP
nsSOAPPropertyBagMutator::AddProperty(const nsAString & aName,
nsIVariant * aValue)
nsIVariant * aValue)
{
NS_ENSURE_ARG_POINTER(&aName);
NS_ENSURE_ARG_POINTER(aValue);

Просмотреть файл

@ -55,7 +55,7 @@ nsSOAPResponse::~nsSOAPResponse()
}
NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPResponse, nsISOAPMessage,
nsISOAPResponse)
nsISOAPResponse)
NS_IMPL_ADDREF_INHERITED(nsSOAPResponse, nsSOAPMessage)
NS_IMPL_RELEASE_INHERITED(nsSOAPResponse, nsSOAPMessage)
NS_INTERFACE_MAP_BEGIN(nsSOAPResponse)
@ -80,20 +80,20 @@ NS_IMETHODIMP nsSOAPResponse::GetFault(nsISOAPFault * *aFault)
if (rc != nsSOAPMessage::VERSION_UNKNOWN) {
nsCOMPtr < nsIDOMElement > fault;
nsSOAPUtils::GetSpecificChildElement(nsnull, body,
*nsSOAPUtils::
kSOAPEnvURI[version],
nsSOAPUtils::kFaultTagName,
getter_AddRefs(fault));
*nsSOAPUtils::
kSOAPEnvURI[version],
nsSOAPUtils::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);
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 {

Просмотреть файл

@ -35,35 +35,35 @@
#
# ***** END LICENSE BLOCK ***** *
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xmlextras
XPIDL_MODULE = xmlsoap
MODULE = xmlextras
XPIDL_MODULE = xmlsoap
XPIDLSRCS = \
nsISOAPAttachments.idl \
nsISOAPBlock.idl \
nsISOAPCall.idl \
nsISOAPCallCompletion.idl \
nsISOAPDecoder.idl \
nsISOAPEncoder.idl \
nsISOAPEncoding.idl \
nsISOAPFault.idl \
nsISOAPHeaderBlock.idl \
nsISOAPMessage.idl \
nsISOAPParameter.idl \
nsISOAPPropertyBagMutator.idl \
nsISOAPResponse.idl \
nsISOAPResponseListener.idl \
nsISOAPService.idl \
nsISOAPServiceRegistry.idl \
nsISOAPTransport.idl \
nsISOAPTransportListener.idl \
$(NULL)
XPIDLSRCS = \
nsISOAPAttachments.idl \
nsISOAPBlock.idl \
nsISOAPCall.idl \
nsISOAPCallCompletion.idl \
nsISOAPDecoder.idl \
nsISOAPEncoder.idl \
nsISOAPEncoding.idl \
nsISOAPFault.idl \
nsISOAPHeaderBlock.idl \
nsISOAPMessage.idl \
nsISOAPParameter.idl \
nsISOAPPropertyBagMutator.idl \
nsISOAPResponse.idl \
nsISOAPResponseListener.idl \
nsISOAPService.idl \
nsISOAPServiceRegistry.idl \
nsISOAPTransport.idl \
nsISOAPTransportListener.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -38,29 +38,29 @@
DEPTH=..\..\..\..
MODULE = xmlextras
XPIDL_MODULE = xmlsoap
MODULE = xmlextras
XPIDL_MODULE = xmlsoap
XPIDLSRCS = \
.\nsISOAPAttachments.idl \
.\nsISOAPBlock.idl \
.\nsISOAPCall.idl \
.\nsISOAPCallCompletion.idl \
.\nsISOAPDecoder.idl \
.\nsISOAPEncoder.idl \
.\nsISOAPEncoding.idl \
.\nsISOAPFault.idl \
.\nsISOAPHeaderBlock.idl \
.\nsISOAPMessage.idl \
.\nsISOAPParameter.idl \
.\nsISOAPPropertyBagMutator.idl \
.\nsISOAPResponse.idl \
.\nsISOAPResponseListener.idl \
.\nsISOAPService.idl \
.\nsISOAPServiceRegistry.idl \
.\nsISOAPTransport.idl \
.\nsISOAPTransportListener.idl \
$(NULL)
.\nsISOAPAttachments.idl \
.\nsISOAPBlock.idl \
.\nsISOAPCall.idl \
.\nsISOAPCallCompletion.idl \
.\nsISOAPDecoder.idl \
.\nsISOAPEncoder.idl \
.\nsISOAPEncoding.idl \
.\nsISOAPFault.idl \
.\nsISOAPHeaderBlock.idl \
.\nsISOAPMessage.idl \
.\nsISOAPParameter.idl \
.\nsISOAPPropertyBagMutator.idl \
.\nsISOAPResponse.idl \
.\nsISOAPResponseListener.idl \
.\nsISOAPService.idl \
.\nsISOAPServiceRegistry.idl \
.\nsISOAPTransport.idl \
.\nsISOAPTransportListener.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -35,32 +35,32 @@
#
# ***** END LICENSE BLOCK ***** *
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xmlextras
LIBRARY_NAME = xmlextrassoap_s
REQUIRES = xpcom string caps dom js widget xpconnect necko schema
MODULE = xmlextras
LIBRARY_NAME = xmlextrassoap_s
REQUIRES = xpcom string caps dom js widget xpconnect necko schema
CPPSRCS = \
nsDefaultSOAPEncoder.cpp\
nsHTTPSOAPTransport.cpp \
nsSOAPBlock.cpp \
nsSOAPCall.cpp \
nsSOAPEncoding.cpp \
nsSOAPException.cpp \
nsSOAPFault.cpp \
nsSOAPHeaderBlock.cpp \
nsSOAPMessage.cpp \
nsSOAPParameter.cpp \
nsSOAPPropertyBag.cpp \
nsSOAPResponse.cpp \
nsSOAPUtils.cpp \
$(NULL)
CPPSRCS = \
nsDefaultSOAPEncoder.cpp\
nsHTTPSOAPTransport.cpp \
nsSOAPBlock.cpp \
nsSOAPCall.cpp \
nsSOAPEncoding.cpp \
nsSOAPException.cpp \
nsSOAPFault.cpp \
nsSOAPHeaderBlock.cpp \
nsSOAPMessage.cpp \
nsSOAPParameter.cpp \
nsSOAPPropertyBag.cpp \
nsSOAPResponse.cpp \
nsSOAPUtils.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
@ -68,8 +68,8 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
DEFINES += -D_IMPL_NS_HTML
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DWIN32_LEAN_AND_MEAN
DEFINES += -DWIN32_LEAN_AND_MEAN
endif

Просмотреть файл

@ -41,7 +41,7 @@ DEPTH=..\..\..\..
LIBRARY_NAME=xmlextrassoap_s
MODULE=xmlextras
REQUIRES = \
REQUIRES = \
xpcom \
string \
caps \
@ -53,21 +53,21 @@ REQUIRES = \
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
OBJS= \
.\$(OBJDIR)\nsDefaultSOAPEncoder.obj \
.\$(OBJDIR)\nsHTTPSOAPTransport.obj \
.\$(OBJDIR)\nsSOAPBlock.obj \
.\$(OBJDIR)\nsSOAPCall.obj \
.\$(OBJDIR)\nsSOAPEncoding.obj \
.\$(OBJDIR)\nsSOAPException.obj \
.\$(OBJDIR)\nsSOAPFault.obj \
.\$(OBJDIR)\nsSOAPHeaderBlock.obj \
.\$(OBJDIR)\nsSOAPMessage.obj \
.\$(OBJDIR)\nsSOAPParameter.obj \
.\$(OBJDIR)\nsSOAPPropertyBag.obj \
.\$(OBJDIR)\nsSOAPResponse.obj \
.\$(OBJDIR)\nsSOAPUtils.obj \
$(NULL)
OBJS= \
.\$(OBJDIR)\nsDefaultSOAPEncoder.obj \
.\$(OBJDIR)\nsHTTPSOAPTransport.obj \
.\$(OBJDIR)\nsSOAPBlock.obj \
.\$(OBJDIR)\nsSOAPCall.obj \
.\$(OBJDIR)\nsSOAPEncoding.obj \
.\$(OBJDIR)\nsSOAPException.obj \
.\$(OBJDIR)\nsSOAPFault.obj \
.\$(OBJDIR)\nsSOAPHeaderBlock.obj \
.\$(OBJDIR)\nsSOAPMessage.obj \
.\$(OBJDIR)\nsSOAPParameter.obj \
.\$(OBJDIR)\nsSOAPPropertyBag.obj \
.\$(OBJDIR)\nsSOAPResponse.obj \
.\$(OBJDIR)\nsSOAPUtils.obj \
$(NULL)
LCFLAGS = \
$(LCFLAGS) \
@ -77,7 +77,7 @@ LCFLAGS = \
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

Просмотреть файл

@ -69,14 +69,14 @@ NS_IMPL_ISUPPORTS1_CI(nsHTTPSOAPTransport, nsISOAPTransport)
#ifdef DEBUG
#define DEBUG_DUMP_DOCUMENT(message,doc) \
{ \
nsresult rcc;\
nsXPIDLString serial;\
nsCOMPtr<nsIDOMSerializer> serializer(do_CreateInstance(NS_XMLSERIALIZER_CONTRACTID, &rcc));\
if (NS_FAILED(rcc)) return rcc; \
rcc = serializer->SerializeToString(doc, getter_Copies(serial));\
if (NS_FAILED(rcc)) return rcc;\
nsAutoString result(serial);\
printf(message ":\n%s\n", NS_ConvertUCS2toUTF8(result).get());\
nsresult rcc;\
nsXPIDLString serial;\
nsCOMPtr<nsIDOMSerializer> serializer(do_CreateInstance(NS_XMLSERIALIZER_CONTRACTID, &rcc));\
if (NS_FAILED(rcc)) return rcc; \
rcc = serializer->SerializeToString(doc, getter_Copies(serial));\
if (NS_FAILED(rcc)) return rcc;\
nsAutoString result(serial);\
printf(message ":\n%s\n", NS_ConvertUCS2toUTF8(result).get());\
}
// Availble from the debugger...
nsresult DebugPrintDOM(nsIDOMNode * node)
@ -281,7 +281,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
return rv;
rv = request->OpenRequest("POST", NS_ConvertUCS2toUTF8(uri).get(),
PR_FALSE, nsnull, nsnull);
PR_FALSE, nsnull, nsnull);
if (NS_FAILED(rv))
return rv;
@ -291,7 +291,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
return rv;
if (!AStringIsNull(action)) {
rv = request->SetRequestHeader("SOAPAction",
NS_ConvertUCS2toUTF8(action).get());
NS_ConvertUCS2toUTF8(action).get());
if (NS_FAILED(rv))
return rv;
}
@ -302,7 +302,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
return rv;
rv = variant->SetAsInterface(NS_GET_IID(nsIDOMDocument),
messageDocument);
messageDocument);
if (NS_FAILED(rv))
return rv;
@ -336,7 +336,7 @@ NS_IMETHODIMP nsHTTPSOAPTransport::SyncCall(nsISOAPCall * aCall, nsISOAPResponse
}
NS_IMPL_ISUPPORTS2_CI(nsHTTPSOAPTransportCompletion, nsIDOMEventListener,
nsISOAPCallCompletion)
nsISOAPCallCompletion)
nsHTTPSOAPTransportCompletion::nsHTTPSOAPTransportCompletion()
{
NS_INIT_ISUPPORTS();
@ -363,7 +363,7 @@ NS_IMETHODIMP nsHTTPSOAPTransportCompletion::GetCall(nsISOAPCall * *aCall)
/* readonly attribute nsISOAPResponse response; */
NS_IMETHODIMP
nsHTTPSOAPTransportCompletion::GetResponse(nsISOAPResponse *
*aResponse)
*aResponse)
{
*aResponse =
mRequest ? (nsCOMPtr < nsISOAPResponse >) nsnull : mResponse;
@ -374,7 +374,7 @@ NS_IMETHODIMP
/* readonly attribute nsISOAPResponseListener listener; */
NS_IMETHODIMP
nsHTTPSOAPTransportCompletion::GetListener(nsISOAPResponseListener *
*aListener)
*aListener)
{
*aListener = mListener;
NS_IF_ADDREF(*aListener);
@ -408,7 +408,7 @@ NS_IMETHODIMP
{
// PRUint32 status;
nsresult rv = NS_OK;
if (mRequest) { // Avoid if it has been aborted.
if (mRequest) { // Avoid if it has been aborted.
#if 0
rv = mRequest->GetStatus(&status);
if (NS_SUCCEEDED(rv) && (status < 200 || status >= 300))
@ -418,16 +418,16 @@ NS_IMETHODIMP
nsCOMPtr < nsIDOMDocument > document;
rv = mRequest->GetResponseXML(getter_AddRefs(document));
if (NS_SUCCEEDED(rv) && document) {
rv = mResponse->SetMessage(document);
rv = mResponse->SetMessage(document);
DEBUG_DUMP_DOCUMENT("Asynchronous Response", document)} else {
mResponse = nsnull;
mResponse = nsnull;
}
} else {
mResponse = nsnull;
}
nsCOMPtr < nsISOAPCallCompletion > kungFuDeathGrip = this;
mRequest = nsnull; // Break cycle of references by releas.
PRBool c; // In other transports, this may signal to stop returning if multiple returns
mRequest = nsnull; // Break cycle of references by releas.
PRBool c; // In other transports, this may signal to stop returning if multiple returns
mListener->HandleResponse(mResponse, mCall, rv, PR_TRUE, &c);
}
return NS_OK;
@ -436,9 +436,9 @@ NS_IMETHODIMP
/* void asyncCall (in nsISOAPCall aCall, in nsISOAPResponseListener aListener, in nsISOAPResponse aResponse); */
NS_IMETHODIMP
nsHTTPSOAPTransport::AsyncCall(nsISOAPCall * aCall,
nsISOAPResponseListener * aListener,
nsISOAPResponse * aResponse,
nsISOAPCallCompletion ** aCompletion)
nsISOAPResponseListener * aListener,
nsISOAPResponse * aResponse,
nsISOAPCallCompletion ** aCompletion)
{
NS_ENSURE_ARG(aCall);
@ -470,7 +470,7 @@ NS_IMETHODIMP
DEBUG_DUMP_DOCUMENT("Asynchronous Request", messageDocument)
rv = request->OpenRequest("POST", NS_ConvertUCS2toUTF8(uri).get(),
PR_TRUE, nsnull, nsnull);
PR_TRUE, nsnull, nsnull);
if (NS_FAILED(rv))
return rv;
@ -480,7 +480,7 @@ NS_IMETHODIMP
return rv;
if (!AStringIsNull(action)) {
rv = request->SetRequestHeader("SOAPAction",
NS_ConvertUCS2toUTF8(action).get());
NS_ConvertUCS2toUTF8(action).get());
if (NS_FAILED(rv))
return rv;
}
@ -491,7 +491,7 @@ NS_IMETHODIMP
return rv;
rv = variant->SetAsInterface(NS_GET_IID(nsIDOMDocument),
messageDocument);
messageDocument);
if (NS_FAILED(rv))
return rv;
@ -499,19 +499,19 @@ NS_IMETHODIMP
if (aListener) {
completion =
new nsHTTPSOAPTransportCompletion(aCall, aResponse, request,
aListener);
new nsHTTPSOAPTransportCompletion(aCall, aResponse, request,
aListener);
if (!completion)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr < nsIDOMEventListener > listener =
do_QueryInterface(completion);
do_QueryInterface(completion);
rv = eventTarget->AddEventListener(NS_LITERAL_STRING("load"), listener,
PR_FALSE);
PR_FALSE);
if (NS_FAILED(rv))
return rv;
rv = eventTarget->AddEventListener(NS_LITERAL_STRING("error"),
listener, PR_FALSE);
listener, PR_FALSE);
if (NS_FAILED(rv))
return rv;
}
@ -528,7 +528,7 @@ NS_IMETHODIMP
/* void addListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
NS_IMETHODIMP
nsHTTPSOAPTransport::AddListener(nsISOAPTransportListener * aListener,
PRBool aCapture)
PRBool aCapture)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -536,7 +536,7 @@ NS_IMETHODIMP
/* void removeListener (in nsISOAPTransportListener aListener, in boolean aCapture); */
NS_IMETHODIMP
nsHTTPSOAPTransport::RemoveListener(nsISOAPTransportListener *
aListener, PRBool aCapture)
aListener, PRBool aCapture)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -55,7 +55,7 @@ nsSOAPBlock::~nsSOAPBlock()
NS_IMPL_ISUPPORTS2(nsSOAPBlock, nsISOAPBlock, nsIJSNativeInitializer)
NS_IMETHODIMP nsSOAPBlock::Init(nsISOAPAttachments * aAttachments,
PRUint16 aVersion)
PRUint16 aVersion)
{
if (aVersion == nsISOAPMessage::VERSION_1_1
|| aVersion == nsISOAPMessage::VERSION_1_2) {
@ -167,15 +167,15 @@ NS_IMETHODIMP nsSOAPBlock::SetElement(nsIDOMElement * aElement)
NS_IMETHODIMP nsSOAPBlock::GetValue(nsIVariant * *aValue)
{
NS_ENSURE_ARG_POINTER(aValue);
if (mElement) { // Check for auto-computation
if (mElement) { // Check for auto-computation
if (mComputeValue) {
mComputeValue = PR_FALSE;
if (mEncoding) {
mStatus =
mEncoding->Decode(mElement, mSchemaType, mAttachments,
getter_AddRefs(mValue));
mStatus =
mEncoding->Decode(mElement, mSchemaType, mAttachments,
getter_AddRefs(mValue));
} else {
mStatus = NS_ERROR_NOT_INITIALIZED;
mStatus = NS_ERROR_NOT_INITIALIZED;
}
}
}
@ -195,7 +195,7 @@ NS_IMETHODIMP nsSOAPBlock::SetValue(nsIVariant * aValue)
NS_IMETHODIMP
nsSOAPBlock::Initialize(JSContext * cx, JSObject * obj,
PRUint32 argc, jsval * argv)
PRUint32 argc, jsval * argv)
{
// Get the arguments.
@ -207,11 +207,11 @@ NS_IMETHODIMP
nsCOMPtr < nsISupports > encoding;
if (!JS_ConvertArguments(cx, argc, argv, "/%iv %is %is %ip %ip",
getter_AddRefs(value),
NS_STATIC_CAST(nsAString *, &name),
NS_STATIC_CAST(nsAString *, &namespaceURI),
getter_AddRefs(schemaType),
getter_AddRefs(encoding)))
getter_AddRefs(value),
NS_STATIC_CAST(nsAString *, &name),
NS_STATIC_CAST(nsAString *, &namespaceURI),
getter_AddRefs(schemaType),
getter_AddRefs(encoding)))
return NS_ERROR_ILLEGAL_VALUE;
nsresult rc = SetValue(value);

Просмотреть файл

@ -150,7 +150,7 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
return rv;
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))
return rv;
if (!document) {
@ -159,13 +159,13 @@ NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse ** _retval)
}
return response->QueryInterface(NS_GET_IID(nsISOAPResponse),
(void **) _retval);
(void **) _retval);
}
/* void asyncInvoke (in nsISOAPResponseListener listener); */
NS_IMETHODIMP
nsSOAPCall::AsyncInvoke(nsISOAPResponseListener * listener,
nsISOAPCallCompletion ** aCompletion)
nsISOAPCallCompletion ** aCompletion)
{
nsresult rv;
nsCOMPtr < nsISOAPTransport > transport;

Просмотреть файл

@ -53,7 +53,7 @@
// First comes the registry which shares between associated encodings but is never seen by xpconnect.
NS_IMPL_ISUPPORTS1(nsSOAPEncodingRegistry, nsISOAPEncoding) nsSOAPEncodingRegistry::nsSOAPEncodingRegistry(nsISOAPEncoding * aEncoding):mEncodings(new
nsSupportsHashtable)
nsSupportsHashtable)
{
NS_INIT_ISUPPORTS();
@ -73,7 +73,7 @@ nsSOAPEncodingRegistry::~nsSOAPEncodingRegistry()
nsresult
nsSOAPEncodingRegistry::
GetAssociatedEncoding(const nsAString & aStyleURI, PRBool aCreateIf,
nsISOAPEncoding * *aEncoding)
nsISOAPEncoding * *aEncoding)
{
NS_SOAP_ENSURE_ARG_STRING(aStyleURI);
NS_ENSURE_ARG_POINTER(aEncoding);
@ -97,7 +97,7 @@ GetAssociatedEncoding(const nsAString & aStyleURI, PRBool aCreateIf,
nsresult
nsSOAPEncodingRegistry::SetSchemaCollection(nsISchemaCollection *
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG(aSchemaCollection);
mSchemaCollection = aSchemaCollection;
@ -106,13 +106,13 @@ nsresult
nsresult
nsSOAPEncodingRegistry::GetSchemaCollection(nsISchemaCollection **
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG_POINTER(aSchemaCollection);
if (!mSchemaCollection) {
nsresult rv;
nsCOMPtr < nsISchemaLoader > loader =
do_CreateInstance(NS_SCHEMALOADER_CONTRACTID, &rv);
do_CreateInstance(NS_SCHEMALOADER_CONTRACTID, &rv);
if (NS_FAILED(rv))
return rv;
mSchemaCollection = do_QueryInterface(loader);
@ -133,7 +133,7 @@ NS_IMETHODIMP nsSOAPEncodingRegistry::GetStyleURI(nsAString & aStyleURI)
/* nsISOAPEncoder setEncoder (in AString aKey, in nsISOAPEncoder aEncoder); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetEncoder(const nsAString & aKey,
nsISOAPEncoder * aEncoder)
nsISOAPEncoder * aEncoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -141,7 +141,7 @@ NS_IMETHODIMP
/* nsISOAPEncoder getEncoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetEncoder(const nsAString & aKey,
nsISOAPEncoder ** _retval)
nsISOAPEncoder ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -149,7 +149,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder setDecoder (in AString aKey, in nsISOAPDecoder aDecoder); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetDecoder(const nsAString & aKey,
nsISOAPDecoder * aDecoder)
nsISOAPDecoder * aDecoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -157,7 +157,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder getDecoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetDecoder(const nsAString & aKey,
nsISOAPDecoder ** _retval)
nsISOAPDecoder ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -165,14 +165,14 @@ NS_IMETHODIMP
/* attribute nsISOAPEncoder defaultEncoder; */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetDefaultEncoder(nsISOAPEncoder *
*aDefaultEncoder)
*aDefaultEncoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetDefaultEncoder(nsISOAPEncoder *
aDefaultEncoder)
aDefaultEncoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -180,14 +180,14 @@ NS_IMETHODIMP
/* attribute nsISOAPDecoder defaultDecoder; */
NS_IMETHODIMP
nsSOAPEncodingRegistry::GetDefaultDecoder(nsISOAPDecoder *
*aDefaultDecoder)
*aDefaultDecoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsSOAPEncodingRegistry::SetDefaultDecoder(nsISOAPDecoder *
aDefaultDecoder)
aDefaultDecoder)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -195,12 +195,12 @@ NS_IMETHODIMP
/* nsIDOMElement encode (in nsIVariant aSource, in AString aNamespaceURI, in AString aName, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments, in nsIDOMElement aDestination); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::Encode(nsIVariant * aSource,
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -208,9 +208,9 @@ NS_IMETHODIMP
/* nsIVariant decode (in nsIDOMElement aSource, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments); */
NS_IMETHODIMP
nsSOAPEncodingRegistry::Decode(nsIDOMElement * aSource,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -277,7 +277,7 @@ nsSOAPEncoding::~nsSOAPEncoding()
nsresult
nsSOAPEncoding::SetSchemaCollection(nsISchemaCollection *
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG(aSchemaCollection);
return mRegistry->SetSchemaCollection(aSchemaCollection);
@ -285,7 +285,7 @@ nsresult
nsresult
nsSOAPEncoding::GetSchemaCollection(nsISchemaCollection **
aSchemaCollection)
aSchemaCollection)
{
NS_ENSURE_ARG_POINTER(aSchemaCollection);
return mRegistry->GetSchemaCollection(aSchemaCollection);
@ -302,8 +302,8 @@ NS_IMETHODIMP nsSOAPEncoding::GetStyleURI(nsAString & aStyleURI)
/* nsISOAPEncoding getAssociatedEncoding (in AString aStyleURI, in boolean aCreateIf); */
NS_IMETHODIMP
nsSOAPEncoding::GetAssociatedEncoding(const nsAString & aStyleURI,
PRBool aCreateIf,
nsISOAPEncoding ** _retval)
PRBool aCreateIf,
nsISOAPEncoding ** _retval)
{
NS_SOAP_ENSURE_ARG_STRING(aStyleURI);
NS_ENSURE_ARG_POINTER(_retval);
@ -313,7 +313,7 @@ NS_IMETHODIMP
/* nsISOAPEncoder setEncoder (in AString aKey, in nsISOAPEncoder aEncoder); */
NS_IMETHODIMP
nsSOAPEncoding::SetEncoder(const nsAString & aKey,
nsISOAPEncoder * aEncoder)
nsISOAPEncoder * aEncoder)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG(aEncoder);
@ -329,7 +329,7 @@ NS_IMETHODIMP
/* nsISOAPEncoder getEncoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncoding::GetEncoder(const nsAString & aKey,
nsISOAPEncoder ** _retval)
nsISOAPEncoder ** _retval)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG_POINTER(_retval);
@ -344,7 +344,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder setDecoder (in AString aKey, in nsISOAPDecoder aDecoder); */
NS_IMETHODIMP
nsSOAPEncoding::SetDecoder(const nsAString & aKey,
nsISOAPDecoder * aDecoder)
nsISOAPDecoder * aDecoder)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG(aDecoder);
@ -360,7 +360,7 @@ NS_IMETHODIMP
/* nsISOAPDecoder getDecoder (in AString aKey); */
NS_IMETHODIMP
nsSOAPEncoding::GetDecoder(const nsAString & aKey,
nsISOAPDecoder ** _retval)
nsISOAPDecoder ** _retval)
{
NS_SOAP_ENSURE_ARG_STRING(aKey);
NS_ENSURE_ARG_POINTER(_retval);
@ -375,12 +375,12 @@ NS_IMETHODIMP
/* nsIDOMElement encode (in nsIVariant aSource, in AString aNamespaceURI, in AString aName, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments, in nsIDOMElement aDestination); */
NS_IMETHODIMP
nsSOAPEncoding::Encode(nsIVariant * aSource,
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
const nsAString & aNamespaceURI,
const nsAString & aName,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIDOMElement * aDestination,
nsIDOMElement ** _retval)
{
NS_ENSURE_ARG(aSource);
NS_ENSURE_ARG_POINTER(_retval);
@ -391,8 +391,8 @@ NS_IMETHODIMP
return rv;
if (encoder) {
return encoder->Encode(this, aSource, aNamespaceURI, aName,
aSchemaType, aAttachments, aDestination,
_retval);
aSchemaType, aAttachments, aDestination,
_retval);
}
*_retval = nsnull;
return NS_ERROR_NOT_IMPLEMENTED;
@ -401,9 +401,9 @@ NS_IMETHODIMP
/* nsIVariant decode (in nsIDOMElement aSource, in nsISchemaType aSchemaType, in nsISOAPAttachments aAttachments); */
NS_IMETHODIMP
nsSOAPEncoding::Decode(nsIDOMElement * aSource,
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
nsISchemaType * aSchemaType,
nsISOAPAttachments * aAttachments,
nsIVariant ** _retval)
{
NS_ENSURE_ARG(aSource);
NS_ENSURE_ARG_POINTER(_retval);
@ -413,7 +413,7 @@ NS_IMETHODIMP
return rv;
if (decoder) {
return decoder->Decode(this, aSource, aSchemaType, aAttachments,
_retval);
_retval);
}
*_retval = nsnull;
return NS_ERROR_NOT_IMPLEMENTED;

Просмотреть файл

@ -215,7 +215,7 @@ nsresult nsSOAPException::AddException(nsresult aStatus, const nsAString & aName
xs->GetCurrentException(getter_AddRefs(old));
nsCOMPtr<nsIException> exception = new nsSOAPException(aStatus,
aName.IsEmpty() ? NS_LITERAL_STRING("SOAP_FAILURE") : aName,
aMessage.IsEmpty() ? NS_LITERAL_STRING("No description") : aMessage, old);
aMessage.IsEmpty() ? NS_LITERAL_STRING("No description") : aMessage, old);
if (exception) {
xm->SetCurrentException(exception);
}

Просмотреть файл

@ -67,14 +67,14 @@ NS_IMETHODIMP nsSOAPFault::SetElement(nsIDOMElement * aElement)
return rc;
if (name.Equals(nsSOAPUtils::kFaultTagName)) {
if (namespaceURI.
Equals(*nsSOAPUtils::kSOAPEnvURI[nsISOAPMessage::VERSION_1_2])) {
mVersion = nsISOAPMessage::VERSION_1_2;
Equals(*nsSOAPUtils::kSOAPEnvURI[nsISOAPMessage::VERSION_1_2])) {
mVersion = nsISOAPMessage::VERSION_1_2;
} else if (namespaceURI.
Equals(*nsSOAPUtils::
kSOAPEnvURI[nsISOAPMessage::VERSION_1_1])) {
mVersion = nsISOAPMessage::VERSION_1_1;
Equals(*nsSOAPUtils::
kSOAPEnvURI[nsISOAPMessage::VERSION_1_1])) {
mVersion = nsISOAPMessage::VERSION_1_1;
} else {
return NS_ERROR_ILLEGAL_VALUE;
return NS_ERROR_ILLEGAL_VALUE;
}
} else {
return NS_ERROR_ILLEGAL_VALUE;
@ -101,9 +101,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultCode(nsAString & aFaultCode)
aFaultCode.Truncate();
nsCOMPtr < nsIDOMElement > faultcode;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
if (faultcode) {
nsAutoString combined;
nsSOAPUtils::GetElementTextContent(faultcode, combined);
@ -121,9 +121,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultNamespaceURI(nsAString & aNamespaceURI)
aNamespaceURI.Truncate();
nsCOMPtr < nsIDOMElement > faultcode;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
kEmpty,
nsSOAPUtils::kFaultCodeTagName,
getter_AddRefs(faultcode));
if (faultcode) {
nsAutoString combined;
nsSOAPUtils::GetElementTextContent(faultcode, combined);
@ -142,9 +142,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultString(nsAString & aFaultString)
aFaultString.Truncate();
nsCOMPtr < nsIDOMElement > element;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultStringTagName,
getter_AddRefs(element));
kEmpty,
nsSOAPUtils::kFaultStringTagName,
getter_AddRefs(element));
if (element) {
nsSOAPUtils::GetElementTextContent(element, aFaultString);
}
@ -161,9 +161,9 @@ NS_IMETHODIMP nsSOAPFault::GetFaultActor(nsAString & aFaultActor)
aFaultActor.Truncate();
nsCOMPtr < nsIDOMElement > element;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultActorTagName,
getter_AddRefs(element));
kEmpty,
nsSOAPUtils::kFaultActorTagName,
getter_AddRefs(element));
if (element) {
nsSOAPUtils::GetElementTextContent(element, aFaultActor);
}
@ -179,8 +179,8 @@ NS_IMETHODIMP nsSOAPFault::GetDetail(nsIDOMElement * *aDetail)
nsCOMPtr < nsIDOMElement > element;
nsSOAPUtils::GetSpecificChildElement(nsnull, mFaultElement,
kEmpty,
nsSOAPUtils::kFaultDetailTagName,
aDetail);
kEmpty,
nsSOAPUtils::kFaultDetailTagName,
aDetail);
return NS_OK;
}

Просмотреть файл

@ -50,7 +50,7 @@ nsSOAPHeaderBlock::nsSOAPHeaderBlock()
}
NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPHeaderBlock, nsISOAPBlock,
nsISOAPHeaderBlock)
nsISOAPHeaderBlock)
NS_IMPL_ADDREF_INHERITED(nsSOAPHeaderBlock, nsSOAPBlock)
NS_IMPL_RELEASE_INHERITED(nsSOAPHeaderBlock, nsSOAPBlock)
NS_INTERFACE_MAP_BEGIN(nsSOAPHeaderBlock)
@ -69,8 +69,8 @@ NS_IMETHODIMP nsSOAPHeaderBlock::GetActorURI(nsAString & aActorURI)
if (mVersion == nsISOAPMessage::VERSION_UNKNOWN)
return NS_ERROR_NOT_AVAILABLE;
return mElement->GetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[mVersion],
nsSOAPUtils::kActorAttribute,
aActorURI);
nsSOAPUtils::kActorAttribute,
aActorURI);
} else {
aActorURI.Assign(mActorURI);
}
@ -88,7 +88,7 @@ NS_IMETHODIMP nsSOAPHeaderBlock::SetActorURI(const nsAString & aActorURI)
/* attribute AString mustUnderstand; */
NS_IMETHODIMP nsSOAPHeaderBlock::GetMustUnderstand(PRBool *
aMustUnderstand)
aMustUnderstand)
{
NS_ENSURE_ARG_POINTER(&aMustUnderstand);
if (mElement) {
@ -96,19 +96,19 @@ NS_IMETHODIMP nsSOAPHeaderBlock::GetMustUnderstand(PRBool *
return NS_ERROR_NOT_AVAILABLE;
nsAutoString m;
nsresult
rc =
mElement->
GetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[mVersion],
nsSOAPUtils::kMustUnderstandAttribute, m);
rc =
mElement->
GetAttributeNS(*nsSOAPUtils::kSOAPEnvURI[mVersion],
nsSOAPUtils::kMustUnderstandAttribute, m);
if (NS_FAILED(rc))
return rc;
if (m.Length() == 0)
*aMustUnderstand = PR_FALSE;
else if (m.Equals(nsSOAPUtils::kTrue)
|| m.Equals(nsSOAPUtils::kTrueA))
|| m.Equals(nsSOAPUtils::kTrueA))
*aMustUnderstand = PR_TRUE;
else if (m.Equals(nsSOAPUtils::kFalse)
|| m.Equals(nsSOAPUtils::kFalseA))
|| m.Equals(nsSOAPUtils::kFalseA))
*aMustUnderstand = PR_FALSE;
else
return NS_ERROR_ILLEGAL_VALUE;

Просмотреть файл

@ -49,7 +49,7 @@ nsSOAPParameter::nsSOAPParameter()
}
NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPParameter, nsISOAPBlock,
nsISOAPParameter)
nsISOAPParameter)
NS_IMPL_ADDREF_INHERITED(nsSOAPParameter, nsSOAPBlock)
NS_IMPL_RELEASE_INHERITED(nsSOAPParameter, nsSOAPBlock)
NS_INTERFACE_MAP_BEGIN(nsSOAPParameter)

Просмотреть файл

@ -106,7 +106,7 @@ nsSOAPPropertyBag::~nsSOAPPropertyBag()
/* nsIVariant getProperty (in AString name); */
NS_IMETHODIMP
nsSOAPPropertyBag::GetProperty(const nsAString & aName,
nsIVariant ** _retval)
nsIVariant ** _retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsStringKey nameKey(aName);
@ -116,7 +116,7 @@ NS_IMETHODIMP
NS_IMETHODIMP
nsSOAPPropertyBag::SetProperty(const nsAString & aName,
nsIVariant * aValue)
nsIVariant * aValue)
{
NS_ENSURE_ARG_POINTER(&aName);
NS_ENSURE_ARG_POINTER(aValue);
@ -129,22 +129,22 @@ NS_IMETHODIMP
#define XPC_MAP_QUOTED_CLASSNAME "SOAPPropertyBag"
#define XPC_MAP_WANT_GETPROPERTY
#define XPC_MAP_FLAGS 0
#include "xpc_map_end.h" /* This will #undef the above */
#include "xpc_map_end.h" /* This will #undef the above */
NS_IMETHODIMP
nsSOAPPropertyBag::GetProperty(nsIXPConnectWrappedNative * wrapper,
JSContext * cx, JSObject * obj,
jsval id, jsval * vp, PRBool * _retval)
JSContext * cx, JSObject * obj,
jsval id, jsval * vp, PRBool * _retval)
{
if (JSVAL_IS_STRING(id)) {
JSString *str = JSVAL_TO_STRING(id);
const PRUnichar *name = NS_REINTERPRET_CAST(const PRUnichar *,
JS_GetStringChars(str));
JS_GetStringChars(str));
nsDependentString namestr(name);
nsStringKey nameKey(namestr);
nsCOMPtr < nsIVariant > value =
dont_AddRef(NS_STATIC_CAST
(nsIVariant *, mProperties->Get(&nameKey)));
dont_AddRef(NS_STATIC_CAST
(nsIVariant *, mProperties->Get(&nameKey)));
if (value == nsnull)
return NS_OK;
void *mark;
@ -161,8 +161,8 @@ PRBool PropertyBagEnumFunc(nsHashKey * aKey, void *aData, void *aClosure)
nsAutoString name(NS_STATIC_CAST(nsStringKey *, aKey)->GetString());
properties->
AppendElement(new
nsSOAPProperty(name,
NS_STATIC_CAST(nsIVariant *, aData)));
nsSOAPProperty(name,
NS_STATIC_CAST(nsIVariant *, aData)));
return PR_TRUE;
}
@ -204,7 +204,7 @@ NS_IMETHODIMP
NS_IMPL_ISUPPORTS1_CI(nsSOAPProperty, nsIProperty)
nsSOAPProperty::nsSOAPProperty(const nsAString & aName,
nsIVariant * aValue):mName(aName), mValue(aValue) {
nsIVariant * aValue):mName(aName), mValue(aValue) {
NS_INIT_REFCNT();
}
nsSOAPProperty::~nsSOAPProperty()
@ -257,7 +257,7 @@ NS_IMETHODIMP nsSOAPPropertyBagMutator::GetPropertyBag(nsIPropertyBag ** aProper
NS_IMETHODIMP
nsSOAPPropertyBagMutator::AddProperty(const nsAString & aName,
nsIVariant * aValue)
nsIVariant * aValue)
{
NS_ENSURE_ARG_POINTER(&aName);
NS_ENSURE_ARG_POINTER(aValue);

Просмотреть файл

@ -55,7 +55,7 @@ nsSOAPResponse::~nsSOAPResponse()
}
NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPResponse, nsISOAPMessage,
nsISOAPResponse)
nsISOAPResponse)
NS_IMPL_ADDREF_INHERITED(nsSOAPResponse, nsSOAPMessage)
NS_IMPL_RELEASE_INHERITED(nsSOAPResponse, nsSOAPMessage)
NS_INTERFACE_MAP_BEGIN(nsSOAPResponse)
@ -80,20 +80,20 @@ NS_IMETHODIMP nsSOAPResponse::GetFault(nsISOAPFault * *aFault)
if (rc != nsSOAPMessage::VERSION_UNKNOWN) {
nsCOMPtr < nsIDOMElement > fault;
nsSOAPUtils::GetSpecificChildElement(nsnull, body,
*nsSOAPUtils::
kSOAPEnvURI[version],
nsSOAPUtils::kFaultTagName,
getter_AddRefs(fault));
*nsSOAPUtils::
kSOAPEnvURI[version],
nsSOAPUtils::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);
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 {