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 List
Documentation for component (lazy create,null
if unused).private Object
Extension data for application use.private List
Namespace definitions associated with this element (lazy create,null
if unused).static final String
Fixed URI for SOAP namespace.static final String
Fixed URI for WSDL namespace. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addNamespaceDeclaration
(String prefix, String uri) Add namespace declaration.final void
Clear namespace declarations list.Get documentation.Get extension data.final List
Get namespace declarations list.private String
makeUniquePrefix
(String pref, StringSizedSet prefixes) Create a unique prefix.protected void
preget
(IMarshallingContext ictx) Pre-get method to be called by data binding while writing element start tag.protected void
preset
(IUnmarshallingContext ictx) Pre-set method to be called by data binding while parsing element start tag.void
prevalidate
(ValidationContext vctx) Prevalidate component information.protected void
Collect namespace declarations from element.void
setDocumentation
(List documentation) Set documentation.void
setExtension
(Object extension) Set extension data.void
validate
(ValidationContext vctx) Validate component information.protected void
validateAttributes
(IUnmarshallingContext ictx, boolean other, StringArray attrs) Validate attributes of element.protected void
Write 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,null
if unused). -
m_documentation
Documentation for component (lazy create,null
if 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 (
null
if 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
-