|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JAXBContextFactory
Factory to create JAXBContext
.
JAX-WS uses JAXB to perform databinding when you use the service endpoint interface, and normally
the JAX-WS RI drives JAXB and creates a necessary JAXBContext
automatically.
This annotation is a JAX-WS RI vendor-specific feature, which lets applications create JAXBRIContext
(which is the JAXB RI's JAXBContext
implementation.)
Combined with the JAXB RI vendor extensions defined in JAXBRIContext
, appliation can use this to
fine-tune how the databinding happens, such as by adding more classes to the binding context,
by controlling the namespace mappings, and so on.
Applications should either use UsesJAXBContextFeature
or UsesJAXBContext
to instruct
the JAX-WS runtime to use a custom factory.
Field Summary | |
---|---|
static JAXBContextFactory |
DEFAULT
The default implementation that creates JAXBRIContext according to the standard behavior. |
Method Summary | |
---|---|
com.sun.xml.bind.api.JAXBRIContext |
createJAXBContext(SEIModel sei,
java.util.List<java.lang.Class> classesToBind,
java.util.List<com.sun.xml.bind.api.TypeReference> typeReferences)
Called by the JAX-WS runtime to create a JAXBRIContext for the given SEI. |
Field Detail |
---|
static final JAXBContextFactory DEFAULT
JAXBRIContext
according to the standard behavior.
Method Detail |
---|
@NotNull com.sun.xml.bind.api.JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull java.util.List<java.lang.Class> classesToBind, @NotNull java.util.List<com.sun.xml.bind.api.TypeReference> typeReferences) throws javax.xml.bind.JAXBException
JAXBRIContext
for the given SEI.
sei
- The SEIModel
object being constructed. This object provides you access to
what SEI is being processed, and therefore useful if you are writing a generic
JAXBContextFactory
that can work with arbitrary SEI classes.classesToBind
- List of classes that needs to be bound by JAXB. This value is computed according to
the JAX-WS spec and given to you.
The calling JAX-WS runtime expects the returned JAXBRIContext
to be capable of
handling all these classes, but you can add more (which is more common), or remove some
(if you know what you are doing.)
The callee is free to mutate this list.typeReferences
- List of TypeReference
s, which is also a part of the input to the JAXB RI to control
how the databinding happens. Most likely this will be just a pass-through to the
JAXBRIContext.newInstance(java.lang.Class[], java.util.Collection, java.util.Map, java.lang.String, boolean, com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader)
method.
JAXBRIContext
object.
javax.xml.bind.JAXBException
- If the callee encounters a fatal problem and wants to abort the JAX-WS runtime processing
of the given SEI, throw a JAXBException
. This will cause the port instantiation
to fail (if on client), or the application deployment to fail (if on server.)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |