зеркало из https://github.com/mozilla/gecko-dev.git
Fixes required to bring SOAP up to date. The SOAP, WSDL, and Schema code
is not part of the default build. MOZ_WSDL and MOZ_SCHEMA were eliminated in favor of MOZ_SOAP. MOZ_SCHEMA wasn't being used anyway, and MOZ_WSDL had things needed by MOZ_SOAP. Not part of the default build.
This commit is contained in:
Родитель
824927ab75
Коммит
18db5bcc50
|
@ -42,10 +42,10 @@ function makeCall(syncCall, faultCall) {
|
|||
s.targetObjectURI = "uri:some-namespace";
|
||||
s.methodName = "GetLastTradePrice";
|
||||
if (faultCall) {
|
||||
s.destinationURI = "http://blueviper/cgi-bin/soapfault.cgi";
|
||||
s.transportURI = "http://blueviper/cgi-bin/soapfault.cgi";
|
||||
}
|
||||
else {
|
||||
s.destinationURI = "http://blueviper/cgi-bin/soapsuccess.cgi";
|
||||
s.transportURI = "http://blueviper/cgi-bin/soapsuccess.cgi";
|
||||
}
|
||||
s.actionURI = "uri:some action";
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "nsVoidArray.h"
|
||||
#include "nsSupportsArray.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
// Typelib includes
|
||||
|
|
|
@ -29,11 +29,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
DIRS = base
|
||||
|
||||
ifdef MOZ_SOAP
|
||||
DIRS += soap
|
||||
endif
|
||||
|
||||
ifdef MOZ_WSDL
|
||||
DIRS += schema wsdl
|
||||
DIRS += schema soap wsdl
|
||||
endif
|
||||
|
||||
DIRS += build
|
||||
|
|
|
@ -42,6 +42,7 @@ REQUIRES = xpcom \
|
|||
necko \
|
||||
webbrwsr \
|
||||
embedcomponents \
|
||||
xpconnect \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsXMLExtrasModule.cpp
|
||||
|
@ -50,14 +51,10 @@ SHARED_LIBRARY_LIBS = \
|
|||
$(DIST)/lib/libxmlextrasbase_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_SOAP
|
||||
SHARED_LIBRARY_LIBS += $(DIST)/lib/libxmlextrassoap_s.$(LIB_SUFFIX)
|
||||
DEFINES = -DMOZ_SOAP
|
||||
endif
|
||||
|
||||
ifdef MOZ_WSDL
|
||||
SHARED_LIBRARY_LIBS += $(DIST)/lib/libxmlextrasschema_s.$(LIB_SUFFIX) $(DIST)/lib/libxmlextraswsdl_s.$(LIB_SUFFIX)
|
||||
DEFINES = -DMOZ_SCHEMA -DMOZ_WSDL
|
||||
ifdef MOZ_SOAP
|
||||
SHARED_LIBRARY_LIBS += $(DIST)/lib/libxmlextrasschema_s.$(LIB_SUFFIX) $(DIST)/lib/libxmlextraswsdl_s.$(LIB_SUFFIX) $(DIST)/lib/libxmlextrassoap_s.$(LIB_SUFFIX)
|
||||
DEFINES = -DMOZ_SOAP
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
|
|
|
@ -47,8 +47,6 @@ SUB_LIBRARIES= \
|
|||
$(DIST)\lib\xmlextrasbase_s.lib \
|
||||
!if defined(MOZ_SOAP)
|
||||
$(DIST)\lib\xmlextrassoap_s.lib \
|
||||
!endif
|
||||
!if defined(MOZ_WSDL)
|
||||
$(DIST)\lib\xmlextrasschema_s.lib \
|
||||
$(DIST)\lib\xmlextraswsdl_s.lib \
|
||||
!endif
|
||||
|
@ -61,10 +59,7 @@ LLIBS= \
|
|||
$(NULL)
|
||||
|
||||
!if defined(MOZ_SOAP)
|
||||
DEFINES = -DMOZ_SOAP
|
||||
!endif
|
||||
!if defined(MOZ_WSDL)
|
||||
DEFINES =$(DEFINES) -DMOZ_SCHEMA -DMOZ_WSDL
|
||||
DEFINES =$(DEFINES) -DMOZ_SOAP
|
||||
!endif
|
||||
|
||||
LCFLAGS = \
|
||||
|
|
|
@ -51,13 +51,11 @@
|
|||
#include "prprf.h"
|
||||
|
||||
#ifdef MOZ_SOAP
|
||||
#include "nsSOAPHeaderBlock.h"
|
||||
#include "nsSOAPParameter.h"
|
||||
#include "nsSOAPCall.h"
|
||||
#include "nsDefaultSOAPEncoder.h"
|
||||
#include "nsHTTPSOAPTransport.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WSDL
|
||||
#include "nsSchemaLoader.h"
|
||||
#include "nsSchemaPrivate.h"
|
||||
#include "nsWSDLLoader.h"
|
||||
|
@ -79,12 +77,15 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsXMLHttpRequest)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMParser)
|
||||
#ifdef MOZ_SOAP
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSOAPCall)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSOAPHeaderBlock)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSOAPParameter)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDefaultSOAPEncoder)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTTPSOAPTransport)
|
||||
#endif
|
||||
NS_DECL_CLASSINFO(nsSOAPCall)
|
||||
NS_DECL_CLASSINFO(nsSOAPHeaderBlock)
|
||||
NS_DECL_CLASSINFO(nsSOAPParameter)
|
||||
NS_DECL_CLASSINFO(nsHTTPSOAPTransport)
|
||||
|
||||
#ifdef MOZ_WSDL
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSchemaLoader)
|
||||
NS_DECL_CLASSINFO(nsSchemaLoader)
|
||||
NS_DECL_CLASSINFO(nsSchema)
|
||||
|
@ -221,14 +222,18 @@ RegisterXMLExtras(nsIComponentManager *aCompMgr,
|
|||
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
||||
"SOAPHeaderBlock",
|
||||
NS_SOAPHEADERBLOCK_CONTRACTID,
|
||||
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
||||
"SOAPParameter",
|
||||
NS_SOAPPARAMETER_CONTRACTID,
|
||||
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WSDL
|
||||
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
||||
"SchemaLoader",
|
||||
NS_SCHEMALOADER_CONTRACTID,
|
||||
|
@ -260,15 +265,29 @@ static nsModuleComponentInfo components[] = {
|
|||
nsDOMParserConstructor },
|
||||
#ifdef MOZ_SOAP
|
||||
{ "SOAP Call", NS_SOAPCALL_CID, NS_SOAPCALL_CONTRACTID,
|
||||
nsSOAPCallConstructor },
|
||||
nsSOAPCallConstructor, nsnull, nsnull, nsnull,
|
||||
NS_CI_INTERFACE_GETTER_NAME(nsSOAPCall),
|
||||
nsnull, &NS_CLASSINFO_NAME(nsSOAPCall),
|
||||
nsIClassInfo::DOM_OBJECT },
|
||||
{ "SOAP HeaderBlock", NS_SOAPHEADERBLOCK_CID, NS_SOAPHEADERBLOCK_CONTRACTID,
|
||||
nsSOAPHeaderBlockConstructor, nsnull, nsnull, nsnull,
|
||||
NS_CI_INTERFACE_GETTER_NAME(nsSOAPHeaderBlock),
|
||||
nsnull, &NS_CLASSINFO_NAME(nsSOAPHeaderBlock),
|
||||
nsIClassInfo::DOM_OBJECT },
|
||||
{ "SOAP Parameter", NS_SOAPPARAMETER_CID, NS_SOAPPARAMETER_CONTRACTID,
|
||||
nsSOAPParameterConstructor },
|
||||
nsSOAPParameterConstructor, nsnull, nsnull, nsnull,
|
||||
NS_CI_INTERFACE_GETTER_NAME(nsSOAPParameter),
|
||||
nsnull, &NS_CLASSINFO_NAME(nsSOAPParameter),
|
||||
nsIClassInfo::DOM_OBJECT },
|
||||
{ "Default SOAP Encoder", NS_DEFAULTSOAPENCODER_CID,
|
||||
NS_DEFAULTSOAPENCODER_CONTRACTID, nsDefaultSOAPEncoderConstructor },
|
||||
NS_DEFAULTSOAPENCODER_CONTRACTID,
|
||||
nsDefaultSOAPEncoderConstructor },
|
||||
{ "HTTP SOAP Transport", NS_HTTPSOAPTRANSPORT_CID,
|
||||
NS_HTTPSOAPTRANSPORT_CONTRACTID, nsHTTPSOAPTransportConstructor },
|
||||
#endif
|
||||
#ifdef MOZ_WSDL
|
||||
NS_HTTPSOAPTRANSPORT_CONTRACTID,
|
||||
nsHTTPSOAPTransportConstructor, nsnull, nsnull, nsnull,
|
||||
NS_CI_INTERFACE_GETTER_NAME(nsHTTPSOAPTransport),
|
||||
nsnull, &NS_CLASSINFO_NAME(nsHTTPSOAPTransport),
|
||||
nsIClassInfo::DOM_OBJECT },
|
||||
{ "SchemaLoader", NS_SCHEMALOADER_CID, NS_SCHEMALOADER_CONTRACTID,
|
||||
nsSchemaLoaderConstructor, nsnull, nsnull, nsnull,
|
||||
NS_CI_INTERFACE_GETTER_NAME(nsSchemaLoader), nsnull,
|
||||
|
@ -392,7 +411,7 @@ static nsModuleComponentInfo components[] = {
|
|||
void PR_CALLBACK
|
||||
XMLExtrasModuleDestructor(nsIModule* self)
|
||||
{
|
||||
#ifdef MOZ_WSDL
|
||||
#ifdef MOZ_SOAP
|
||||
nsSchemaAtoms::DestroySchemaAtoms();
|
||||
nsWSDLAtoms::DestroyWSDLAtoms();
|
||||
#endif
|
||||
|
|
|
@ -24,10 +24,8 @@ DEPTH=..\..
|
|||
DIRS= \
|
||||
base \
|
||||
!if defined(MOZ_SOAP)
|
||||
soap \
|
||||
!endif
|
||||
!if defined(MOZ_WSDL)
|
||||
schema \
|
||||
soap \
|
||||
wsdl \
|
||||
!endif
|
||||
build \
|
||||
|
|
|
@ -42,10 +42,10 @@ function makeCall(syncCall, faultCall) {
|
|||
s.targetObjectURI = "uri:some-namespace";
|
||||
s.methodName = "GetLastTradePrice";
|
||||
if (faultCall) {
|
||||
s.destinationURI = "http://blueviper/cgi-bin/soapfault.cgi";
|
||||
s.transportURI = "http://blueviper/cgi-bin/soapfault.cgi";
|
||||
}
|
||||
else {
|
||||
s.destinationURI = "http://blueviper/cgi-bin/soapsuccess.cgi";
|
||||
s.transportURI = "http://blueviper/cgi-bin/soapsuccess.cgi";
|
||||
}
|
||||
s.actionURI = "uri:some action";
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ nsWSDLInterfaceInfo::GetName(char * *aName)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aName);
|
||||
|
||||
*aName = mName.ToNewCString();
|
||||
*aName = ToNewCString(mName);
|
||||
if (!*aName) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "nsVoidArray.h"
|
||||
#include "nsSupportsArray.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
// Typelib includes
|
||||
|
|
Загрузка…
Ссылка в новой задаче