Package org.jibx.ws.wsdl.model
Class WsdlBase
java.lang.Object
org.jibx.ws.wsdl.model.WsdlBase
- Direct Known Subclasses:
Definitions,OpenAttrBase
Base class which provides validation hooks and support for extra namespaces. This base class for WSDL element
representations is based on the schema data model code.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ListDocumentation for component (lazy create,nullif unused).private ObjectExtension data for application use.private ListNamespace definitions associated with this element (lazy create,nullif unused).static final StringFixed URI for SOAP namespace.static final StringFixed URI for WSDL namespace. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddNamespaceDeclaration(String prefix, String uri) Add namespace declaration.final voidClear namespace declarations list.Get documentation.Get extension data.final ListGet namespace declarations list.private StringmakeUniquePrefix(String pref, StringSizedSet prefixes) Create a unique prefix.protected voidpreget(IMarshallingContext ictx) Pre-get method to be called by data binding while writing element start tag.protected voidpreset(IUnmarshallingContext ictx) Pre-set method to be called by data binding while parsing element start tag.voidprevalidate(ValidationContext vctx) Prevalidate component information.protected voidCollect namespace declarations from element.voidsetDocumentation(List documentation) Set documentation.voidsetExtension(Object extension) Set extension data.voidvalidate(ValidationContext vctx) Validate component information.protected voidvalidateAttributes(IUnmarshallingContext ictx, boolean other, StringArray attrs) Validate attributes of element.protected voidWrite namespace declarations to element.
-
Field Details
-
WSDL_NAMESPACE_URI
Fixed URI for WSDL namespace.- See Also:
-
SOAP_NAMESPACE_URI
Fixed URI for SOAP namespace.- See Also:
-
m_extension
Extension data for application use. -
m_namespaces
Namespace definitions associated with this element (lazy create,nullif unused). -
m_documentation
Documentation for component (lazy create,nullif unused).
-
-
Constructor Details
-
WsdlBase
public WsdlBase()
-
-
Method Details
-
getExtension
Get extension data. The actual type of object used for extension data (if any) is defined by the application.- Returns:
- extension
-
setExtension
Set extension data. The actual type of object used for extension data (if any) is defined by the application.- Parameters:
extension-
-
getNamespaceDeclarations
Get namespace declarations list. Entries in this list consist of pairs, consisting of namespace prefix followed by namespace URI. The empty string is used as the prefix for the default namespace.- Returns:
- extra attribute list
-
clearNamespaceDeclarations
public final void clearNamespaceDeclarations()Clear namespace declarations list. -
addNamespaceDeclaration
Add namespace declaration.- Parameters:
prefix- namespace prefixuri- namespace URI
-
getDocumentation
Get documentation. This is the content of the optional <documentation> child element, which consists of DOM Nodes.- Returns:
- documentation (
nullif no documentation present)
-
setDocumentation
Set documentation. This is the content of the optional <documentation> child element, which consists of DOM Nodes.- Parameters:
documentation-
-
preget
Pre-get method to be called by data binding while writing element start tag. The base class implementation just writes out any extra namespaces defined on the element. Subclasses which override this implementation must call the base implementation during their processing.- Parameters:
ictx- marshalling context- Throws:
JiBXException- on marshalling error
-
preset
Pre-set method to be called by data binding while parsing element start tag. The base class implementation just reads in any extra namespaces defined on the element. Subclasses which override this implementation must call the base implementation during their processing.- Parameters:
ictx- unmarshalling context- Throws:
JiBXException- on error
-
validateAttributes
Validate attributes of element. This is designed to be called during unmarshalling as part of the pre-set method processing when a subclass instance is being created. An error is reported if an element in the default namespace is not in the declared list,- Parameters:
ictx- unmarshalling contextother- attributes from other namespaces allowed flagattrs- attributes array- See Also:
-
readNamespaces
Collect namespace declarations from element. This is designed to be called during unmarshalling as part of the pre-set method processing when a subclass instance is being created.- Parameters:
ictx- unmarshalling context
-
makeUniquePrefix
Create a unique prefix. If the requested prefix is already in use, this modifies the prefix by appending a numeric suffix to create a unique variant.- Parameters:
pref- requested prefixprefixes- prefixes in use- Returns:
- unique prefix
-
writeNamespaces
Write namespace declarations to element. This is designed to be called during marshalling as part of the pre-get method processing when a subclass instance is being marshalled.- Parameters:
ictx- marshalling context- Throws:
JiBXException- on error writing
-
prevalidate
Prevalidate component information. The prevalidation step is used to check isolated aspects of a component, such as the settings for enumerated values. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.- Parameters:
vctx- validation context
-
validate
Validate component information. The validation step is used for checking the interactions between components, such as name references to other components. Theprevalidate(org.jibx.schema.validation.ValidationContext)method will always be called for every component in the schema definition before this method is called for any component. This empty base class implementation should be overridden by each subclass that requires validation handling.- Parameters:
vctx- validation context
-