wsdlpull
1.23
Toggle main menu visibility
Loading...
Searching...
No Matches
src
wsdlparser
WsdlExtension.h
Go to the documentation of this file.
1
/*
2
* wsdlpull - A C++ parser for WSDL (Web services description language)
3
* Copyright (C) 2005-2007 Vivek Krishna
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Library General Public License for more details.
14
*
15
* You should have received a copy of the GNU Library General Public
16
* License along with this library; if not, write to the Free
17
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
*
19
*
20
*/
21
22
#ifndef _WSDLEXTENSIONH
23
#define _WSDLEXTENSIONH
24
25
#include "
xmlpull/XmlPullParser.h
"
26
#include "
schemaparser/SchemaParser.h
"
27
#include "
xmlpull/wsdlpull_export.h
"
28
29
using namespace
Schema
;
30
31
#if (defined _WIN32) && !(defined SCHEMADIR)
32
#define SCHEMADIR "src/schemas/"
33
#endif
34
35
36
namespace
WsdlPull
{
37
38
class
WsdlParser
;
39
40
//This class is the generic interface that all extensibility namespaces must derive from
41
class
WSDLPULL_EXPORT
WsdlExtension
42
{
43
public
:
44
WsdlExtension
(){};
45
virtual
~WsdlExtension
(){};
46
virtual
std::string
getNamespace
()
const
= 0;
47
48
//returns the namespace Uri of the wsdl extensibility elements that it can handle.
49
virtual
void
setNamespacePrefix
(std::string) = 0;
50
virtual
std::string
getNamespacePrefix
()
const
= 0;
51
52
//does this extensibility handler handle the given namespace
53
virtual
bool
isNamespaceHandler
(
const
std::string &)
const
= 0;
54
virtual
std::string
getExtensibilitySchema
()
const
= 0;
55
virtual
void
setSchemaParser
(
SchemaParser
* spe) = 0;
56
virtual
void
setSchemaPath
(
const
std::string &
/* schemaPath */
){};
57
58
// parent is the Wsdl parent element type under which the extensibility element has come
59
// the id returned must be non zero if the extensibility handler has handled the element correctly
60
virtual
int
handleElement
(
int
parent,
XmlPullParser
*) = 0;
61
62
//attName is the extensibility attribute
63
// the id returned must be non zero if the extensibility handler has handled the attribute correctly
64
virtual
int
handleAttribute
(
int
parent, std::string attName,
65
XmlPullParser
*) = 0;
66
67
//returns a valid extensibilty element
68
//must return a non zero integer if the element was present in the wsdl
69
virtual
int
getElementName
(
int
id
)
const
= 0;
70
71
//returns a valid extensibility attribute
72
//must return a non zero integer if the attribute was present in the wsdl
73
virtual
int
getAttributeName
(
int
id
)
const
= 0;
74
75
//this is the start of all ids that must be used for elems/attributes in this namespace
76
virtual
void
setStartId
(
int
) = 0;
77
virtual
int
getStartId
()
const
= 0;
78
virtual
void
setWsdlParser
(
WsdlParser
*){};
79
virtual
WsdlParser
*
wsdlParser
()
const
{
return
0;} ;
80
81
//this method returns true if the Wsdl file had extensibility elements parsed by this extensibility handler
82
virtual
bool
wasUsed
()
const
= 0;
83
};
84
}
85
#endif
/* */
SchemaParser.h
XmlPullParser.h
Schema::SchemaParser
Definition
SchemaParser.h:43
WsdlPull::WsdlExtension::setSchemaPath
virtual void setSchemaPath(const std::string &)
Definition
WsdlExtension.h:56
WsdlPull::WsdlExtension::isNamespaceHandler
virtual bool isNamespaceHandler(const std::string &) const =0
WsdlPull::WsdlExtension::handleAttribute
virtual int handleAttribute(int parent, std::string attName, XmlPullParser *)=0
WsdlPull::WsdlExtension::setWsdlParser
virtual void setWsdlParser(WsdlParser *)
Definition
WsdlExtension.h:78
WsdlPull::WsdlExtension::getExtensibilitySchema
virtual std::string getExtensibilitySchema() const =0
WsdlPull::WsdlExtension::setSchemaParser
virtual void setSchemaParser(SchemaParser *spe)=0
WsdlPull::WsdlExtension::setStartId
virtual void setStartId(int)=0
WsdlPull::WsdlExtension::WsdlExtension
WsdlExtension()
Definition
WsdlExtension.h:44
WsdlPull::WsdlExtension::getElementName
virtual int getElementName(int id) const =0
WsdlPull::WsdlExtension::getNamespace
virtual std::string getNamespace() const =0
WsdlPull::WsdlExtension::getStartId
virtual int getStartId() const =0
WsdlPull::WsdlExtension::getAttributeName
virtual int getAttributeName(int id) const =0
WsdlPull::WsdlExtension::handleElement
virtual int handleElement(int parent, XmlPullParser *)=0
WsdlPull::WsdlExtension::~WsdlExtension
virtual ~WsdlExtension()
Definition
WsdlExtension.h:45
WsdlPull::WsdlExtension::wsdlParser
virtual WsdlParser * wsdlParser() const
Definition
WsdlExtension.h:79
WsdlPull::WsdlExtension::setNamespacePrefix
virtual void setNamespacePrefix(std::string)=0
WsdlPull::WsdlExtension::getNamespacePrefix
virtual std::string getNamespacePrefix() const =0
WsdlPull::WsdlExtension::wasUsed
virtual bool wasUsed() const =0
WsdlPull::WsdlParser
Definition
WsdlParser.h:44
XmlPullParser
Definition
XmlPullParser.h:47
Schema
Definition
Annotation.h:27
WsdlPull
Definition
Binding.h:27
wsdlpull_export.h
WSDLPULL_EXPORT
#define WSDLPULL_EXPORT
Definition
wsdlpull_export.h:30
Generated by
1.17.0