wsdlpull 1.23
List of all members
WsdlPull::WsdlParser Class Reference

#include <WsdlParser.h>

Public Member Functions

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 ()
 
void setSchemaPath (const std::string &schemaPath)
 
methods used for parsing
int getNextElement ()
 
int getEventType ()
 
Extensibility handler methods
void addExtensibilityHandler (WsdlExtension *ext)
 
WsdlExtensiongetExtensibilityHandler (const std::string &ns)
 
WsdlExtensiongetExtensibilityHandler (int extId)
 

Miscellaneous methods

enum  {
  NONE , START , DEFINITION , DOCUMENTATION ,
  ANNOTATION , IMPORT , SCHEMA , TYPES ,
  MESSAGE , PART , PORT_TYPE , OPERATION ,
  INPUT , OUTPUT , FAULT , BINDING ,
  EXTENSIBILITY , SERVICE , PORT , END
}
 
bool setFeature (int feature_id)
 
const SchemaParsergetSchemaParser (int schemaId) const
 

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 BindinggetBinding ()
 
const BindinggetBinding (const Qname &q)
 
bool getBindings (Binding::cBindingIterator &begin, Binding::cBindingIterator &end) const
 
const ServicegetService ()
 
const ServicegetService (const Qname &q)
 
void getServices (ServiceIterator &from, ServiceIterator &to)
 
const PortTypegetPortType ()
 
const PortTypegetPortType (const Qname &q)
 
bool getPortTypes (PortType::cPortTypeIterator &begin, PortType::cPortTypeIterator &end) const
 
bool getOperations (const Qname &portType, Operation::cOpIterator &begin, Operation::cOpIterator &end)
 
const OperationgetOperation (const Qname &portType, const Qname &q)
 
const MessagegetMessage ()
 
const MessagegetMessage (const Qname &q)
 
std::list< const Message * > & getMessages ()
 
void getSchemaParsers (std::vector< SchemaParser * >::iterator &from, std::vector< SchemaParser * >::iterator &to)
 
int getNumSchemas () const
 
const SchemaParsergetSchemaParser (std::string targetNamespace) const
 
bool status () const
 
std::string wsdlPath () const
 
std::ostream & logger ()
 
std::string & getWsdlFileName ()
 

Detailed Description

Definition at line 43 of file WsdlParser.h.

Member Typedef Documentation

◆ ServiceIterator

typedef std::list<Service*>::iterator WsdlPull::WsdlParser::ServiceIterator

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 150 of file WsdlParser.h.

Member Enumeration Documentation

◆ anonymous enum

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.

Constructor & Destructor Documentation

◆ WsdlParser() [1/2]

WsdlPull::WsdlParser::WsdlParser ( std::istream &  in = std::cin,
std::ostream &  out = std::cout,
const std::string &  schemaPath = "" 
)

The default constructor for WsdlParser

Parameters
inputstream for the wsdl file
outputstream for any error outputs
schemaPathpath to directory containing XML schema files

Definition at line 37 of file WsdlParser.cpp.

◆ WsdlParser() [2/2]

WsdlPull::WsdlParser::WsdlParser ( const std::string &  Uri,
std::ostream &  out = std::cout,
const std::string &  schemaPath = "" 
)

The default constructor for WsdlParser

Parameters
inputstream for the wsdl file
outputstream for any error outputs
schemaPathpath to directory containing XML schema files

Definition at line 52 of file WsdlParser.cpp.

References XmlUtils::fetchUri().

◆ ~WsdlParser()

WsdlPull::WsdlParser::~WsdlParser ( )

The default constructor for WsdlParser

Parameters
inputstream for the wsdl file
outputstream for any error outputs
schemaPathpath to directory containing XML schema files

Definition at line 125 of file WsdlParser.cpp.

References oslink::directory::next().

Member Function Documentation

◆ setSchemaPath()

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.

◆ getNextElement()

int WsdlPull::WsdlParser::getNextElement ( )
inline

getNextElement processes the next Wsdl ELement in the stream and returns the type of the root Wsdl element parsed.

Returns
one of START,DEFINITION,DOCUMENTATION,ANNOTATION, TYPES,MESSAGE,PORT_TYPE,BINDING,SERVICE,IMPORT

Definition at line 426 of file WsdlParser.h.

Referenced by printPortTypes(), and WsdlPull::WsdlInvoker::WsdlInvoker().

◆ getEventType()

int WsdlPull::WsdlParser::getEventType ( )
inline

getEventType returns the type Wsdl element parsed.

Returns
one of the Wsdl event types

Definition at line 457 of file WsdlParser.h.

Referenced by printPortTypes().

◆ getNamespace()

std::string WsdlPull::WsdlParser::getNamespace ( void  )
inline

