Added conditional in makefiles and build module to enable or disable

MOZ_WSP.  This was only done inside of the MOZ_SOAP defines.  Tested
build with and without SOAP define.  This permits SOAP to be built
without web service proxies.  Related to bug 107795, but needed
whether or not SOAP becomes part of default build.

sr=vidur.  SOAP is not part of default build.


git-svn-id: svn://10.0.0.236/trunk@114842 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rayw%netscape.com 2002-02-18 23:38:07 +00:00
parent 1d38a01a11
commit eb30dee02f
11 changed files with 47 additions and 16 deletions

View File

@ -1225,7 +1225,7 @@ static nsresult EncodeArray(nsISOAPEncoding* aEncoding, nsIVariant* aSource, nsI
} else switch (type) {
case nsIDataType::VTYPE_INT8:
ENCODE_SIMPLE_ARRAY(PRUint8, Int8,
(PRInt16) (signed char) values[i]);
(signed char) values[i]);
case nsIDataType::VTYPE_INT16:
ENCODE_SIMPLE_ARRAY(PRInt16, Int16, values[i]);
case nsIDataType::VTYPE_INT32:
@ -1233,7 +1233,7 @@ static nsresult EncodeArray(nsISOAPEncoding* aEncoding, nsIVariant* aSource, nsI
case nsIDataType::VTYPE_INT64:
ENCODE_SIMPLE_ARRAY(PRInt64, Int64, values[i]);
case nsIDataType::VTYPE_UINT8:
ENCODE_SIMPLE_ARRAY(PRUint8, Uint8, (PRUint16) values[i]);
ENCODE_SIMPLE_ARRAY(PRUint8, Uint8, values[i]);
case nsIDataType::VTYPE_UINT16:
ENCODE_SIMPLE_ARRAY(PRUint16, Uint16, values[i]);
case nsIDataType::VTYPE_UINT32:

View File

@ -70,8 +70,8 @@ protected:
nsCOMPtr < nsIDOMElement > mElement;
nsCOMPtr < nsIVariant > mValue;
nsresult mStatus;
PRUint16 mVersion;
PRPackedBool mComputeValue;
PRPackedBool mVersion;
};
#endif

View File

@ -154,7 +154,6 @@ NS_IMETHODIMP nsSOAPMessage::GetVersion(PRUint16 * aVersion)
/* Internal method for getting envelope and version */
PRUint16 nsSOAPMessage::GetEnvelopeWithVersion(nsIDOMElement * *aEnvelope)
{
NS_ENSURE_ARG_POINTER(aEnvelope);
if (mMessage) {
nsCOMPtr < nsIDOMElement > root;
mMessage->GetDocumentElement(getter_AddRefs(root));

View File

@ -29,7 +29,10 @@ include $(DEPTH)/config/autoconf.mk
DIRS = base
ifdef MOZ_SOAP
DIRS += schema soap wsdl proxy
DIRS += schema soap
ifdef MOZ_WSP
DIRS += wsdl proxy
endif
endif
DIRS += build

View File

@ -57,12 +57,18 @@ SHARED_LIBRARY_LIBS = \
ifdef MOZ_SOAP
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)xmlextrasschema_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)xmlextraswsdl_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)xmlextrassoap_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)xmlextrasproxy_s.$(LIB_SUFFIX) \
$(NULL)
DEFINES += -DMOZ_SOAP
ifdef MOZ_WSP
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)xmlextraswsdl_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)xmlextrasproxy_s.$(LIB_SUFFIX) \
$(NULL)
DEFINES += -DMOZ_WSP
endif
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../../base/src \
@ -72,10 +78,15 @@ ifdef MOZ_SOAP
LOCAL_INCLUDES += \
-I$(srcdir)/../../soap/src \
-I$(srcdir)/../../schema/src \
$(NULL)
ifdef MOZ_WSP
LOCAL_INCLUDES += \
-I$(srcdir)/../../wsdl/src \
-I$(srcdir)/../../proxy/src \
$(NULL)
endif
endif
EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \

View File

@ -42,8 +42,10 @@ LINCS = \
!if defined(MOZ_SOAP)
-I..\..\soap\src \
-I..\..\schema\src \
!if defined(MOZ_WSP)
-I..\..\wsdl\src \
-I..\..\proxy\src \
!endif
!endif
$(NULL)
@ -56,8 +58,10 @@ SUB_LIBRARIES= \
!if defined(MOZ_SOAP)
$(DIST)\lib\xmlextrassoap_s.lib \
$(DIST)\lib\xmlextrasschema_s.lib \
!if defined(MOZ_WSP)
$(DIST)\lib\xmlextraswsdl_s.lib \
$(DIST)\lib\xmlextrasproxy_s.lib \
!endif
!endif
$(NULL)
@ -69,6 +73,9 @@ LLIBS= \
!if defined(MOZ_SOAP)
DEFINES =$(DEFINES) -DMOZ_SOAP
!if defined(MOZ_WSP)
DEFINES =$(DEFINES) -DMOZ_WSP
!endif
!endif
LCFLAGS = \

View File

