The Aegis Databinding context object. This object coordinates the data binding process: reading and writing XML. By default, this object sets up a default set of type mappings. This consists of two DefaultTypeMapping objects. The first is empty and has the Default, Java5, and XML TypeCreator classes configured. The second contains the standard mappings of the stock types. If a type can't be mapped in either, then the creators create a mapping and store it in the first one. The application can control some parameters of the type creators by creating a TypeCreationOptions object and setting properties. The application can add custom mappings to the type mapping, or even use its own classes for the TypeMapping or TypeCreator objects. Aegis, unlike JAXB, has no concept of a 'root element'. So, an application that uses Aegis without a web service has to either depend on xsi:type (at least for root elements) or have its own mapping from elements to classes, and pass the resulting Class objects to the readers. At this level, the application must specify the initial set of classes to make make use of untyped collections or .aegis.xml files. If the application leaves this list empty, and reads XML messages, then no .aegis.xml files are used unless the application has specified a Class<T> for the root of a particular item read. Specifically, if the application just leaves it to Aegis to map an element tagged with an xsi:type to a class, Aegis can't know that some arbitrary class in some arbitrary package is mapped to a particular schema type by QName in a mapping XML file. At the level of the CXF data binding, the 'root elements' are defined by the WSDL message parts. Additional classes that participate are termed 'override' classes.
Retrieve the classInfo for a method. Needed to get parameters right. Parameters: m - Method object index - index in the parameter list Returns: info; createBasicClassInfo. Please try running. Sbt package from the command line first. Then let us know if that fixes the issue. Update Looked more closely. This is due to scala-reflect.jar not being picked up within intellij. More than once in this blog I have mentioned the arcane problem of Type and Creator codes. Anyone who has worked with Mac OS prior to Mac OS X will be familiar with the problem. You have a file,. It's very easy: not all(t1) returns False only if all values in t1 are non-empty/nonzero and not None.all short-circuits, so it only has to check the elements up to the first empty one, which makes it very fast.
Field Summary | |
---|---|
static String | UTILITY_TYPES_SCHEMA_NS Namespace used for the miscellaneous Aegis type schema. |
Constructor Summary |
---|
AegisContext() Construct a context. |
Method Summary | |
---|---|
org.apache.ws.commons.schema.XmlSchema | addTypesSchemaDocument(org.apache.ws.commons.schema.XmlSchemaCollection collection) |
static void | addUtilityTypesToSchema(org.apache.ws.commons.schema.XmlSchema root) |
org.apache.ws.commons.schema.XmlSchema | addXmimeSchemaDocument(org.apache.ws.commons.schema.XmlSchemaCollection collection) |
protected AbstractTypeCreator | createDefaultTypeCreator() |
AegisReader<Element> | createDomElementReader() |
AegisWriter<Element> | createDomElementWriter() |
protected AbstractTypeCreator | createRootTypeCreator() |
TypeCreator | createTypeCreator() |
AegisReader<javax.xml.stream.XMLStreamReader> | createXMLStreamReader() |
AegisWriter<javax.xml.stream.XMLStreamWriter> | createXMLStreamWriter() |
Map<Class<?>,String> | getBeanImplementationMap() This property provides support for interfaces. |
TypeCreationOptions | getConfiguration() Deprecated.2.1 |
String | getMappingNamespaceURI() What URI identifies the type mapping for this context? When the XMLTypeCreator reads .aegis.xml file, it will only read mappings for this URI (or no URI). |
Set<Type> | getRootClasses() |
Set<String> | getRootClassNames() Retrieve the set of root class names. |
AegisType | getRootType(Class clazz) If a class was provided as part of the 'root' list, retrieve it's AegisType by Class. |
AegisType | getRootType(QName schemaTypeName) If a class was provided as part of the root list, retrieve it's AegisType by schema type QName. |
Set<AegisType> | getRootTypes() Retrieve the Aegis type objects for the root classes. |
TypeCreationOptions | getTypeCreationOptions() Return the type mapping configuration associated with this context. |
TypeMapping | getTypeMapping() Return the type mapping object used by this context. |
void | initialize() Initialize the context. |
boolean | isEnableJDOMMappings() |
boolean | isMtomEnabled() Is MTOM enabled in this context? |
boolean | isMtomUseXmime() Should this service use schema for MTOM types xmime:base64Binary instead of xsd:base64Binary? |
boolean | isReadXsiTypes() |
boolean | isWriteXsiTypes() |
static boolean | schemaImportsUtilityTypes(org.apache.ws.commons.schema.XmlSchema schema) |
void | setBeanImplementationMap(Map<Class<?>,String> beanImplementationMap) |
void | setConfiguration(TypeCreationOptions newConfiguration) Deprecated.2.1 |
void | setEnableJDOMMappings(boolean enableJDOMMappings) Whether to enable JDOM as a mapping for xsd:anyType if JDOM is in the classpath. |
void | setMappingNamespaceURI(String mappingNamespaceURI) |
void | setMtomEnabled(boolean mtomEnabled) |
void | setMtomUseXmime(boolean mtomUseXmime) |
void | setReadXsiTypes(boolean flag) Controls the use of xsi:type attributes when reading objects. |
void | setRootClasses(Set<Type> rootClasses) The list of initial classes. |
void | setRootClassNames(Set<String> classNames) Set the root class names. |
void | setTypeCreationOptions(TypeCreationOptions newConfiguration) Set the configuration object. |
void | setTypeMapping(TypeMapping typeMapping) Set the type mapping object used by this context. |
void | setWriteXsiTypes(boolean flag) Controls whether Aegis writes xsi:type attributes on all elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
UTILITY_TYPES_SCHEMA_NS
- Namespace used for the miscellaneous Aegis type schema.
- See Also:
- Constant Field Values
Constructor Detail |
---|
AegisContext
- Construct a context.
Method Detail |
---|
createTypeCreator
createRootTypeCreator
createDefaultTypeCreator
initialize
- Initialize the context. The encodingStyleURI allows .aegis.xml files to have multiple mappings for, say, SOAP 1.1 versus SOAP 1.2. Passing null uses a default URI.
- Parameters:
mappingNamespaceURI
- URI to select mappings based on the encoding.
createDomElementReader
createXMLStreamReader
createDomElementWriter
createXMLStreamWriter
getRootType
- If a class was provided as part of the 'root' list, retrieve it's AegisType by Class.
- Parameters:
clazz
-- Returns:
getRootType
- If a class was provided as part of the root list, retrieve it's AegisType by schema type QName.
- Parameters:
schemaTypeName
-- Returns:
schemaImportsUtilityTypes
addTypesSchemaDocument
addXmimeSchemaDocument
addUtilityTypesToSchema
getRootClassNames
- Retrieve the set of root class names. Note that if the application specifies the root classes by Class instead of by name, this will return null.
- Returns:
setRootClassNames
- Set the root class names. This function is a convenience for Spring configuration. It sets the same underlying collection as
setRootClasses(Set)
. - Parameters:
classNames
-
getConfiguration
- Deprecated.2.1
- Return the type mapping configuration associated with this context.
- Returns:
- Returns the configuration.
getTypeCreationOptions
- Return the type mapping configuration associated with this context.
- Returns:
- Returns the configuration.
setConfiguration
- Deprecated.2.1
- Set the configuration object. The configuration specifies default type mapping behaviors.
- Parameters:
configuration
- The configuration to set.
setTypeCreationOptions
- Set the configuration object. The configuration specifies default type mapping behaviors.
- Parameters:
configuration
- The configuration to set.
isWriteXsiTypes
isReadXsiTypes
setWriteXsiTypes
- Controls whether Aegis writes xsi:type attributes on all elements. False by default.
- Parameters:
flag
-
setReadXsiTypes
- Controls the use of xsi:type attributes when reading objects. By default, xsi:type reading is enabled. When disabled, Aegis will only map for objects that the application manually maps in the type mapping.
- Parameters:
flag
-
getTypeMapping
- Return the type mapping object used by this context.
- Returns:
setTypeMapping
- Set the type mapping object used by this context.
- Parameters:
typeMapping
-
getRootTypes
- Retrieve the Aegis type objects for the root classes.
- Returns:
- the set of type objects.
getBeanImplementationMap
- This property provides support for interfaces. If there is a mapping from an interface's Class
to a string containing a class name, Aegis will create proxy objects of that class name. - Returns:
- See Also:
BeanType
setBeanImplementationMap
getRootClasses
setRootClasses
- The list of initial classes.
- Parameters:
rootClasses
-
isMtomEnabled
- Is MTOM enabled in this context?
- Returns:
setMtomEnabled
isMtomUseXmime
- Should this service use schema for MTOM types xmime:base64Binary instead of xsd:base64Binary?
- Returns:
setMtomUseXmime
getMappingNamespaceURI
Type Creation Software
- What URI identifies the type mapping for this context? When the XMLTypeCreator reads .aegis.xml file, it will only read mappings for this URI (or no URI). When the abstract type creator is otherwise at a loss for a namespace URI, it will use this URI.
- Returns:
setMappingNamespaceURI
isEnableJDOMMappings
setEnableJDOMMappings
- Whether to enable JDOM as a mapping for xsd:anyType if JDOM is in the classpath.
- Parameters:
enableJDOMMappings
-
Overview | Package | Class | Use | Tree | Deprecated | Index | Help |