Package org.n52.svalbard.write
Class Soap12XmlStreamWriter
- java.lang.Object
-
- org.n52.svalbard.write.XmlStreamWriter<SoapResponse>
-
- org.n52.svalbard.write.Soap12XmlStreamWriter
-
public class Soap12XmlStreamWriter extends XmlStreamWriter<SoapResponse>
XmlStreamWriterimplementation for SOAP 1.2- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class org.n52.svalbard.write.XmlStreamWriter
XML_FRAGMENT
-
-
Constructor Summary
Constructors Constructor Description Soap12XmlStreamWriter(EncodingContext context, OutputStream outputStream, SoapResponse element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Encoder<Object,OwsServiceResponse>getEncoder(OwsServiceResponse abstractServiceResponse)protected Set<SchemaLocation>getSchemaLocation()voidwrite()Encode and write element to theOutputStream.protected voidwriteBodyContent(OwsServiceResponse bodyResponse)Encode and write theOwsServiceResponseto streamprotected voidwriteSoapBody()Write the SOAP 1.2 body elementprotected voidwriteSoapEnvelope()Write the SOAP 1.2. envelope elementprotected voidwriteSoapFault(SoapFault fault)Encode and write SOAP 1.2 fault element to SOAP 1.2 body elementprotected voidwriteSoapFaultFromException(OwsExceptionReport exception)Encode and writeOwsExceptionReportelement to SOAP 1.2 body element-
Methods inherited from class org.n52.svalbard.write.XmlStreamWriter
addXlinkHrefAttr, addXlinkTitleAttr, attr, attr, attr, chars, chars, empty, end, end, endInline, finish, flush, getContext, getElement, getEncodeNamespace, getEncoder, getEncoder, getEncoder, getOutputStream, getReplacement, getXmlOptions, isAddSchemaLocation, namespace, rawText, schemaLocation, start, start, time, time, tryGetEncoder, writeXmlObject, writeXmlObject
-
-
-
-
Constructor Detail
-
Soap12XmlStreamWriter
public Soap12XmlStreamWriter(EncodingContext context, OutputStream outputStream, SoapResponse element) throws XMLStreamException
- Throws:
XMLStreamException
-
-
Method Detail
-
write
public void write() throws EncodingException, XMLStreamExceptionDescription copied from class:XmlStreamWriterEncode and write element to theOutputStream.- Specified by:
writein classXmlStreamWriter<SoapResponse>- Throws:
EncodingException- If an encoding error occursXMLStreamException- If an error occurs when writing toOutputStream
-
writeSoapEnvelope
protected void writeSoapEnvelope() throws XMLStreamException, EncodingExceptionWrite the SOAP 1.2. envelope element- Throws:
XMLStreamException- If an error occurs when writing toOutputStreamIf an error occurs when writing toOutputStreamEncodingException- If an encoding error occurs
-
getSchemaLocation
protected Set<SchemaLocation> getSchemaLocation() throws EncodingException, XMLStreamException
- Throws:
EncodingExceptionXMLStreamException
-
writeSoapBody
protected void writeSoapBody() throws XMLStreamException, EncodingExceptionWrite the SOAP 1.2 body element- Throws:
XMLStreamException- If an error occurs when writing toOutputStreamEncodingException- If an encoding error occurs
-
writeBodyContent
protected void writeBodyContent(OwsServiceResponse bodyResponse) throws XMLStreamException, EncodingException
Encode and write theOwsServiceResponseto stream- Parameters:
bodyResponse- The service internal response to encode and write- Throws:
XMLStreamException- If an error occurs when writing toOutputStreamEncodingException- If an encoding error occurs
-
writeSoapFault
protected void writeSoapFault(SoapFault fault) throws EncodingException, XMLStreamException
Encode and write SOAP 1.2 fault element to SOAP 1.2 body element- Parameters:
fault- Service internal SOAP fault representation- Throws:
EncodingException- If an encoding error occursXMLStreamException- If an error occurs when writing toOutputStream
-
writeSoapFaultFromException
protected void writeSoapFaultFromException(OwsExceptionReport exception) throws EncodingException, XMLStreamException
Encode and writeOwsExceptionReportelement to SOAP 1.2 body element- Parameters:
exception- Service internalOwsExceptionReport- Throws:
EncodingException- If an encoding error occursXMLStreamException- If an error occurs when writing toOutputStream
-
getEncoder
protected Encoder<Object,OwsServiceResponse> getEncoder(OwsServiceResponse abstractServiceResponse) throws NoEncoderForKeyException
- Throws:
NoEncoderForKeyException
-
-