getTargetNamespace

Returns
target namespace of the wsdl document

Definition at line 441 of file WsdlParser.h.

Referenced by getBinding(), getPortType(), getSchemaParser(), and getService().

◆ getName()

std::string WsdlPull::WsdlParser::getName ( )
inline

getName

Returns
name of the wsdl document

Definition at line 448 of file WsdlParser.h.

◆ getDocumentation()

const std::string * WsdlPull::WsdlParser::getDocumentation ( )
inline

getDocumentation Returns the documentation string for the WSDL file This method must be called after getEventType returns DOCUMENT

Returns
documentation std::string .

Definition at line 434 of file WsdlParser.h.

Referenced by WsdlPull::WsdlInvoker::getDocumentation().

◆ getBinding() [1/2]

const Binding * WsdlPull::WsdlParser::getBinding ( )

getBinding .This method must be called after getEventType returns BINDING

Returns
reference to the Binding element just parsed.
Exceptions
WsdlException

Definition at line 182 of file WsdlParser.cpp.

References BINDING.

◆ getBinding() [2/2]

const Binding * WsdlPull::WsdlParser::getBinding ( const Qname q)

getBinding .

Parameters
Qnamerefering to the binding element
Returns
reference to the Binding element
Exceptions
WsdlException

Definition at line 206 of file WsdlParser.cpp.

References Qname::getLocalName(), getNamespace(), Qname::getNamespace(), Qname::getPrefix(), and Qname::setNamespace().

◆ getBindings()

bool WsdlPull::WsdlParser::getBindings ( Binding::cBindingIterator begin,
Binding::cBindingIterator end 
) const

getBindings

Returns
iterator to a list of binding elements
Exceptions
WsdlException

Definition at line 1573 of file WsdlParser.cpp.

◆ getService() [1/2]

const Service * WsdlPull::WsdlParser::getService ( )

getService .This method must be called after getEventType returns SERVICE

Returns
reference to the Binding element just parsed.
Exceptions
WsdlException

Definition at line 225 of file WsdlParser.cpp.

References SERVICE.

◆ getService() [2/2]

const Service * WsdlPull::WsdlParser::getService ( const Qname q)

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 239 of file WsdlParser.cpp.

References Qname::getLocalName(), getNamespace(), Qname::getNamespace(), Qname::getPrefix(), and Qname::setNamespace().

◆ getServices()

void WsdlPull::WsdlParser::getServices ( ServiceIterator from,
ServiceIterator to 
)

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 259 of file WsdlParser.cpp.

◆ getPortType() [1/2]

const PortType * WsdlPull::WsdlParser::getPortType ( )

getPortType .This method must be called after getEventType returns PORT_TYPE

Returns
reference to the port type element just parsed.
Exceptions
WsdlException

Definition at line 269 of file WsdlParser.cpp.

References PORT_TYPE.

Referenced by getOperation(), getOperations(), and printPortTypes().

◆ getPortType() [2/2]

const PortType * WsdlPull::WsdlParser::getPortType ( const Qname q)

getPortType

Parameters
Qnamerefering to the port type element
Returns
reference to the port type element
Exceptions
WsdlException

Definition at line 284 of file WsdlParser.cpp.

References Qname::getLocalName(), getNamespace(), and Qname::getPrefix().

◆ getPortTypes()

bool WsdlPull::WsdlParser::getPortTypes ( PortType::cPortTypeIterator begin,
PortType::cPortTypeIterator end 
) const

getPortTypes

Returns
iterators to a container of port types
Exceptions
WsdlException

Definition at line 1587 of file WsdlParser.cpp.

◆ getOperations()

bool WsdlPull::WsdlParser::getOperations ( const Qname portType,
Operation::cOpIterator begin,
Operation::cOpIterator end 
)

getOperations

Parameters
Qnamerefering to the port type element
Returns
true if the port type is found. returns the start and ending iterators to operations
Exceptions
WsdlException

Definition at line 303 of file WsdlParser.cpp.

References WsdlPull::PortType::getOperations(), and getPortType().

◆ getOperation()

const Operation * WsdlPull::WsdlParser::getOperation ( const Qname portType,
const Qname q 
)

getOperation

Parameters
Qnamerefering to the port type element
Qnamerefering to the operation element
Returns
reference to the operation element
Exceptions
WsdlException

Definition at line 318 of file WsdlParser.cpp.

References Qname::getLocalName(), WsdlPull::WsdlElement::getName(), WsdlPull::PortType::getNumOps(), WsdlPull::PortType::getOperation(), and getPortType().

◆ getMessage() [1/2]

const Message * WsdlPull::WsdlParser::getMessage ( )

