public class XmlDataHandler extends java.lang.Object implements DataHandler
| Constructor and Description |
|---|
XmlDataHandler(XmlConfig config)
Defines the XML data handler with the given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
SofortLibResponse |
parse(RawResponse rawResponse,
java.lang.Class<? extends SofortLibResponse> responseClass)
Parses the API XML response wrapped into
RawResponse to
SofortLibResponse of given type. |
RawRequest |
render(SofortLibRequest dataRequest)
Renders
SofortLibRequest to the API XML request wrapped into
RawRequest. |
public XmlDataHandler(XmlConfig config)
config - XML configurationpublic RawRequest render(SofortLibRequest dataRequest)
DataHandlerSofortLibRequest to the API XML request wrapped into
RawRequest.render in interface DataHandlerdataRequest - a SofortLibRequestRawRequestpublic SofortLibResponse parse(RawResponse rawResponse, java.lang.Class<? extends SofortLibResponse> responseClass)
DataHandlerRawResponse to
SofortLibResponse of given type.parse in interface DataHandlerrawResponse - API XML response wrapped into RawResponseresponseClass - expected response classSofortLibResponse of given type