@ -63,10 +63,12 @@
#include "nsSOAPPropertyBag.h"
#include "nsSchemaLoader.h"
#include "nsSchemaPrivate.h"
#ifdef MOZ_WSP
#include "nsWSDLLoader.h"
#include "nsWSDLPrivate.h"
#include "wspprivate.h"
#endif
#endif // MOZ_WSP
#endif // MOZ_SOAP
#include "nsString.h"
#include "prprf.h"
@ -132,6 +134,7 @@ NS_DECL_CLASSINFO(nsSchemaFacet)
NS_DECL_CLASSINFO(nsSOAPArray)
NS_DECL_CLASSINFO(nsSOAPArrayType)
#ifdef MOZ_WSP
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWSDLLoader)
NS_DECL_CLASSINFO(nsWSDLLoader)
NS_DECL_CLASSINFO(nsWSDLPort)
@ -146,7 +149,8 @@ NS_DECL_CLASSINFO(nsSOAPPartBinding)
NS_DECL_CLASSINFO(WSPComplexTypeWrapper)
NS_DECL_CLASSINFO(WSPCallContext)
NS_DECL_CLASSINFO(WSPException)
#endif
#endif // MOZ_WSP
#endif // MOZ_SOAP
class nsXMLExtrasNameset : public nsISupports
{
@ -293,12 +297,14 @@ RegisterXMLExtras(nsIComponentManager *aCompMgr,
NS_SCHEMALOADER_CONTRACTID,
PR_TRUE, PR_TRUE, getter_Copies(previous));
NS_ENSURE_SUCCESS(rv, rv);
#ifdef MOZ_WSP
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
"WSDLLoader",
NS_WSDLLOADER_CONTRACTID,
PR_TRUE, PR_TRUE, getter_Copies(previous));
NS_ENSURE_SUCCESS(rv, rv);
#endif
#endif // MOZ_WSP
#endif // MOZ_SOAP
return rv;
}
@ -497,6 +503,7 @@ static const nsModuleComponentInfo components[] = {
{ "Builtin Schema Collection", NS_BUILTINSCHEMACOLLECTION_CID,
NS_BUILTINSCHEMACOLLECTION_CONTRACTID,
nsBuiltinSchemaCollectionConstructor },
#ifdef MOZ_WSP
{ "WSDLLoader", NS_WSDLLOADER_CID, NS_WSDLLOADER_CONTRACTID,
nsWSDLLoaderConstructor, nsnull, nsnull, nsnull,
NS_CI_INTERFACE_GETTER_NAME(nsWSDLLoader), nsnull,
@ -552,7 +559,8 @@ static const nsModuleComponentInfo components[] = {
nsnull, nsnull, nsnull, nsnull,
NS_CI_INTERFACE_GETTER_NAME(WSPException), nsnull,
&NS_CLASSINFO_NAME(WSPException), nsIClassInfo::DOM_OBJECT },
#endif
#endif // MOZ_WSP
#endif // MOZ_SOAP
};
void PR_CALLBACK
@ -560,8 +568,10 @@ XMLExtrasModuleDestructor(nsIModule* self)
{
#ifdef MOZ_SOAP
nsSchemaAtoms::DestroySchemaAtoms();
#ifdef MOZ_WSP
nsWSDLAtoms::DestroyWSDLAtoms();
#endif
#endif // MOZ_WSP
#endif // MOZ_SOAP
}
NS_IMPL_NSGETMODULE_WITH_DTOR(nsXMLExtrasModule, components,

View File

@ -26,8 +26,10 @@ DIRS= \
!if defined(MOZ_SOAP)
schema \
soap \
!if defined(MOZ_WSP)
wsdl \
proxy \
!endif
!endif
build \
!if !defined(DISABLE_TESTS)

View File

@ -1225,7 +1225,7 @@ static nsresult EncodeArray(nsISOAPEncoding* aEncoding, nsIVariant* aSource, nsI
} else switch (type) {
case nsIDataType::VTYPE_INT8:
ENCODE_SIMPLE_ARRAY(PRUint8, Int8,
(PRInt16) (signed char) values[i]);
(signed char) values[i]);
case nsIDataType::VTYPE_INT16:
ENCODE_SIMPLE_ARRAY(PRInt16, Int16, values[i]);
case nsIDataType::VTYPE_INT32:
@ -1233,7 +1233,7 @@ static nsresult EncodeArray(nsISOAPEncoding* aEncoding, nsIVariant* aSource, nsI
case nsIDataType::VTYPE_INT64:
ENCODE_SIMPLE_ARRAY(PRInt64, Int64, values[i]);
case nsIDataType::VTYPE_UINT8:
ENCODE_SIMPLE_ARRAY(PRUint8, Uint8, (PRUint16) values[i]);
ENCODE_SIMPLE_ARRAY(PRUint8, Uint8, values[i]);
case nsIDataType::VTYPE_UINT16:
ENCODE_SIMPLE_ARRAY(PRUint16, Uint16, values[i]);
case nsIDataType::VTYPE_UINT32:

View File

@ -70,8 +70,8 @@ protected:
nsCOMPtr < nsIDOMElement > mElement;
nsCOMPtr < nsIVariant > mValue;
nsresult mStatus;
PRUint16 mVersion;
PRPackedBool mComputeValue;
PRPackedBool mVersion;
};
#endif

View File

@ -154,7 +154,6 @@ NS_IMETHODIMP nsSOAPMessage::GetVersion(PRUint16 * aVersion)
/* Internal method for getting envelope and version */
PRUint16 nsSOAPMessage::GetEnvelopeWithVersion(nsIDOMElement * *aEnvelope)
{
NS_ENSURE_ARG_POINTER(aEnvelope);
if (mMessage) {
nsCOMPtr < nsIDOMElement > root;
mMessage->GetDocumentElement(getter_AddRefs(root));