getMessage .This method must be called after getEventType returns MESSAGE

Returns
reference to the message element just parsed.
Exceptions
WsdlException

Definition at line 337 of file WsdlParser.cpp.

References MESSAGE.

◆ getMessage() [2/2]

const Message * WsdlPull::WsdlParser::getMessage ( const Qname q)

getMessage .

Parameters
Qnameof the message element
Returns
reference to the message element
Exceptions
WsdlException

Definition at line 367 of file WsdlParser.cpp.

References Qname::getLocalName(), and Qname::getNamespace().

◆ getMessages()

std::list< const Message * > & WsdlPull::WsdlParser::getMessages ( )
inline

getMessages

Returns
list of all messages parsed.
Exceptions
WsdlException

Definition at line 465 of file WsdlParser.h.

◆ getSchemaParsers()

void WsdlPull::WsdlParser::getSchemaParsers ( std::vector< SchemaParser * >::iterator &  from,
std::vector< SchemaParser * >::iterator &  to 
)

getSchemaParsers

Returns
iterators to list of schema parsers the first element is the start of the list second being the end of it
Exceptions
WsdlException

Definition at line 1534 of file WsdlParser.cpp.

◆ getNumSchemas()

int WsdlPull::WsdlParser::getNumSchemas ( ) const

getNumSchemas

Returns
number of schemas in the wsdl document
Exceptions
WsdlException

Definition at line 1601 of file WsdlParser.cpp.

◆ getSchemaParser() [1/2]

const SchemaParser * WsdlPull::WsdlParser::getSchemaParser ( std::string  targetNamespace) const

getSchemaParser

Parameters
targetnamespace of the schema
Returns
pointer to the schema parser for the namespace
Exceptions
WsdlException

Definition at line 385 of file WsdlParser.cpp.

References getNamespace(), and Schema::SchemaUri.

◆ status()

bool WsdlPull::WsdlParser::status ( ) const
inline

to query the status of wsdl parsing

Definition at line 489 of file WsdlParser.h.

Referenced by WsdlPull::WsdlInvoker::WsdlInvoker().

◆ wsdlPath()

std::string WsdlPull::WsdlParser::wsdlPath ( ) const
inline

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 483 of file WsdlParser.h.

◆ logger()

std::ostream & WsdlPull::WsdlParser::logger ( )
inline

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 496 of file WsdlParser.h.

◆ getWsdlFileName()

std::string & WsdlPull::WsdlParser::getWsdlFileName ( )
inline

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 255 of file WsdlParser.h.

◆ addExtensibilityHandler()

void WsdlPull::WsdlParser::addExtensibilityHandler ( WsdlExtension ext)

addExtensibilityHandler Registers an extensibility handler for Wsdl extensibility namespaces

Parameters
pointerto the instance of WsdlExtension
Exceptions
WsdlException

Definition at line 196 of file WsdlParser.cpp.

◆ getExtensibilityHandler() [1/2]

WsdlExtension * WsdlPull::WsdlParser::getExtensibilityHandler ( const std::string &  ns)

getExtensibilityHandler returns theextensibility handler for the namespaces

Parameters
namespace
Exceptions
WsdlException

Definition at line 1261 of file WsdlParser.cpp.

Referenced by WsdlPull::WsdlElement::getExtensibilityAttributes(), and WsdlPull::WsdlElement::getExtensibilityElements().

◆ getExtensibilityHandler() [2/2]

WsdlExtension * WsdlPull::WsdlParser::getExtensibilityHandler ( int  extId)

addExtensibilityHandler Registers an extensibility handler for Wsdl extensibility namespaces

Parameters
pointerto the instance of WsdlExtension
Exceptions
WsdlException

Definition at line 1271 of file WsdlParser.cpp.

◆ setFeature()

bool WsdlPull::WsdlParser::setFeature ( int  feature_id)

setFeature enables one of the features of the parser

Returns
true or false

◆ getSchemaParser() [2/2]

const SchemaParser * WsdlPull::WsdlParser::getSchemaParser ( int  schemaId) const
inline

getSchemaParser

Parameters
indexof the schema parser .index:0..getNumSchemas-1
Returns
pointer to the schema parser for the namespace
Exceptions
WsdlException

Definition at line 476 of file WsdlParser.h.

Member Data Documentation

◆ useLocalSchema_

bool WsdlPull::WsdlParser::useLocalSchema_ =true
static

getService.

Parameters
Qnamerefering to the service element
Returns
reference to the Service element
Exceptions
WsdlException

Definition at line 259 of file WsdlParser.h.

Referenced by WsdlPull::Soap::getEncodingSchema(), WsdlPull::Soap::getExtensibilitySchema(), and main().


The documentation for this class was generated from the following files: