public abstract class AbstractSoapEncoder<T,S> extends Object implements Encoder<T,S>, Constants
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FAULT_REASON |
private Set<EncoderKey> |
encoderKey |
static String |
MISSING_EXCEPTION_DETAIL_TEXT |
static String |
MISSING_RESPONSE_DETAIL_TEXT |
AMPERSAND_CHAR, AMPERSAND_STRING, BACKSLASH_CHAR, BACKSLASH_STRING, BLANK_CHAR, BLANK_STRING, CLOSE_BRACE_CHAR, CLOSE_BRACE_STRING, COLON_CHAR, COLON_STRING, COMMA_CHAR, COMMA_SPACE_STRING, COMMA_STRING, CSV_BLOCK_SEPARATOR, CSV_TOKEN_SEPARATOR, DASH_CHAR, DASH_STRING, DEFAULT_ENCODING, DOLLAR_CHAR, DOLLAR_STRING, DOT_CHAR, DOT_STRING, DOUBLE_COLON_STRING, EMPTY_STRING, EPSG_WGS84, EPSG_WGS84_3D, EQUAL_SIGN_CHAR, EQUAL_SIGN_STRING, GREATER_THAN_SIGN_STRING, HASH_CODE_13, HASH_CODE_17, HASH_CODE_19, HASH_CODE_23, HASH_CODE_29, HASH_CODE_3, HASH_CODE_31, HASH_CODE_37, HASH_CODE_41, HASH_CODE_43, HASH_CODE_47, HASH_CODE_5, HASH_CODE_7, HTTP, INT_0, INT_1, INT_2, INT_3, INT_4, INVERTED_COMMA_CHAR, INVERTED_COMMA_STRING, LESS_THAN_SIGN_STRING, LINE_SEPARATOR_CHAR, LINE_SEPARATOR_STRING, MINUS_CHAR, MINUS_STRING, NUMBER_SIGN_CHAR, NUMBER_SIGN_STRING, OPEN_BRACE_CHAR, OPEN_BRACE_STRING, PERCENT_CHAR, PERCENT_STRING, PLUS_CHAR, PLUS_STRING, QUERSTIONMARK_CHAR, QUERSTIONMARK_STRING, SEMICOLON_CHAR, SEMICOLON_STRING, SLASH_CHAR, SLASH_STRING, SPACE_CHAR, SPACE_STRING, UNDERSCORE_CHAR, UNDERSCORE_STRING, URN
Constructor and Description |
---|
AbstractSoapEncoder(String namespace) |
Modifier and Type | Method and Description |
---|---|
private void |
addAndRemoveSchemaLocationForSOAP(org.apache.xmlbeans.XmlObject xmlObject,
SOAPMessage soapResponseMessage)
Check SOS response for xsi:schemaLocation, remove attribute and add
attribute to SOAP message
|
void |
addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
|
protected String |
createSOAPBody(SOAPMessage soapResponseMessage,
SoapResponse soapResponse,
String actionURI)
Create and add the SOAPBody content
|
protected String |
createSOAPBody(SOAPMessage soapResponseMessage,
org.apache.xmlbeans.XmlObject sosResponse,
String actionURI)
Creates a SOAPBody element from SOS response
|
protected void |
createSOAPFault(SOAPFault fault,
SoapFault soapFault)
Creates a SOAPFault element from SOS internal fault
|
private void |
createSOAPFaultDetail(Detail detail,
CodedException exception)
Creates a SOAPDetail element from SOS exception document.
|
protected String |
createSOAPFaultFromExceptionResponse(SOAPFault soapFault,
OwsExceptionReport owsExceptionReport)
Creates a SOAPFault element from SOS exception
|
T |
encode(S response)
Encodes the specified object.
|
protected org.apache.xmlbeans.XmlObject |
getBodyContent(SoapResponse response)
Get the content for the SOAPBody as
XmlObject |
Set<String> |
getConformanceClasses() |
MediaType |
getContentType() |
Set<EncoderKey> |
getEncoderKeyType() |
protected String |
getExceptionActionURI(ExceptionCode exceptionCode)
Get SOAP action URI depending on Exception code
|
Map<ServiceConstants.SupportedTypeKey,Set<String>> |
getSupportedTypes()
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encode, getSchemaLocations
public static final String DEFAULT_FAULT_REASON
public static final String MISSING_RESPONSE_DETAIL_TEXT
public static final String MISSING_EXCEPTION_DETAIL_TEXT
private final Set<EncoderKey> encoderKey
public AbstractSoapEncoder(String namespace)
public Set<EncoderKey> getEncoderKeyType()
getEncoderKeyType
in interface Encoder<T,S>
EncoderKey
)public Map<ServiceConstants.SupportedTypeKey,Set<String>> getSupportedTypes()
Encoder
getSupportedTypes
in interface Encoder<T,S>
public Set<String> getConformanceClasses()
getConformanceClasses
in interface ConformanceClass
public void addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
Encoder
addNamespacePrefixToMap
in interface Encoder<T,S>
public MediaType getContentType()
getContentType
in interface Encoder<T,S>
public T encode(S response) throws OwsExceptionReport
Encoder
encode
in interface Encoder<T,S>
response
- the object to encodeOwsExceptionReport
- if an error occursUnsupportedEncoderInputException
- if the supplied object (or any of it's contents) is not
supported by this encoderprotected String createSOAPBody(SOAPMessage soapResponseMessage, org.apache.xmlbeans.XmlObject sosResponse, String actionURI) throws SOAPException
soapResponseMessage
- SOAPBody elementsosResponse
- SOS responseactionURI
- the action URISOAPException
- if an error occurs.protected String createSOAPBody(SOAPMessage soapResponseMessage, SoapResponse soapResponse, String actionURI) throws SOAPException, OwsExceptionReport
soapResponseMessage
- SOAPMessage to add the bodysoapResponse
- SOS internal SOAP responseactionURI
- The ation URISOAPException
- If an error occurs when add content to SOAPMessage
OwsExceptionReport
- If an error occurs while encoding the body contentprotected org.apache.xmlbeans.XmlObject getBodyContent(SoapResponse response) throws OwsExceptionReport
XmlObject
response
- SOAP responseXmlObject
OwsExceptionReport
- If no encoder is available, the object to encode is not
supported or an error occurs during the encodingprivate void addAndRemoveSchemaLocationForSOAP(org.apache.xmlbeans.XmlObject xmlObject, SOAPMessage soapResponseMessage) throws SOAPException
xmlObject
- soapResponseMessage
- SOAP response messageSOAPException
- If an error occursprotected void createSOAPFault(SOAPFault fault, SoapFault soapFault) throws SOAPException
fault
- SOAPFault elementsoapFault
- SOS internal faultSOAPException
- if an error occurs.protected String createSOAPFaultFromExceptionResponse(SOAPFault soapFault, OwsExceptionReport owsExceptionReport) throws SOAPException
soapFault
- SOAPFault elementowsExceptionReport
- SOS exceptionSOAPException
- if an error occurs.protected String getExceptionActionURI(ExceptionCode exceptionCode)
exceptionCode
- Exception codeprivate void createSOAPFaultDetail(Detail detail, CodedException exception) throws SOAPException
detail
- SOAPDetailexception
- SOS Exception documentSOAPException
- if an error occurs.Copyright © 2012-2015 52north.org. All Rights Reserved.