wsdlpull
1.23
|
#include <WsdlParser.h>
Public Types | |
enum | { NONE, START, DEFINITION, DOCUMENTATION, ANNOTATION, IMPORT, SCHEMA, TYPES, MESSAGE, PART, PORT_TYPE, OPERATION, INPUT, OUTPUT, FAULT, BINDING, EXTENSIBILITY, SERVICE, PORT, END } |
Public Member Functions | |
void | setSchemaPath (const std::string &schemaPath) |
const SchemaParser * | getSchemaParser (int schemaId) const |
Constructors and Destructors | |
WsdlParser (std::istream &in=std::cin, std::ostream &out=std::cout, const std::string &schemaPath="") | |
WsdlParser (const std::string &Uri, std::ostream &out=std::cout, const std::string &schemaPath="") | |
~WsdlParser () | |
methods used for parsing | |
int | getNextElement () |
int | getEventType () |
Extensibility handler methods | |
void | addExtensibilityHandler (WsdlExtension *ext) |
WsdlExtension * | getExtensibilityHandler (const std::string &ns) |
WsdlExtension * | getExtensibilityHandler (int extId) |
Miscellaneous methods | |
bool | setFeature (int feature_id) |
Various Getter methods | |
typedef std::list< Service * >::iterator | ServiceIterator |
static bool | useLocalSchema_ =true |
std::string | getNamespace (void) |
std::string | getName () |
const std::string * | getDocumentation () |
const Binding * | getBinding () |
const Binding * | getBinding (const Qname &q) |
bool | getBindings (Binding::cBindingIterator &begin, Binding::cBindingIterator &end) const |
const Service * | getService () |
const Service * | getService (const Qname &q) |
void | getServices (ServiceIterator &from, ServiceIterator &to) |
const PortType * | getPortType () |
const PortType * | getPortType (const Qname &q) |
bool | getPortTypes (PortType::cPortTypeIterator &begin, PortType::cPortTypeIterator &end) const |
bool | getOperations (const Qname &portType, Operation::cOpIterator &begin, Operation::cOpIterator &end) |
const Operation * | getOperation (const Qname &portType, const Qname &q) |
const Message * | getMessage () |
const Message * | getMessage (const Qname &q) |
std::list< const Message * > & | getMessages () |
void | getSchemaParsers (std::vector< SchemaParser * >::iterator &from, std::vector< SchemaParser * >::iterator &to) |
int | getNumSchemas () const |
const SchemaParser * | getSchemaParser (std::string targetNamespace) const |
bool | status () const |
std::string | wsdlPath () const |
std::ostream & | logger () |
std::string & | getWsdlFileName () |
Definition at line 43 of file WsdlParser.h.
typedef std::list<Service*>::iterator WsdlPull::WsdlParser::ServiceIterator |
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 150 of file WsdlParser.h.
anonymous enum |
The various states of the Wsdl Parser
Enumerator | |
---|---|
NONE | |
START | |
DEFINITION | |
DOCUMENTATION | |
ANNOTATION | |
IMPORT | |
SCHEMA | |
TYPES | |
MESSAGE | |
PART | |
PORT_TYPE | |
OPERATION | |
INPUT | |
OUTPUT | |
FAULT | |
BINDING | |
EXTENSIBILITY | |
SERVICE | |
PORT | |
END |
Definition at line 298 of file WsdlParser.h.
WsdlPull::WsdlParser::WsdlParser | ( | std::istream & | in = std::cin , |
std::ostream & | out = std::cout , |
||
const std::string & | schemaPath = "" |
||
) |
The default constructor for WsdlParser
input | stream for the wsdl file |
output | stream for any error outputs |
schemaPath | path to directory containing XML schema files |
Definition at line 37 of file WsdlParser.cpp.
WsdlPull::WsdlParser::WsdlParser | ( | const std::string & | Uri, |
std::ostream & | out = std::cout , |
||
const std::string & | schemaPath = "" |
||
) |
The default constructor for WsdlParser
input | stream for the wsdl file |
output | stream for any error outputs |
schemaPath | path to directory containing XML schema files |
Definition at line 52 of file WsdlParser.cpp.
References addExtensibilityHandler(), FEATURE_PROCESS_NAMESPACES, XmlUtils::fetchUri(), Schema::SchemaParser::parseSchemaTag(), XmlPullParser::require(), XmlPullParser::setFeature(), WsdlPull::Soap::SOAP12, XmlPullParser::START_DOCUMENT, useLocalSchema_, and WsdlPull::wsdlUri.
WsdlPull::WsdlParser::~WsdlParser | ( | ) |
The default constructor for WsdlParser
input | stream for the wsdl file |
output | stream for any error outputs |
schemaPath | path to directory containing XML schema files |
Definition at line 125 of file WsdlParser.cpp.
References oslink::directory::next().
void WsdlPull::WsdlParser::setSchemaPath | ( | const std::string & | schemaPath | ) |
setSchemaPath Set path to location of XML schema files, used by parser.
Definition at line 1608 of file WsdlParser.cpp.
|
inline |
getNextElement processes the next Wsdl ELement in the stream and returns the type of the root Wsdl element parsed.
Definition at line 426 of file WsdlParser.h.
Referenced by WsdlPull::isValidWsdlElement(), printPortTypes(), and WsdlPull::WsdlInvoker::WsdlInvoker().
|
inline |
getEventType returns the type Wsdl element parsed.
Definition at line 457 of file WsdlParser.h.
Referenced by printPortTypes().
|
inline |
getTargetNamespace
Definition at line 441 of file WsdlParser.h.
Referenced by getBinding(), getExtensibilityHandler(), getPortType(), getSchemaParser(), getService(), WsdlPull::WsdlInvoker::getServiceEndPoint(), and WsdlPull::isValidWsdlElement().
|
inline |
|
inline |
getDocumentation Returns the documentation string for the WSDL file This method must be called after getEventType
returns DOCUMENT
Definition at line 434 of file WsdlParser.h.
Referenced by WsdlPull::WsdlInvoker::getDocumentation().
const Binding * WsdlPull::WsdlParser::getBinding | ( | ) |
getBinding .This method must be called after getEventType
returns BINDING
WsdlException |
Definition at line 182 of file WsdlParser.cpp.
References BINDING.
Referenced by getExtensibilityHandler().
const Binding * WsdlPull::WsdlParser::getBinding | ( | const Qname & | q | ) |
getBinding .
Qname | refering to the binding element |
WsdlException |
Definition at line 206 of file WsdlParser.cpp.
References Qname::getLocalName(), Qname::getNamespace(), getNamespace(), Qname::getPrefix(), and Qname::setNamespace().
bool WsdlPull::WsdlParser::getBindings | ( | Binding::cBindingIterator & | begin, |
Binding::cBindingIterator & | end | ||
) | const |
getBindings
WsdlException |
Definition at line 1573 of file WsdlParser.cpp.
const Service * WsdlPull::WsdlParser::getService | ( | ) |
getService .This method must be called after getEventType
returns SERVICE
WsdlException |
Definition at line 225 of file WsdlParser.cpp.
References SERVICE.
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 239 of file WsdlParser.cpp.
References Qname::getLocalName(), Qname::getNamespace(), getNamespace(), Qname::getPrefix(), and Qname::setNamespace().
void WsdlPull::WsdlParser::getServices | ( | ServiceIterator & | from, |
ServiceIterator & | to | ||
) |
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 259 of file WsdlParser.cpp.
const PortType * WsdlPull::WsdlParser::getPortType | ( | ) |
getPortType .This method must be called after getEventType
returns PORT_TYPE
WsdlException |
Definition at line 269 of file WsdlParser.cpp.
References PORT_TYPE.
Referenced by getExtensibilityHandler(), getOperation(), getOperations(), and printPortTypes().
getPortType
Qname | refering to the port type element |
WsdlException |
Definition at line 284 of file WsdlParser.cpp.
References Qname::getLocalName(), getNamespace(), and Qname::getPrefix().
bool WsdlPull::WsdlParser::getPortTypes | ( | PortType::cPortTypeIterator & | begin, |
PortType::cPortTypeIterator & | end | ||
) | const |
getPortTypes
WsdlException |
Definition at line 1587 of file WsdlParser.cpp.
Referenced by WsdlPull::WsdlInvoker::WsdlInvoker().
bool WsdlPull::WsdlParser::getOperations | ( | const Qname & | portType, |
Operation::cOpIterator & | begin, | ||
Operation::cOpIterator & | end | ||
) |
getOperations
Qname | refering to the port type element |
WsdlException |
Definition at line 303 of file WsdlParser.cpp.
References WsdlPull::PortType::getOperations(), and getPortType().
getOperation
WsdlException |
Definition at line 318 of file WsdlParser.cpp.
References Qname::getLocalName(), WsdlPull::WsdlElement::getName(), WsdlPull::PortType::getNumOps(), WsdlPull::PortType::getOperation(), and getPortType().
const Message * WsdlPull::WsdlParser::getMessage | ( | ) |
getMessage .This method must be called after getEventType
returns MESSAGE
WsdlException |
Definition at line 337 of file WsdlParser.cpp.
References Qname::getLocalName(), MESSAGE, and WsdlPull::WsdlElement::setName().
Referenced by WsdlPull::Soap::handleAttribute(), and WsdlPull::isValidWsdlElement().
getMessage .
Qname | of the message element |
WsdlException |
Definition at line 367 of file WsdlParser.cpp.
References Qname::getLocalName(), and Qname::getNamespace().
|
inline |
getMessages
WsdlException |
Definition at line 465 of file WsdlParser.h.
void WsdlPull::WsdlParser::getSchemaParsers | ( | std::vector< SchemaParser * >::iterator & | from, |
std::vector< SchemaParser * >::iterator & | to | ||
) |
getSchemaParsers
WsdlException |
Definition at line 1534 of file WsdlParser.cpp.
References WsdlPull::WsdlException::col, XmlPullParser::getColumnNumber(), XmlPullParser::getLineNumber(), WsdlPull::WsdlException::line, and WsdlPull::WsdlException::WsdlState.
int WsdlPull::WsdlParser::getNumSchemas | ( | ) | const |
getNumSchemas
WsdlException |
Definition at line 1601 of file WsdlParser.cpp.
const SchemaParser * WsdlPull::WsdlParser::getSchemaParser | ( | std::string | targetNamespace | ) | const |
getSchemaParser
target | namespace of the schema |
WsdlException |
Definition at line 385 of file WsdlParser.cpp.
References getNamespace(), and Schema::SchemaUri.
Referenced by WsdlPull::WsdlInvoker::buildXmlTree(), and WsdlPull::WsdlInvoker::getServiceEndPoint().
|
inline |
to query the status of wsdl parsing
Definition at line 489 of file WsdlParser.h.
Referenced by WsdlPull::WsdlInvoker::WsdlInvoker().
|
inline |
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 483 of file WsdlParser.h.
|
inline |
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 496 of file WsdlParser.h.
Referenced by WsdlPull::Soap::isSoapHeader().
|
inline |
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 255 of file WsdlParser.h.
void WsdlPull::WsdlParser::addExtensibilityHandler | ( | WsdlExtension * | ext | ) |
addExtensibilityHandler Registers an extensibility handler for Wsdl extensibility namespaces
pointer | to the instance of WsdlExtension |
WsdlException |
Definition at line 196 of file WsdlParser.cpp.
Referenced by WsdlParser().
WsdlExtension * WsdlPull::WsdlParser::getExtensibilityHandler | ( | const std::string & | ns | ) |
getExtensibilityHandler returns theextensibility handler for the namespaces
namespace |
WsdlException |
Definition at line 1261 of file WsdlParser.cpp.
Referenced by WsdlPull::WsdlElement::getExtensibilityAttributes(), WsdlPull::WsdlElement::getExtensibilityElements(), getExtensibilityHandler(), WsdlPull::WsdlInvoker::getServiceEndPoint(), and WsdlPull::isValidWsdlElement().
WsdlExtension * WsdlPull::WsdlParser::getExtensibilityHandler | ( | int | extId | ) |
addExtensibilityHandler Registers an extensibility handler for Wsdl extensibility namespaces
pointer | to the instance of WsdlExtension |
WsdlException |
Definition at line 1271 of file WsdlParser.cpp.
References WsdlPull::Service::addPort(), BINDING, DOCUMENTATION, EXTENSIBILITY, FAULT, XmlPullParser::getAttributeCount(), XmlPullParser::getAttributeName(), XmlPullParser::getAttributePrefix(), XmlPullParser::getAttributeValue(), getBinding(), getExtensibilityHandler(), Qname::getNamespace(), WsdlPull::WsdlExtension::getNamespace(), getNamespace(), WsdlPull::PortType::getOperation(), getPortType(), Qname::getPrefix(), INPUT, OPERATION, OUTPUT, PORT, Schema::SchemaUri, SERVICE, WsdlPull::WsdlElement::setDocumentation(), WsdlPull::WsdlElement::setName(), and Qname::setNamespace().
bool WsdlPull::WsdlParser::setFeature | ( | int | feature_id | ) |
setFeature enables one of the features of the parser
|
inline |
getSchemaParser
index | of the schema parser .index:0..getNumSchemas-1 |
WsdlException |
Definition at line 476 of file WsdlParser.h.
|
static |
getService.
Qname | refering to the service element |
WsdlException |
Definition at line 259 of file WsdlParser.h.
Referenced by WsdlPull::Soap::getEncodingSchema(), WsdlPull::Soap::getExtensibilitySchema(), main(), and WsdlParser().