зеркало из https://github.com/mozilla/pjs.git
Adding WSDL to XMLExtras if MOZ_WSDL is defined. Also added REQUIRES macros to schema and wsdl makefiles (thanks to jonsmirl@mediaone.net). This not yet part of the build. r=heikki, rs=jst.
This commit is contained in:
Родитель
46bae57c92
Коммит
92c582e3ff
|
@ -36,7 +36,8 @@ interface nsIWSDLLoader : nsISupports {
|
||||||
void loadAsync(in AString wsdlURI, in AString portName,
|
void loadAsync(in AString wsdlURI, in AString portName,
|
||||||
in nsIWSDLLoadListener listener);
|
in nsIWSDLLoadListener listener);
|
||||||
nsISupports createPortProxy(in nsIWSDLPort service,
|
nsISupports createPortProxy(in nsIWSDLPort service,
|
||||||
in AString nameSpace);
|
in AString nameSpace,
|
||||||
|
in boolean sync);
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, function, uuid(0458dac6-65de-11d5-9b42-00104bdf5339)]
|
[scriptable, function, uuid(0458dac6-65de-11d5-9b42-00104bdf5339)]
|
||||||
|
|
|
@ -28,12 +28,17 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
MODULE = xmlextras
|
MODULE = xmlextras
|
||||||
LIBRARY_NAME = xmlextrasschema_s
|
LIBRARY_NAME = xmlextrasschema_s
|
||||||
|
|
||||||
REQUIRES = xpcom \
|
REQUIRES = xpcom \
|
||||||
string \
|
string \
|
||||||
dom \
|
dom \
|
||||||
caps \
|
|
||||||
necko \
|
|
||||||
xpconnect \
|
xpconnect \
|
||||||
|
caps \
|
||||||
|
layout \
|
||||||
|
widget \
|
||||||
|
content \
|
||||||
|
js \
|
||||||
|
necko \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
|
|
|
@ -31,9 +31,13 @@ LIBRARY_NAME = xmlextraswsdl_s
|
||||||
REQUIRES = xpcom \
|
REQUIRES = xpcom \
|
||||||
string \
|
string \
|
||||||
dom \
|
dom \
|
||||||
caps \
|
|
||||||
necko \
|
|
||||||
xpconnect \
|
xpconnect \
|
||||||
|
caps \
|
||||||
|
layout \
|
||||||
|
widget \
|
||||||
|
content \
|
||||||
|
js \
|
||||||
|
necko \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
|
|
|
@ -258,6 +258,7 @@ nsWSDLLoader::LoadAsync(const nsAReadableString& wsdlURI,
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWSDLLoader::CreatePortProxy(nsIWSDLPort *port,
|
nsWSDLLoader::CreatePortProxy(nsIWSDLPort *port,
|
||||||
const nsAReadableString& nameSpace,
|
const nsAReadableString& nameSpace,
|
||||||
|
PRBool sync,
|
||||||
nsISupports **_retval)
|
nsISupports **_retval)
|
||||||
{
|
{
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
|
|
@ -38,6 +38,14 @@
|
||||||
#include "nsVoidArray.h"
|
#include "nsVoidArray.h"
|
||||||
#include "nsSupportsArray.h"
|
#include "nsSupportsArray.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
#include "nsWeakReference.h"
|
||||||
|
|
||||||
|
// Typelib includes
|
||||||
|
#include "nsIInterfaceInfo.h"
|
||||||
|
#include "nsIInterfaceInfoManager.h"
|
||||||
|
#include "xpt_struct.h"
|
||||||
|
#include "xptcall.h"
|
||||||
|
|
||||||
|
|
||||||
#define NS_WSDL_SCHEMA_NAMESPACE "http://www.w3.org/2001/XMLSchema"
|
#define NS_WSDL_SCHEMA_NAMESPACE "http://www.w3.org/2001/XMLSchema"
|
||||||
#define NS_WSDL_NAMESPACE "http://schemas.xmlsoap.org/wsdl/"
|
#define NS_WSDL_NAMESPACE "http://schemas.xmlsoap.org/wsdl/"
|
||||||
|
@ -184,6 +192,83 @@ protected:
|
||||||
nsCOMPtr<nsIWSDLBinding> mBinding;
|
nsCOMPtr<nsIWSDLBinding> mBinding;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define NS_WSDLINTERFACEINFOID_ISUPPORTS 0
|
||||||
|
// The boundary number should be incremented as reserved
|
||||||
|
// ids are added.
|
||||||
|
#define NS_WSDLINTERFACEINFOID_RESERVED_BOUNDARY 1
|
||||||
|
|
||||||
|
class nsWSDLInterfaceSet : public nsIInterfaceInfoManager,
|
||||||
|
public nsSupportsWeakReference
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsWSDLInterfaceSet();
|
||||||
|
virtual ~nsWSDLInterfaceSet();
|
||||||
|
|
||||||
|
NS_DECL_ISUPPORTS
|
||||||
|
NS_DECL_NSIINTERFACEINFOMANAGER
|
||||||
|
|
||||||
|
nsresult AppendInterface(nsIInterfaceInfo* aInfo, PRUint16* aIndex);
|
||||||
|
nsresult GetInterfaceAt(PRUint16 aIndex, nsIInterfaceInfo** aInfo);
|
||||||
|
PRUint16 Count();
|
||||||
|
XPTArena* GetArena() { return mArena; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsSupportsArray mInterfaces;
|
||||||
|
XPTArena* mArena;
|
||||||
|
};
|
||||||
|
|
||||||
|
class nsWSDLInterfaceInfo : public nsIInterfaceInfo,
|
||||||
|
public nsSupportsWeakReference
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsWSDLInterfaceInfo(nsAReadableCString& aName,
|
||||||
|
const nsIID& aIID,
|
||||||
|
nsWSDLInterfaceSet* aInterfaceSet);
|
||||||
|
virtual ~nsWSDLInterfaceInfo();
|
||||||
|
|
||||||
|
NS_DECL_ISUPPORTS
|
||||||
|
NS_DECL_NSIINTERFACEINFO
|
||||||
|
|
||||||
|
void AddMethod(XPTMethodDescriptor* aMethod);
|
||||||
|
void AddAdditionalType(XPTTypeDescriptor* aType);
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsresult GetTypeInArray(const nsXPTParamInfo* param,
|
||||||
|
uint16 dimension,
|
||||||
|
const XPTTypeDescriptor** type);
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsCString mName;
|
||||||
|
nsIID mIID;
|
||||||
|
nsVoidArray mMethodDescriptors;
|
||||||
|
nsVoidArray mAdditionalTypes;
|
||||||
|
nsWSDLInterfaceSet* mInterfaceSet;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
class nsWSDLServiceProxy : public nsXPTCStubBase,
|
||||||
|
public nsIWSDLServiceProxy,
|
||||||
|
public nsIClassInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsWSDLServiceProxy();
|
||||||
|
virtual ~nsWSDLServiceProxy();
|
||||||
|
|
||||||
|
NS_DECL_ISUPPORTS
|
||||||
|
NS_DECL_NSIWSDLSERVICEPROXY
|
||||||
|
NS_DECL_NSICLASSINFO
|
||||||
|
|
||||||
|
NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo** info);
|
||||||
|
NS_IMETHOD CallMethod(PRUint16 methodIndex,
|
||||||
|
const nsXPTMethodInfo* info,
|
||||||
|
nsXPTCMiniVariant* params);
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsWSDLInterfaceSet* mInterfaceSet;
|
||||||
|
nsCOMPtr<nsIInterfaceInfo> mInterfaceInfo;
|
||||||
|
nsCOMPtr<nsIWSDLPort> mPort;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NS_WSDLPORT_CID \
|
#define NS_WSDLPORT_CID \
|
||||||
{ /* c1dfb250-0c19-4339-8211-24eabc0103e5 */ \
|
{ /* c1dfb250-0c19-4339-8211-24eabc0103e5 */ \
|
||||||
|
|
|
@ -32,8 +32,8 @@ ifdef MOZ_SOAP
|
||||||
DIRS += soap
|
DIRS += soap
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MOZ_SCHEMA
|
ifdef MOZ_WSDL
|
||||||
DIRS += schema
|
DIRS += schema wsdl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DIRS += build
|
DIRS += build
|
||||||
|
|
|
@ -56,15 +56,16 @@ SHARED_LIBRARY_LIBS += $(DIST)/lib/libxmlextrassoap_s.$(LIB_SUFFIX)
|
||||||
DEFINES = -DMOZ_SOAP
|
DEFINES = -DMOZ_SOAP
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MOZ_SCHEMA
|
ifdef MOZ_WSDL
|
||||||
SHARED_LIBRARY_LIBS += $(DIST)/lib/libxmlextrasschema_s.$(LIB_SUFFIX)
|
SHARED_LIBRARY_LIBS += $(DIST)/lib/libxmlextrasschema_s.$(LIB_SUFFIX) $(DIST)/lib/libxmlextraswsdl_s.$(LIB_SUFFIX)
|
||||||
DEFINES = -DMOZ_SCHEMA
|
DEFINES = -DMOZ_SCHEMA -DMOZ_WSDL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_INCLUDES = \
|
LOCAL_INCLUDES = \
|
||||||
-I$(srcdir)/../../base/src \
|
-I$(srcdir)/../../base/src \
|
||||||
-I$(srcdir)/../../soap/src \
|
-I$(srcdir)/../../soap/src \
|
||||||
-I$(srcdir)/../../schema/src \
|
-I$(srcdir)/../../schema/src \
|
||||||
|
-I$(srcdir)/../../wsdl/src
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS = \
|
EXTRA_DSO_LDOPTS = \
|
||||||
|
|
|
@ -37,7 +37,7 @@ MODULE_NAME=nsXMLExtrasModule
|
||||||
################################################################################
|
################################################################################
|
||||||
## library
|
## library
|
||||||
|
|
||||||
LINCS=-I..\..\base\src -I..\..\soap\src -I..\..\schema\src
|
LINCS=-I..\..\base\src -I..\..\soap\src -I..\..\schema\src -I..\..\wsdl\src
|
||||||
|
|
||||||
CPP_OBJS= \
|
CPP_OBJS= \
|
||||||
.\$(OBJDIR)\nsXMLExtrasModule.obj \
|
.\$(OBJDIR)\nsXMLExtrasModule.obj \
|
||||||
|
@ -48,8 +48,9 @@ SUB_LIBRARIES= \
|
||||||
!if defined(MOZ_SOAP)
|
!if defined(MOZ_SOAP)
|
||||||
$(DIST)\lib\xmlextrassoap_s.lib \
|
$(DIST)\lib\xmlextrassoap_s.lib \
|
||||||
!endif
|
!endif
|
||||||
!if defined(MOZ_SCHEMA)
|
!if defined(MOZ_WSDL)
|
||||||
$(DIST)\lib\xmlextrasschema_s.lib \
|
$(DIST)\lib\xmlextrasschema_s.lib \
|
||||||
|
$(DIST)\lib\xmlextraswsdl_s.lib \
|
||||||
!endif
|
!endif
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -62,8 +63,8 @@ LLIBS= \
|
||||||
!if defined(MOZ_SOAP)
|
!if defined(MOZ_SOAP)
|
||||||
DEFINES = -DMOZ_SOAP
|
DEFINES = -DMOZ_SOAP
|
||||||
!endif
|
!endif
|
||||||
!if defined(MOZ_SCHEMA)
|
!if defined(MOZ_WSDL)
|
||||||
DEFINES =$(DEFINES) -DMOZ_SCHEMA
|
DEFINES =$(DEFINES) -DMOZ_SCHEMA -DMOZ_WSDL
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
LCFLAGS = \
|
LCFLAGS = \
|
||||||
|
|
|
@ -57,9 +57,11 @@
|
||||||
#include "nsHTTPSOAPTransport.h"
|
#include "nsHTTPSOAPTransport.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_SCHEMA
|
#ifdef MOZ_WSDL
|
||||||
#include "nsSchemaLoader.h"
|
#include "nsSchemaLoader.h"
|
||||||
#include "nsSchemaPrivate.h"
|
#include "nsSchemaPrivate.h"
|
||||||
|
#include "nsWSDLLoader.h"
|
||||||
|
#include "nsWSDLPrivate.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
@ -82,7 +84,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDefaultSOAPEncoder)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTTPSOAPTransport)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTTPSOAPTransport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_SCHEMA
|
#ifdef MOZ_WSDL
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSchemaLoader)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSchemaLoader)
|
||||||
NS_DECL_CLASSINFO(nsSchemaLoader)
|
NS_DECL_CLASSINFO(nsSchemaLoader)
|
||||||
NS_DECL_CLASSINFO(nsSchema)
|
NS_DECL_CLASSINFO(nsSchema)
|
||||||
|
@ -103,6 +105,16 @@ NS_DECL_CLASSINFO(nsSchemaAttributeGroup)
|
||||||
NS_DECL_CLASSINFO(nsSchemaAttributeGroupRef)
|
NS_DECL_CLASSINFO(nsSchemaAttributeGroupRef)
|
||||||
NS_DECL_CLASSINFO(nsSchemaAnyAttribute)
|
NS_DECL_CLASSINFO(nsSchemaAnyAttribute)
|
||||||
NS_DECL_CLASSINFO(nsSchemaFacet)
|
NS_DECL_CLASSINFO(nsSchemaFacet)
|
||||||
|
|
||||||
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWSDLLoader)
|
||||||
|
NS_DECL_CLASSINFO(nsWSDLLoader)
|
||||||
|
NS_DECL_CLASSINFO(nsWSDLPort)
|
||||||
|
NS_DECL_CLASSINFO(nsWSDLOperation)
|
||||||
|
NS_DECL_CLASSINFO(nsWSDLMessage)
|
||||||
|
NS_DECL_CLASSINFO(nsWSDLPart)
|
||||||
|
NS_DECL_CLASSINFO(nsSOAPPortBinding)
|
||||||
|
NS_DECL_CLASSINFO(nsSOAPOperationBinding)
|
||||||
|
NS_DECL_CLASSINFO(nsSOAPPartBinding)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class nsXMLExtrasNameset : public nsISupports
|
class nsXMLExtrasNameset : public nsISupports
|
||||||
|
@ -216,12 +228,17 @@ RegisterXMLExtras(nsIComponentManager *aCompMgr,
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_SCHEMA
|
#ifdef MOZ_WSDL
|
||||||
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
||||||
"SchemaLoader",
|
"SchemaLoader",
|
||||||
NS_SCHEMALOADER_CONTRACTID,
|
NS_SCHEMALOADER_CONTRACTID,
|
||||||
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
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
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -251,7 +268,7 @@ static nsModuleComponentInfo components[] = {
|
||||||
{ "HTTP SOAP Transport", NS_HTTPSOAPTRANSPORT_CID,
|
{ "HTTP SOAP Transport", NS_HTTPSOAPTRANSPORT_CID,
|
||||||
NS_HTTPSOAPTRANSPORT_CONTRACTID, nsHTTPSOAPTransportConstructor },
|
NS_HTTPSOAPTRANSPORT_CONTRACTID, nsHTTPSOAPTransportConstructor },
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_SCHEMA
|
#ifdef MOZ_WSDL
|
||||||
{ "SchemaLoader", NS_SCHEMALOADER_CID, NS_SCHEMALOADER_CONTRACTID,
|
{ "SchemaLoader", NS_SCHEMALOADER_CID, NS_SCHEMALOADER_CONTRACTID,
|
||||||
nsSchemaLoaderConstructor, nsnull, nsnull, nsnull,
|
nsSchemaLoaderConstructor, nsnull, nsnull, nsnull,
|
||||||
NS_CI_INTERFACE_GETTER_NAME(nsSchemaLoader), nsnull,
|
NS_CI_INTERFACE_GETTER_NAME(nsSchemaLoader), nsnull,
|
||||||
|
@ -337,14 +354,47 @@ static nsModuleComponentInfo components[] = {
|
||||||
nsnull, nsnull, nsnull, nsnull,
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
NS_CI_INTERFACE_GETTER_NAME(nsSchemaFacet), nsnull,
|
NS_CI_INTERFACE_GETTER_NAME(nsSchemaFacet), nsnull,
|
||||||
&NS_CLASSINFO_NAME(nsSchemaFacet), nsIClassInfo::DOM_OBJECT },
|
&NS_CLASSINFO_NAME(nsSchemaFacet), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "WSDLLoader", NS_WSDLLOADER_CID, NS_WSDLLOADER_CONTRACTID,
|
||||||
|
nsWSDLLoaderConstructor, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsWSDLLoader), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsWSDLLoader), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "WSDLPort", NS_WSDLPORT_CID, NS_WSDLPORT_CONTRACTID,
|
||||||
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsWSDLPort), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsWSDLPort), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "WSDLOperation", NS_WSDLOPERATION_CID, NS_WSDLOPERATION_CONTRACTID,
|
||||||
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsWSDLOperation), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsWSDLOperation), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "WSDLMessage", NS_WSDLMESSAGE_CID, NS_WSDLMESSAGE_CONTRACTID,
|
||||||
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsWSDLMessage), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsWSDLMessage), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "WSDLPart", NS_WSDLPART_CID, NS_WSDLPART_CONTRACTID,
|
||||||
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsWSDLPart), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsWSDLPart), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "SOAPPortBinding", NS_SOAPPORTBINDING_CID, NS_SOAPPORTBINDING_CONTRACTID,
|
||||||
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsSOAPPortBinding), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsSOAPPortBinding), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "SOAPOperationBinding", NS_SOAPOPERATIONBINDING_CID,
|
||||||
|
NS_SOAPOPERATIONBINDING_CONTRACTID, nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsSOAPOperationBinding), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsSOAPOperationBinding), nsIClassInfo::DOM_OBJECT },
|
||||||
|
{ "SOAPPartBinding", NS_SOAPPARTBINDING_CID, NS_SOAPPARTBINDING_CONTRACTID,
|
||||||
|
nsnull, nsnull, nsnull, nsnull,
|
||||||
|
NS_CI_INTERFACE_GETTER_NAME(nsSOAPPartBinding), nsnull,
|
||||||
|
&NS_CLASSINFO_NAME(nsSOAPPartBinding), nsIClassInfo::DOM_OBJECT },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
void PR_CALLBACK
|
void PR_CALLBACK
|
||||||
XMLExtrasModuleDestructor(nsIModule* self)
|
XMLExtrasModuleDestructor(nsIModule* self)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_SCHEMA
|
#ifdef MOZ_WSDL
|
||||||
nsSchemaAtoms::DestroySchemaAtoms();
|
nsSchemaAtoms::DestroySchemaAtoms();
|
||||||
|
nsWSDLAtoms::DestroyWSDLAtoms();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,9 @@ DIRS= \
|
||||||
!if defined(MOZ_SOAP)
|
!if defined(MOZ_SOAP)
|
||||||
soap \
|
soap \
|
||||||
!endif
|
!endif
|
||||||
!if defined(MOZ_SCHEMA)
|
!if defined(MOZ_WSDL)
|
||||||
schema \
|
schema \
|
||||||
|
wsdl \
|
||||||
!endif
|
!endif
|
||||||
build \
|
build \
|
||||||
!if !defined(DISABLE_TESTS)
|
!if !defined(DISABLE_TESTS)
|
||||||
|
|
|
@ -28,12 +28,17 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
MODULE = xmlextras
|
MODULE = xmlextras
|
||||||
LIBRARY_NAME = xmlextrasschema_s
|
LIBRARY_NAME = xmlextrasschema_s
|
||||||
|
|
||||||
REQUIRES = xpcom \
|
REQUIRES = xpcom \
|
||||||
string \
|
string \
|
||||||
dom \
|
dom \
|
||||||
caps \
|
|
||||||
necko \
|
|
||||||
xpconnect \
|
xpconnect \
|
||||||
|
caps \
|
||||||
|
layout \
|
||||||
|
widget \
|
||||||
|
content \
|
||||||
|
js \
|
||||||
|
necko \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
|
|
|
@ -24,6 +24,18 @@ DEPTH=..\..\..\..
|
||||||
LIBRARY_NAME=xmlextrasschema_s
|
LIBRARY_NAME=xmlextrasschema_s
|
||||||
MODULE=xmlextras
|
MODULE=xmlextras
|
||||||
|
|
||||||
|
REQUIRES = xpcom \
|
||||||
|
string \
|
||||||
|
dom \
|
||||||
|
xpconnect \
|
||||||
|
caps \
|
||||||
|
layout \
|
||||||
|
widget \
|
||||||
|
content \
|
||||||
|
js \
|
||||||
|
necko \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
CPPSRCS= \
|
CPPSRCS= \
|
||||||
|
|
|
@ -36,7 +36,8 @@ interface nsIWSDLLoader : nsISupports {
|
||||||
void loadAsync(in AString wsdlURI, in AString portName,
|
void loadAsync(in AString wsdlURI, in AString portName,
|
||||||
in nsIWSDLLoadListener listener);
|
in nsIWSDLLoadListener listener);
|
||||||
nsISupports createPortProxy(in nsIWSDLPort service,
|
nsISupports createPortProxy(in nsIWSDLPort service,
|
||||||
in AString nameSpace);
|
in AString nameSpace,
|
||||||
|
in boolean sync);
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, function, uuid(0458dac6-65de-11d5-9b42-00104bdf5339)]
|
[scriptable, function, uuid(0458dac6-65de-11d5-9b42-00104bdf5339)]
|
||||||
|
|
|
@ -31,9 +31,13 @@ LIBRARY_NAME = xmlextraswsdl_s
|
||||||
REQUIRES = xpcom \
|
REQUIRES = xpcom \
|
||||||
string \
|
string \
|
||||||
dom \
|
dom \
|
||||||
caps \
|
|
||||||
necko \
|
|
||||||
xpconnect \
|
xpconnect \
|
||||||
|
caps \
|
||||||
|
layout \
|
||||||
|
widget \
|
||||||
|
content \
|
||||||
|
js \
|
||||||
|
necko \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
|
|
|
@ -26,14 +26,28 @@ MODULE=xmlextras
|
||||||
|
|
||||||
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
REQUIRES = xpcom \
|
||||||
|
string \
|
||||||
|
dom \
|
||||||
|
xpconnect \
|
||||||
|
caps \
|
||||||
|
layout \
|
||||||
|
widget \
|
||||||
|
content \
|
||||||
|
js \
|
||||||
|
necko \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS= \
|
CPPSRCS= \
|
||||||
nsWSDLLoader.cpp \
|
nsWSDLLoader.cpp \
|
||||||
nsWSDLDefinitions.cpp \
|
nsWSDLDefinitions.cpp \
|
||||||
|
nsWSDLInterfaceInfo.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPP_OBJS= \
|
CPP_OBJS= \
|
||||||
.\$(OBJDIR)\nsWSDLLoader.obj \
|
.\$(OBJDIR)\nsWSDLLoader.obj \
|
||||||
.\$(OBJDIR)\nsWSDLDefinitions.obj \
|
.\$(OBJDIR)\nsWSDLDefinitions.obj \
|
||||||
|
.\$(OBJDIR)\nsWSDLInterfaceInfo.obj \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
|
|
|
@ -258,6 +258,7 @@ nsWSDLLoader::LoadAsync(const nsAReadableString& wsdlURI,
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsWSDLLoader::CreatePortProxy(nsIWSDLPort *port,
|
nsWSDLLoader::CreatePortProxy(nsIWSDLPort *port,
|
||||||
const nsAReadableString& nameSpace,
|
const nsAReadableString& nameSpace,
|
||||||
|
PRBool sync,
|
||||||
nsISupports **_retval)
|
nsISupports **_retval)
|
||||||
{
|
{
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
|
|
@ -38,6 +38,14 @@
|
||||||
#include "nsVoidArray.h"
|
#include "nsVoidArray.h"
|
||||||
#include "nsSupportsArray.h"
|
#include "nsSupportsArray.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
#include "nsWeakReference.h"
|
||||||
|
|
||||||
|
// Typelib includes
|
||||||
|
#include "nsIInterfaceInfo.h"
|
||||||
|
#include "nsIInterfaceInfoManager.h"
|
||||||
|
#include "xpt_struct.h"
|
||||||
|
#include "xptcall.h"
|
||||||
|
|
||||||
|
|
||||||
#define NS_WSDL_SCHEMA_NAMESPACE "http://www.w3.org/2001/XMLSchema"
|
#define NS_WSDL_SCHEMA_NAMESPACE "http://www.w3.org/2001/XMLSchema"
|
||||||
#define NS_WSDL_NAMESPACE "http://schemas.xmlsoap.org/wsdl/"
|
#define NS_WSDL_NAMESPACE "http://schemas.xmlsoap.org/wsdl/"
|
||||||
|
@ -184,6 +192,83 @@ protected:
|
||||||
nsCOMPtr<nsIWSDLBinding> mBinding;
|
nsCOMPtr<nsIWSDLBinding> mBinding;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define NS_WSDLINTERFACEINFOID_ISUPPORTS 0
|
||||||
|
// The boundary number should be incremented as reserved
|
||||||
|
// ids are added.
|
||||||
|
#define NS_WSDLINTERFACEINFOID_RESERVED_BOUNDARY 1
|
||||||
|
|
||||||
|
class nsWSDLInterfaceSet : public nsIInterfaceInfoManager,
|
||||||
|
public nsSupportsWeakReference
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsWSDLInterfaceSet();
|
||||||
|
virtual ~nsWSDLInterfaceSet();
|
||||||
|
|
||||||
|
NS_DECL_ISUPPORTS
|
||||||
|
NS_DECL_NSIINTERFACEINFOMANAGER
|
||||||
|
|
||||||
|
nsresult AppendInterface(nsIInterfaceInfo* aInfo, PRUint16* aIndex);
|
||||||
|
nsresult GetInterfaceAt(PRUint16 aIndex, nsIInterfaceInfo** aInfo);
|
||||||
|
PRUint16 Count();
|
||||||
|
XPTArena* GetArena() { return mArena; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsSupportsArray mInterfaces;
|
||||||
|
XPTArena* mArena;
|
||||||
|
};
|
||||||
|
|
||||||
|
class nsWSDLInterfaceInfo : public nsIInterfaceInfo,
|
||||||
|
public nsSupportsWeakReference
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsWSDLInterfaceInfo(nsAReadableCString& aName,
|
||||||
|
const nsIID& aIID,
|
||||||
|
nsWSDLInterfaceSet* aInterfaceSet);
|
||||||
|
virtual ~nsWSDLInterfaceInfo();
|
||||||
|
|
||||||
|
NS_DECL_ISUPPORTS
|
||||||
|
NS_DECL_NSIINTERFACEINFO
|
||||||
|
|
||||||
|
void AddMethod(XPTMethodDescriptor* aMethod);
|
||||||
|
void AddAdditionalType(XPTTypeDescriptor* aType);
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsresult GetTypeInArray(const nsXPTParamInfo* param,
|
||||||
|
uint16 dimension,
|
||||||
|
const XPTTypeDescriptor** type);
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsCString mName;
|
||||||
|
nsIID mIID;
|
||||||
|
nsVoidArray mMethodDescriptors;
|
||||||
|
nsVoidArray mAdditionalTypes;
|
||||||
|
nsWSDLInterfaceSet* mInterfaceSet;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
class nsWSDLServiceProxy : public nsXPTCStubBase,
|
||||||
|
public nsIWSDLServiceProxy,
|
||||||
|
public nsIClassInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsWSDLServiceProxy();
|
||||||
|
virtual ~nsWSDLServiceProxy();
|
||||||
|
|
||||||
|
NS_DECL_ISUPPORTS
|
||||||
|
NS_DECL_NSIWSDLSERVICEPROXY
|
||||||
|
NS_DECL_NSICLASSINFO
|
||||||
|
|
||||||
|
NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo** info);
|
||||||
|
NS_IMETHOD CallMethod(PRUint16 methodIndex,
|
||||||
|
const nsXPTMethodInfo* info,
|
||||||
|
nsXPTCMiniVariant* params);
|
||||||
|
|
||||||
|
private:
|
||||||
|
nsWSDLInterfaceSet* mInterfaceSet;
|
||||||
|
nsCOMPtr<nsIInterfaceInfo> mInterfaceInfo;
|
||||||
|
nsCOMPtr<nsIWSDLPort> mPort;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NS_WSDLPORT_CID \
|
#define NS_WSDLPORT_CID \
|
||||||
{ /* c1dfb250-0c19-4339-8211-24eabc0103e5 */ \
|
{ /* c1dfb250-0c19-4339-8211-24eabc0103e5 */ \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче