зеркало из https://github.com/mozilla/pjs.git
Work in progress on WSDL component. This is not yet part of the build.
This commit is contained in:
Родитель
332f58b128
Коммит
7cb16a66d2
|
@ -0,0 +1,111 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIWSDLService;
|
||||
interface nsIWSDLPort;
|
||||
interface nsIWSDLOperation;
|
||||
interface nsIWSDLMessage;
|
||||
interface nsIWSDLPart;
|
||||
interface nsIDOMElement;
|
||||
interface nsISchemaComponent;
|
||||
interface nsISchema;
|
||||
|
||||
[scriptable, uuid(0458dac0-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLService : nsISupports {
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
readonly attribute PRUint32 portCount;
|
||||
nsIWSDLPort getPort(in PRUint32 index);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac1-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLPort : nsISupports {
|
||||
const unsigned short STYLE_RPC = 1;
|
||||
const unsigned short STYLE_DOCUMENT = 2;
|
||||
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
|
||||
readonly attribute AString bindingName;
|
||||
readonly attribute unsigned short style;
|
||||
readonly attribute AString transport;
|
||||
|
||||
readonly attribute PRUint32 operationCount;
|
||||
nsIWSDLOperation getOperation(in PRUint32 index);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac2-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLOperation : nsISupports {
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
|
||||
readonly attribute unsigned short style;
|
||||
readonly attribute AString soapAction;
|
||||
|
||||
readonly attribute nsIWSDLMessage input;
|
||||
readonly attribute nsIWSDLMessage output;
|
||||
readonly attribute nsIWSDLMessage fault;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac3-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLMessage : nsISupports {
|
||||
const unsigned short LOCATION_SOAP_BODY = 1;
|
||||
const unsigned short LOCATION_SOAP_HEADER = 2;
|
||||
const unsigned short LOCATION_SOAP_FAULT = 3;
|
||||
|
||||
const unsigned short USE_LITERAL = 1;
|
||||
const unsigned short USE_ENCODED = 2;
|
||||
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
|
||||
readonly attribute unsigned short location;
|
||||
readonly attribute unsigned short use;
|
||||
readonly attribute AString encodingStyle;
|
||||
readonly attribute AString namespace;
|
||||
|
||||
readonly attribute PRUint32 partCount;
|
||||
nsIWSDLPart getPart(in PRUint32 index);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac4-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLPart : nsISupports {
|
||||
readonly attribute AString name;
|
||||
|
||||
readonly attribute AString type;
|
||||
readonly attribute AString elementName;
|
||||
|
||||
/**
|
||||
* The schema component that corresponds to this part. If the
|
||||
* type attribute is used, this is a nsISchemaType. If the
|
||||
* elementName attribute is used, it is a nsISchemaElement.
|
||||
*/
|
||||
readonly attribute nsISchemaComponent schemaComponent;
|
||||
|
||||
/**
|
||||
* The containing schema for the schemaComponent
|
||||
*/
|
||||
readonly attribute nsISchema schema;
|
||||
};
|
|
@ -0,0 +1,43 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIWSDLService;
|
||||
interface nsIURI;
|
||||
interface nsIWSDLLoaderListener;
|
||||
|
||||
[scriptable, uuid(0458dac5-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLLoader : nsISupports {
|
||||
nsIWSDLService load(in nsIURI wsdlURI);
|
||||
void loadAsync(in nsIURI wsdlURI, in nsIWSDLLoaderListener listener);
|
||||
nsISupports createServiceProxy(in nsIWSDLService service,
|
||||
in wstring nameSpace);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac6-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLLoaderListener : nsISupports {
|
||||
void onError(in PRInt32 status,
|
||||
in wstring statusMessage);
|
||||
void onComplete(in nsIWSDLService service);
|
||||
};
|
|
@ -0,0 +1,31 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = xmlextras
|
||||
LIBRARY_NAME = xmlextraswsdl_s
|
||||
REQUIRES = xpcom string dom caps necko xpconnect
|
||||
|
||||
CPPSRCS = \
|
||||
nsWSDLLoader.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a
|
||||
# static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,54 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#include "nsWSDLPrivate.h"
|
||||
#include "nsIXMLHttpRequest.h"
|
||||
|
||||
nsWSDLLoader::nsWSDLLoader()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsWSDLLoader::~nsWSDLLoader()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsWSDLLoader, nsIWSDLLoader)
|
||||
|
||||
/* nsIWSDLService loadService (in nsIURI wsdlURI); */
|
||||
NS_IMETHODIMP
|
||||
nsWSDLLoader::LoadService(nsIURI *wsdlURI,
|
||||
nsIWSDLService **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsISupports createServiceProxy (in nsIWSDLService service, in wstring nameSpace); */
|
||||
NS_IMETHODIMP
|
||||
nsWSDLLoader::CreateServiceProxy(nsIWSDLService *service,
|
||||
const PRUnichar *nameSpace,
|
||||
nsISupports **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#ifndef __nsWSDLPrivate_h__
|
||||
#define __nsWSDLPrivate_h__
|
||||
|
||||
#include "nsIWSDL.h"
|
||||
#include "nsIWSDLLoader.h"
|
||||
|
||||
// DOM Includes
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
// XPCOM Includes
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsSupportsArray.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsWSDLLoader : public nsIWSDLLoader {
|
||||
public:
|
||||
nsWSDLLoader();
|
||||
virtual ~nsWSDLLoader();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLLOADER
|
||||
};
|
||||
|
||||
class nsWSDLService : public nsIWSDLService {
|
||||
public:
|
||||
nsWSDLService();
|
||||
virtual ~nsWSDLService();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLSERVICE
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD AddPort(nsIWSDLPort* aPort);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
nsSupportsArray mPorts;
|
||||
};
|
||||
|
||||
class nsWSDLPort : public nsIWSDLPort {
|
||||
public:
|
||||
nsWSDLPort();
|
||||
virtual ~nsWSDLPort();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLPORT
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD SetBindingInfo(const nsAReadable& aBindingName,
|
||||
PRUint16 aStyle,
|
||||
const nsAReadable& aTransport);
|
||||
NS_IMETHOD AddOperation(nsIWSDLOperation* aOperation);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
nsString mBindingName;
|
||||
PRUint16 mStyle;
|
||||
nsString mTransport;
|
||||
nsSupportsArray mOperations;
|
||||
};
|
||||
|
||||
class nsWSDLOperation : public nsIWSDLOperation {
|
||||
public:
|
||||
nsWSDLOperation();
|
||||
virtual ~nsWSDLOperation();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLOPERATION
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD SetBindingInfo(PRUint16 aStyle,
|
||||
const nsAReadable& aSoapAction);
|
||||
NS_IMETHOD SetInputMessage(nsIWSDLMessage* aInputMessage);
|
||||
NS_IMETHOD SetOutputMessage(nsIWSDLMessage* aOutputMessage);
|
||||
NS_IMETHOD SetFaultMessage(nsIWSDLMessage* aFaultMessage);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
PRUint16 mStyle;
|
||||
nsString mSoapAction;
|
||||
nsCOMPtr<nsIWSDLMessage> mInputMessage;
|
||||
nsCOMPtr<nsIWSDLMessage> mOutputMessage;
|
||||
nsCOMPtr<nsIWSDLMessage> mFaultMessage;
|
||||
};
|
||||
|
||||
class nsWSDLMessage : public nsIWSDLMessage {
|
||||
public:
|
||||
nsWSDLMessage();
|
||||
virtual ~nsWSDLMessage();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLMESSAGE
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD SetBindingInfo(PRUint16 aLocation, PRUint16 aUse,
|
||||
const nsAReadable& aEncodingStyle,
|
||||
const nsAReadable& aNamespace);
|
||||
NS_IMETHOD AddPart(nsIWSDLPart* aPart);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
PRUint16 mLocation;
|
||||
PRUint16 mUse;
|
||||
nsString mEncodingStyle;
|
||||
nsString mNamespace;
|
||||
nsSupportsArray mParts;
|
||||
};
|
||||
|
||||
class nsWSDLPart : public nsIWSDLPart {
|
||||
public:
|
||||
nsWSDLPart();
|
||||
virtual ~nsWSDLPart();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLPART
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetTypeInfo(const nsAReadable& aType,
|
||||
const nsAReadable& aElementName,
|
||||
nsIDOMElement* aSchema,
|
||||
nsIDOMElement* aSchemaRoot);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsString mType;
|
||||
nsString mElementName;
|
||||
nsCOMPtr<nsIDOMElement> mSchema;
|
||||
nsCOMPtr<nsIDOMElement> mSchemaRoot;
|
||||
};
|
||||
|
||||
#endif // __nsWSDLPrivate_h__
|
|
@ -0,0 +1,36 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = xmlextras
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsIWSDL.idl \
|
||||
.\nsIWSDLLoader.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,30 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
XPIDLSRCS = .\nsIWSDL.idl \
|
||||
.\nsIWSDLLoader.idl \
|
||||
$(NULL)
|
||||
|
||||
MODULE=xmlextras
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
|
@ -0,0 +1,111 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIWSDLService;
|
||||
interface nsIWSDLPort;
|
||||
interface nsIWSDLOperation;
|
||||
interface nsIWSDLMessage;
|
||||
interface nsIWSDLPart;
|
||||
interface nsIDOMElement;
|
||||
interface nsISchemaComponent;
|
||||
interface nsISchema;
|
||||
|
||||
[scriptable, uuid(0458dac0-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLService : nsISupports {
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
readonly attribute PRUint32 portCount;
|
||||
nsIWSDLPort getPort(in PRUint32 index);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac1-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLPort : nsISupports {
|
||||
const unsigned short STYLE_RPC = 1;
|
||||
const unsigned short STYLE_DOCUMENT = 2;
|
||||
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
|
||||
readonly attribute AString bindingName;
|
||||
readonly attribute unsigned short style;
|
||||
readonly attribute AString transport;
|
||||
|
||||
readonly attribute PRUint32 operationCount;
|
||||
nsIWSDLOperation getOperation(in PRUint32 index);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac2-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLOperation : nsISupports {
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
|
||||
readonly attribute unsigned short style;
|
||||
readonly attribute AString soapAction;
|
||||
|
||||
readonly attribute nsIWSDLMessage input;
|
||||
readonly attribute nsIWSDLMessage output;
|
||||
readonly attribute nsIWSDLMessage fault;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac3-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLMessage : nsISupports {
|
||||
const unsigned short LOCATION_SOAP_BODY = 1;
|
||||
const unsigned short LOCATION_SOAP_HEADER = 2;
|
||||
const unsigned short LOCATION_SOAP_FAULT = 3;
|
||||
|
||||
const unsigned short USE_LITERAL = 1;
|
||||
const unsigned short USE_ENCODED = 2;
|
||||
|
||||
readonly attribute AString name;
|
||||
readonly attribute nsIDOMElement documentation;
|
||||
|
||||
readonly attribute unsigned short location;
|
||||
readonly attribute unsigned short use;
|
||||
readonly attribute AString encodingStyle;
|
||||
readonly attribute AString namespace;
|
||||
|
||||
readonly attribute PRUint32 partCount;
|
||||
nsIWSDLPart getPart(in PRUint32 index);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac4-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLPart : nsISupports {
|
||||
readonly attribute AString name;
|
||||
|
||||
readonly attribute AString type;
|
||||
readonly attribute AString elementName;
|
||||
|
||||
/**
|
||||
* The schema component that corresponds to this part. If the
|
||||
* type attribute is used, this is a nsISchemaType. If the
|
||||
* elementName attribute is used, it is a nsISchemaElement.
|
||||
*/
|
||||
readonly attribute nsISchemaComponent schemaComponent;
|
||||
|
||||
/**
|
||||
* The containing schema for the schemaComponent
|
||||
*/
|
||||
readonly attribute nsISchema schema;
|
||||
};
|
|
@ -0,0 +1,43 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIWSDLService;
|
||||
interface nsIURI;
|
||||
interface nsIWSDLLoaderListener;
|
||||
|
||||
[scriptable, uuid(0458dac5-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLLoader : nsISupports {
|
||||
nsIWSDLService load(in nsIURI wsdlURI);
|
||||
void loadAsync(in nsIURI wsdlURI, in nsIWSDLLoaderListener listener);
|
||||
nsISupports createServiceProxy(in nsIWSDLService service,
|
||||
in wstring nameSpace);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0458dac6-65de-11d5-9b42-00104bdf5339)]
|
||||
interface nsIWSDLLoaderListener : nsISupports {
|
||||
void onError(in PRInt32 status,
|
||||
in wstring statusMessage);
|
||||
void onComplete(in nsIWSDLService service);
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = xmlextras
|
||||
LIBRARY_NAME = xmlextraswsdl_s
|
||||
REQUIRES = xpcom string dom caps necko xpconnect
|
||||
|
||||
CPPSRCS = \
|
||||
nsWSDLLoader.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a
|
||||
# static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,54 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
LIBRARY_NAME=xmlextraswsdl_s
|
||||
MODULE=xmlextras
|
||||
|
||||
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
|
||||
|
||||
CPPSRCS= \
|
||||
nsWSDLLoader.cpp \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsWSDLLoader.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
$(NULL)
|
||||
|
||||
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\js \
|
||||
-I$(PUBLIC)\dom -I$(PUBLIC)\uconv
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
|
@ -0,0 +1,54 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#include "nsWSDLPrivate.h"
|
||||
#include "nsIXMLHttpRequest.h"
|
||||
|
||||
nsWSDLLoader::nsWSDLLoader()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsWSDLLoader::~nsWSDLLoader()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsWSDLLoader, nsIWSDLLoader)
|
||||
|
||||
/* nsIWSDLService loadService (in nsIURI wsdlURI); */
|
||||
NS_IMETHODIMP
|
||||
nsWSDLLoader::LoadService(nsIURI *wsdlURI,
|
||||
nsIWSDLService **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsISupports createServiceProxy (in nsIWSDLService service, in wstring nameSpace); */
|
||||
NS_IMETHODIMP
|
||||
nsWSDLLoader::CreateServiceProxy(nsIWSDLService *service,
|
||||
const PRUnichar *nameSpace,
|
||||
nsISupports **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications. Portions created by Netscape Communications are
|
||||
* Copyright (C) 2001 by Netscape Communications. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
*/
|
||||
|
||||
#ifndef __nsWSDLPrivate_h__
|
||||
#define __nsWSDLPrivate_h__
|
||||
|
||||
#include "nsIWSDL.h"
|
||||
#include "nsIWSDLLoader.h"
|
||||
|
||||
// DOM Includes
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
// XPCOM Includes
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsSupportsArray.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsWSDLLoader : public nsIWSDLLoader {
|
||||
public:
|
||||
nsWSDLLoader();
|
||||
virtual ~nsWSDLLoader();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLLOADER
|
||||
};
|
||||
|
||||
class nsWSDLService : public nsIWSDLService {
|
||||
public:
|
||||
nsWSDLService();
|
||||
virtual ~nsWSDLService();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLSERVICE
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD AddPort(nsIWSDLPort* aPort);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
nsSupportsArray mPorts;
|
||||
};
|
||||
|
||||
class nsWSDLPort : public nsIWSDLPort {
|
||||
public:
|
||||
nsWSDLPort();
|
||||
virtual ~nsWSDLPort();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLPORT
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD SetBindingInfo(const nsAReadable& aBindingName,
|
||||
PRUint16 aStyle,
|
||||
const nsAReadable& aTransport);
|
||||
NS_IMETHOD AddOperation(nsIWSDLOperation* aOperation);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
nsString mBindingName;
|
||||
PRUint16 mStyle;
|
||||
nsString mTransport;
|
||||
nsSupportsArray mOperations;
|
||||
};
|
||||
|
||||
class nsWSDLOperation : public nsIWSDLOperation {
|
||||
public:
|
||||
nsWSDLOperation();
|
||||
virtual ~nsWSDLOperation();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLOPERATION
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD SetBindingInfo(PRUint16 aStyle,
|
||||
const nsAReadable& aSoapAction);
|
||||
NS_IMETHOD SetInputMessage(nsIWSDLMessage* aInputMessage);
|
||||
NS_IMETHOD SetOutputMessage(nsIWSDLMessage* aOutputMessage);
|
||||
NS_IMETHOD SetFaultMessage(nsIWSDLMessage* aFaultMessage);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
PRUint16 mStyle;
|
||||
nsString mSoapAction;
|
||||
nsCOMPtr<nsIWSDLMessage> mInputMessage;
|
||||
nsCOMPtr<nsIWSDLMessage> mOutputMessage;
|
||||
nsCOMPtr<nsIWSDLMessage> mFaultMessage;
|
||||
};
|
||||
|
||||
class nsWSDLMessage : public nsIWSDLMessage {
|
||||
public:
|
||||
nsWSDLMessage();
|
||||
virtual ~nsWSDLMessage();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLMESSAGE
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetDocumentationElement(nsIDOMElement* aElement);
|
||||
NS_IMETHOD SetBindingInfo(PRUint16 aLocation, PRUint16 aUse,
|
||||
const nsAReadable& aEncodingStyle,
|
||||
const nsAReadable& aNamespace);
|
||||
NS_IMETHOD AddPart(nsIWSDLPart* aPart);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsCOMPtr<nsIDOMElement> mDocumentationElement;
|
||||
PRUint16 mLocation;
|
||||
PRUint16 mUse;
|
||||
nsString mEncodingStyle;
|
||||
nsString mNamespace;
|
||||
nsSupportsArray mParts;
|
||||
};
|
||||
|
||||
class nsWSDLPart : public nsIWSDLPart {
|
||||
public:
|
||||
nsWSDLPart();
|
||||
virtual ~nsWSDLPart();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWSDLPART
|
||||
|
||||
NS_IMETHOD SetName(const nsAReadable& aName);
|
||||
NS_IMETHOD SetTypeInfo(const nsAReadable& aType,
|
||||
const nsAReadable& aElementName,
|
||||
nsIDOMElement* aSchema,
|
||||
nsIDOMElement* aSchemaRoot);
|
||||
|
||||
protected:
|
||||
nsString mName;
|
||||
nsString mType;
|
||||
nsString mElementName;
|
||||
nsCOMPtr<nsIDOMElement> mSchema;
|
||||
nsCOMPtr<nsIDOMElement> mSchemaRoot;
|
||||
};
|
||||
|
||||
#endif // __nsWSDLPrivate_h__
|
Загрузка…
Ссылка в новой задаче