org.apache.cxf.ws.addressing.soap
Class VersionTransformer
java.lang.Object
org.apache.cxf.ws.addressing.VersionTransformer
org.apache.cxf.ws.addressing.soap.VersionTransformer
public class VersionTransformer
- extends VersionTransformer
This class is responsible for transforming between the native
WS-Addressing schema version (i.e. 2005/08) and exposed
version (currently may be 2005/08 or 2004/08).
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).
|
Method Summary |
|
decodeAsNative(java.lang.String encodedAs,
java.lang.Class<T> clz,
org.w3c.dom.Element headerElement,
javax.xml.bind.Unmarshaller unmarshaller)
Decodes a MAP from a exposed version. |
|
encodeAsExposed(java.lang.String exposeAs,
T value,
java.lang.String localName,
java.lang.Class<T> clz,
org.w3c.dom.Element header,
javax.xml.bind.Marshaller marshaller)
Encode message in exposed version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HEADERS
public static final java.util.Set<javax.xml.namespace.QName> HEADERS
codec
protected MAPCodec codec
VersionTransformer
public VersionTransformer(MAPCodec mapCodec)
- Constructor.
- Parameters:
mapCodec - the MAPCodec to use
encodeAsExposed
public <T> void encodeAsExposed(java.lang.String exposeAs,
T value,
java.lang.String localName,
java.lang.Class<T> clz,
org.w3c.dom.Element header,
javax.xml.bind.Marshaller marshaller)
throws javax.xml.bind.JAXBException
- Encode message in exposed version.
- Parameters:
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 use
- Throws:
javax.xml.bind.JAXBException
decodeAsNative
public <T> T decodeAsNative(java.lang.String encodedAs,
java.lang.Class<T> clz,
org.w3c.dom.Element headerElement,
javax.xml.bind.Unmarshaller unmarshaller)
throws javax.xml.bind.JAXBException
- Decodes a MAP from a exposed version.
- Parameters:
encodedAs - specifies the encoded versionclz - the classheaderElement - the SOAP header elementmarshaller - the JAXB marshaller to use
- Returns:
- the decoded value
- Throws:
javax.xml.bind.JAXBException
Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.