Interface SoapDocument
-
- All Superinterfaces:
AutoCloseable,Document
- All Known Implementing Classes:
SoapWebServiceDocument
public interface SoapDocument extends Document, AutoCloseable
A class implementing
SoapDocumentrepresents a document, as it is processed/created by aSoapWebService.Such a
SoapDocumentdefines a source for the document, that shall be processed by a calledSoapWebServiceand a target resource for the document produced by that webservice.Be aware: A
SoapDocumentis usingDataHandlers, that might require closing to prevent resource leaks. You should alwaysclose()SoapDocuments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the documentsDataHandlers.@Nullable jakarta.activation.DataHandlergetResult()Returns the resultDataHandler, that represents the current result of aSoapWebServicecall for thisSoapDocument.@Nullable jakarta.activation.DataHandlergetSourceDataHandler()Returns aDataHandlerfor the document's source - may returnnullin case no source document has been selected.voidsetResult(@Nullable jakarta.activation.DataHandler result)Sets the resultDataHandler, that represents the current result of aSoapWebServicecall for thisSoapDocument.voidwriteResult(@NotNull File target)Attempts to write theWebServiceProtocol.SOAPresponse document to the givenFile.voidwriteResult(@NotNull OutputStream target)Attempts to write theWebServiceProtocol.SOAPresponse document to the givenOutputStream.-
Methods inherited from interface net.webpdf.wsclient.session.documents.Document
getSource, isFileSource
-
-
-
-
Method Detail
-
getSourceDataHandler
@Nullable @Nullable jakarta.activation.DataHandler getSourceDataHandler()
Returns aDataHandlerfor the document's source - may returnnullin case no source document has been selected.- Returns:
- A
DataHandlerfor the document's source.
-
setResult
void setResult(@Nullable @Nullable jakarta.activation.DataHandler result)Sets the resultDataHandler, that represents the current result of aSoapWebServicecall for thisSoapDocument.- Parameters:
result- The resultDataHandler, that represents the current result of aSoapWebServicecall.
-
getResult
@Nullable @Nullable jakarta.activation.DataHandler getResult()
Returns the resultDataHandler, that represents the current result of aSoapWebServicecall for thisSoapDocument. (May returnnull, should such a result not exist.)- Returns:
- The result
DataHandler, that represents the current result of aSoapWebServicecall.
-
writeResult
void writeResult(@NotNull @NotNull OutputStream target) throws ResultExceptionAttempts to write theWebServiceProtocol.SOAPresponse document to the givenOutputStream.- Parameters:
target- The targetOutputStreamtheWebServiceProtocol.SOAPresponse document shall be written to.- Throws:
ResultException- Shall be thrown, should writing the result document fail.
-
writeResult
void writeResult(@NotNull @NotNull File target) throws ResultExceptionAttempts to write theWebServiceProtocol.SOAPresponse document to the givenFile.- Parameters:
target- The targetFiletheWebServiceProtocol.SOAPresponse document shall be written to.- Throws:
ResultException- Shall be thrown, should writing the result document fail.
-
close
void close() throws ResultExceptionCloses the documentsDataHandlers.- Specified by:
closein interfaceAutoCloseable- Throws:
ResultException- Shall be thrown, when closing the underlyingDataHandlers failed.
-
-