Class OpenAttrBase


  • public abstract class OpenAttrBase
    extends WsdlBase
    Base class for all element structures in WSDL definition which allow arbitrary attributes from outside the WSDL namespace.
    Author:
    Dennis M. Sosnoski
    • Field Detail

      • m_attributes

        private java.util.ArrayList m_attributes
        Extra attributes associated with element (lazy create, null if unused).
    • Constructor Detail

      • OpenAttrBase

        public OpenAttrBase()
    • Method Detail

      • getNamespace

        public java.lang.String getNamespace()
        Get the WSDL target namespace.
        Returns:
        namespace
      • preget

        protected void preget​(IMarshallingContext ictx)
                       throws JiBXException
        Pre-get method called during marshalling. This first calls the base class implementation to handle namespaces, then writes any extra attributes to the element start tag.
        Overrides:
        preget in class WsdlBase
        Parameters:
        ictx - marshalling context
        Throws:
        JiBXException - on error
      • getExtraAttributes

        public final java.util.List getExtraAttributes()
        Get read-only list of extra attributes. Entries in this list are triplets, consisting of attribute name, namespace, and value.
        Returns:
        extra attribute list
      • clearExtraAttributes

        public final void clearExtraAttributes()
        Clear extra attribute list.
      • addExtraAttribute

        public final void addExtraAttribute​(java.lang.String name,
                                            java.lang.String uri,
                                            java.lang.String value)
        Add extra attribute.
        Parameters:
        name - attribute name
        uri - attribute namespace URI
        value - attribute value
      • validateAttributes

        protected void validateAttributes​(IUnmarshallingContext ictx,
                                          StringArray attrs)
                                   throws JiBXException
        Validate attributes of element from schema namespace. This allows any number of attributes from other namespaces on the element.
        Parameters:
        ictx - unmarshalling context
        attrs - attributes array
        Throws:
        JiBXException - on unmarshalling error