public class VersionTransformer extends VersionTransformer
The native version is that used throughout the stack, were the WS-A types are represented via the JAXB generated types for the 2005/08 schema.
The exposed version is that used when the WS-A types are externalized, i.e. are encoded in the headers of outgoing messages. For outgoing requests, the exposed version is determined from configuration. For outgoing responses, the exposed version is determined by the exposed version of the corresponding request.
The motivation for using different native and exposed types is usually to facilitate a WS-* standard based on an earlier version of WS-Adressing (for example WS-RM depends on the 2004/08 version).
Modifier and Type | Class and Description |
---|---|
static class |
VersionTransformer.Names200403
Adds 2004/03 headers to set.
|
static class |
VersionTransformer.Names200408
Holder for 2004/08 Names
|
Modifier and Type | Field and Description |
---|---|
protected MAPCodec |
codec |
static Set<QName> |
HEADERS |
NATIVE_VERSION
Constructor and Description |
---|
VersionTransformer(MAPCodec mapCodec)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
decodeAsNative(String encodedAs,
Class<T> clz,
Element headerElement,
javax.xml.bind.Unmarshaller unmarshaller)
Decodes a MAP from a exposed version.
|
<T> void |
encodeAsExposed(String exposeAs,
T value,
String localName,
Class<T> clz,
Element header,
javax.xml.bind.Marshaller marshaller)
Encode message in exposed version.
|
convert, convert, convert, convert, convert, convert, convert, convert, convert, convert, convert, convertTo200403, convertTo200403, convertTo200403, convertToInternal, getExposedJAXBContext, isSupported
public VersionTransformer(MAPCodec mapCodec)
mapCodec
- the MAPCodec to usepublic <T> void encodeAsExposed(String exposeAs, T value, String localName, Class<T> clz, Element header, javax.xml.bind.Marshaller marshaller) throws javax.xml.bind.JAXBException
exposeAs
- specifies the WS-Addressing version to exposevalue
- the value to encodelocalName
- the localName for the headerclz
- the classheader
- the SOAP header elementmarshaller
- the JAXB marshaller to usejavax.xml.bind.JAXBException
public <T> T decodeAsNative(String encodedAs, Class<T> clz, Element headerElement, javax.xml.bind.Unmarshaller unmarshaller) throws javax.xml.bind.JAXBException
encodedAs
- specifies the encoded versionclz
- the classheaderElement
- the SOAP header elementmarshaller
- the JAXB marshaller to usejavax.xml.bind.JAXBException
Apache CXF