wsdlpull  1.23
List of all members
Schema::SchemaValidator Class Reference

#include <SchemaValidator.h>

Public Member Functions

Constructors and Destructors
 SchemaValidator (const SchemaParser *sp, std::ostream &os=std::cout)
 
 ~SchemaValidator ()
 
validate

This is the main function to validate any type with its instance

Parameters
XmlPullParserinstance of the xml stream containing the instance of the schema type
pointerto the type whose instance must be validated
typecontainer to be used (can be null)
Returns
type container containing an instance of the schema type
TypeContainervalidate (XmlPullParser *xpp, int typeId, TypeContainer *ipTc=0)
 
TypeContainervalidate (const std::string &val, int typeId, TypeContainer *ipTc=0, XmlPullParser *xpp=0)
 
TypeContainervalidate (void *value, int typeId, TypeContainer *ipTc=0, XmlPullParser *xpp=0)
 
instance

This method generates instance of a type

Parameters
Thetag name of the root element
typeid of the element
bool instance (const std::string &tag, Schema::Type type_id)
 

Detailed Description

Definition at line 34 of file SchemaValidator.h.

Constructor & Destructor Documentation

Schema::SchemaValidator::SchemaValidator ( const SchemaParser sp,
std::ostream &  os = std::cout 
)

The constructor for SchemaValidator

Parameters
pointerto the schema parser instance for the schema
outputstream to write generated instances

Definition at line 31 of file SchemaValidator.cpp.

Schema::SchemaValidator::~SchemaValidator ( )

The constructor for SchemaValidator

Parameters
pointerto the schema parser instance for the schema
outputstream to write generated instances

Definition at line 40 of file SchemaValidator.cpp.

Member Function Documentation

TypeContainer * Schema::SchemaValidator::validate ( XmlPullParser xpp,
int  typeId,
TypeContainer ipTc = 0 
)

Definition at line 55 of file SchemaValidator.cpp.

References Schema::All, Schema::ContentModel::anyContents(), Schema::ContentModel::begin(), Schema::Choice, Schema::SchemaParserException::col, Schema::Complex, Schema::ContentModel::Container, Schema::ContentModel::end(), XmlPullParser::END_TAG, XmlPullParser::ENTITY_REF, Schema::ComplexType::getAttribute(), Schema::TypeContainer::getAttributeContainer(), XmlPullParser::getAttributeCount(), XmlPullParser::getAttributeName(), XmlPullParser::getAttributeNamespace(), XmlPullParser::getAttributeValue(), Schema::TypeContainer::getBaseTypeContainer(), Schema::XSDType::getBaseTypeId(), Schema::TypeContainer::getChildContainer(), XmlPullParser::getColumnNumber(), Schema::ContentModel::getCompositor(), Schema::XSDType::getContentModel(), Schema::ComplexType::getContents(), Schema::ComplexType::getContentType(), XmlPullParser::getEventType(), Schema::SchemaParser::getImportedSchemaParser(), XmlPullParser::getLineNumber(), XmlPullParser::getName(), Schema::XSDType::getNamespace(), Schema::SchemaParser::getNamespace(), Schema::XSDType::getQname(), XmlPullParser::getText(), Schema::Attribute::getType(), Schema::SchemaParser::getType(), Schema::TypeContainer::getTypeId(), Schema::SchemaParser::isBasicType(), Schema::SchemaParser::isImported(), Schema::XSDType::isSimple(), Schema::SchemaParserException::line, XmlPullParser::nextTag(), XmlPullParser::nextToken(), Schema::SchemaParser::parseSchemaTag(), Schema::ContentModel::Particle, XmlPullParser::prevTag(), Schema::TypeContainer::schemaParser(), Schema::Sequence, Schema::Simple, XmlPullParser::skipSubTree(), XmlPullParser::START_TAG, XmlPullParser::TEXT, Schema::XSD_ANY, Schema::XSD_ANYTYPE, and Schema::XSD_SCHEMA.

Referenced by WsdlPull::WsdlInvoker::buildXmlTree(), WsdlPull::Soap::handleElement(), main(), WsdlPull::WsdlInvoker::setInputValue(), and validate().

TypeContainer * Schema::SchemaValidator::validate ( const std::string &  val,
int  typeId,
TypeContainer ipTc = 0,
XmlPullParser xpp = 0 
)
TypeContainer * Schema::SchemaValidator::validate ( void *  value,
int  typeId,
TypeContainer ipTc = 0,
XmlPullParser xpp = 0 
)
bool Schema::SchemaValidator::instance ( const std::string &  tag,
Schema::Type  type_id 
)

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