Class SoapWebServiceSession
- java.lang.Object
-
- net.webpdf.wsclient.session.AbstractSession
-
- net.webpdf.wsclient.session.soap.AbstractSoapSession<SoapWebServiceDocument>
-
- net.webpdf.wsclient.session.soap.SoapWebServiceSession
-
- All Implemented Interfaces:
AutoCloseable,Session,SoapSession<SoapWebServiceDocument>
public class SoapWebServiceSession extends AbstractSoapSession<SoapWebServiceDocument>
An instance of
SoapWebServiceSessionestablishes and manages aWebServiceProtocol.SOAPconnection with a webPDF server.
-
-
Constructor Summary
Constructors Constructor Description SoapWebServiceSession(@NotNull SessionContext serverContext, @NotNull AuthProvider authProvider)Creates a newSoapWebServiceSessioninstance providing connection information, authorization objects for a webPDF server-clientSoapSession.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull SoapWebServiceDocumentcreateDocument()Creates a handle for aSoapWebServiceoutput without providing a source document.
This is recommended for webservices, that don't require a source document.@NotNull SoapWebServiceDocumentcreateDocument(@NotNull File source)Creates aSoapDocumentoriginating from the givenFile.@NotNull SoapWebServiceDocumentcreateDocument(@NotNull InputStream source)Creates aSoapDocumentoriginating from the givenInputStream.@NotNull SoapWebServiceDocumentcreateDocument(@NotNull URI source)Creates aSoapDocumentoriginating from the givenURI.<T_WEBSERVICE extends SoapWebService<?,?,?>>
T_WEBSERVICEcreateWebServiceInstance(@NotNull WebServiceType webServiceType)Creates a matchingSoapWebServiceinstance to execute a webPDF operation for the current session.-
Methods inherited from class net.webpdf.wsclient.session.soap.AbstractSoapSession
close, isUseLocalWsdl, setUseLocalWsdl
-
Methods inherited from class net.webpdf.wsclient.session.AbstractSession
getAuthProvider, getSessionContext, getURI, getURI, getWebServiceProtocol
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.webpdf.wsclient.session.Session
getAuthProvider, getSessionContext, getURI, getURI, getWebServiceProtocol
-
-
-
-
Constructor Detail
-
SoapWebServiceSession
public SoapWebServiceSession(@NotNull @NotNull SessionContext serverContext, @NotNull @NotNull AuthProvider authProvider) throws ResultExceptionCreates a new
SoapWebServiceSessioninstance providing connection information, authorization objects for a webPDF server-clientSoapSession.Be Aware: Neither
SessionContext, norAuthProviderare required to serve multipleSessions at a time. It is expected to create a newSessionContextandAuthProviderperSessionyou create.- Parameters:
serverContext- TheSessionContextinitializing theSessionContextSettingsof thisSoapSession.authProvider- TheAuthProviderfor authentication/authorization of thisSoapSession.- Throws:
ResultException- Shall be thrown, in case establishing the session failed.
-
-
Method Detail
-
createWebServiceInstance
@NotNull public <T_WEBSERVICE extends SoapWebService<?,?,?>> T_WEBSERVICE createWebServiceInstance(@NotNull @NotNull WebServiceType webServiceType) throws ResultException
Creates a matchingSoapWebServiceinstance to execute a webPDF operation for the current session.- Type Parameters:
T_WEBSERVICE- TheWebServiceTypeto create an interface for.- Parameters:
webServiceType- TheWebServiceTypeto create an interface for.- Returns:
- A matching
SoapWebServiceinstance. - Throws:
ResultException- Shall be thrown, if theSoapWebServicecreation failed.
-
createDocument
@NotNull public @NotNull SoapWebServiceDocument createDocument()
Creates a handle for a
SoapWebServiceoutput without providing a source document.
This is recommended for webservices, that don't require a source document. (Such as the URL-Converter.)Be aware: Most webservices require a source document, with few exceptions. Before using this, make sure that this is valid for the
WebServicecall you intend to execute.
-
createDocument
@NotNull public @NotNull SoapWebServiceDocument createDocument(@NotNull @NotNull InputStream source) throws ResultException
Creates a
SoapDocumentoriginating from the givenInputStream.- Parameters:
source- TheURItheSoapDocumentis originating from.- Throws:
ResultException- Shall be thrown in case loading the source document failed.
-
createDocument
@NotNull public @NotNull SoapWebServiceDocument createDocument(@NotNull @NotNull URI source) throws ResultException
Creates aSoapDocumentoriginating from the givenURI.- Parameters:
source- TheURItheSoapDocumentis originating from.- Throws:
ResultException- Shall be thrown in case loading the source document failed.
-
createDocument
@NotNull public @NotNull SoapWebServiceDocument createDocument(@NotNull @NotNull File source) throws ResultException
Creates aSoapDocumentoriginating from the givenFile.- Parameters:
source- TheFiletheSoapDocumentis originating from.- Throws:
ResultException- Shall be thrown in case loading the source document failed.
-
-