Class SoapWebService<T_WEBPDF_PORT,T_OPERATION_PARAMETER,T_SOAP_DOCUMENT extends SoapDocument>
- java.lang.Object
-
- net.webpdf.wsclient.webservice.AbstractWebService<SoapSession<T_SOAP_DOCUMENT>,OperationData,T_OPERATION_PARAMETER,T_SOAP_DOCUMENT,BillingType,PdfPasswordType,SettingsType>
-
- net.webpdf.wsclient.webservice.soap.SoapWebService<T_WEBPDF_PORT,T_OPERATION_PARAMETER,T_SOAP_DOCUMENT>
-
- Type Parameters:
T_OPERATION_PARAMETER- The parameter type of the targeted webservice endpoint.T_SOAP_DOCUMENT- The expectedSoapDocumenttype for the documents used by the webPDF server.T_WEBPDF_PORT- The interface stub type to operate the webservice endpoint with.
- All Implemented Interfaces:
WebService<SoapSession<T_SOAP_DOCUMENT>,T_OPERATION_PARAMETER,T_SOAP_DOCUMENT,BillingType,PdfPasswordType,SettingsType>
- Direct Known Subclasses:
BarcodeWebService,ConverterWebService,OcrWebService,PdfaWebService,SignatureWebService,ToolboxWebService,UrlConverterWebService
public abstract class SoapWebService<T_WEBPDF_PORT,T_OPERATION_PARAMETER,T_SOAP_DOCUMENT extends SoapDocument> extends AbstractWebService<SoapSession<T_SOAP_DOCUMENT>,OperationData,T_OPERATION_PARAMETER,T_SOAP_DOCUMENT,BillingType,PdfPasswordType,SettingsType>
An instance ofSoapWebServicewraps a wsclient connection to a specific webPDF webservice endpoint (WebServiceType), usingWebServiceProtocol.SOAPand expecting aSoapDocumentas the result.
-
-
Constructor Summary
Constructors Constructor Description SoapWebService(@NotNull SoapSession<T_SOAP_DOCUMENT> session, @NotNull WebServiceType webServiceType)Creates a webservice interface of the givenWebServiceTypefor the givenSoapSession.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @NotNull BillingTypegetBilling()Returns theBillingTypeof the current webservice.protected @NotNull jakarta.xml.ws.soap.MTOMFeaturegetMTOMFeature()Returns the configuration of theMTOMFeaturefor the current webservice call.@NotNull PdfPasswordTypegetPassword()Returns thePdfPasswordTypeof the current webservice.protected T_WEBPDF_PORTgetPort()Returns a matching webservice port for future executions of thisSoapWebService.protected @NotNull QNamegetQName()Returns theQNameof the current SOAP webservice.@Nullable SettingsTypegetSettings()Returns theSettingsTypeof the current webservice.protected @NotNull URLgetWsdlDocumentLocation()Returns theURLof the wsdl document.T_SOAP_DOCUMENTprocess()Execute the webservice operation and return the resultingSoapWebService.
You can write the result of the webservice call via:SoapDocument.writeResult(File)orSoapDocument.writeResult(OutputStream)T_SOAP_DOCUMENTprocess(T_SOAP_DOCUMENT sourceDocument)Execute the webservice operation for the given sourceSoapWebServiceand return the resultingSoapWebService.
You can write the result of the webservice call via:SoapDocument.writeResult(File)orSoapDocument.writeResult(OutputStream)on either the returned or the source document.protected abstract @Nullable jakarta.activation.DataHandlerprocessService(T_SOAP_DOCUMENT sourceDocument)Execute the webservice operation and returns theDataHandlerof the resulting document.protected abstract T_WEBPDF_PORTprovideWebServicePort()Create a matching webservice port for future executions of thisSoapWebService.voidsetBilling(@Nullable BillingType billing)Sets theBillingTypefor the current webservice.voidsetPassword(@Nullable PdfPasswordType password)Sets thePdfPasswordTypefor the current webservice.voidsetSettings(@Nullable SettingsType settings)Sets theSettingsTypefor the current webservice.-
Methods inherited from class net.webpdf.wsclient.webservice.AbstractWebService
getAdditionalParameter, getHeaders, getOperationData, getSession, getWebServiceType, initOperation
-
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.webservice.WebService
getOperationParameters, setOperationParameters
-
-
-
-
Constructor Detail
-
SoapWebService
public SoapWebService(@NotNull @NotNull SoapSession<T_SOAP_DOCUMENT> session, @NotNull @NotNull WebServiceType webServiceType) throws ResultExceptionCreates a webservice interface of the givenWebServiceTypefor the givenSoapSession.- Parameters:
session- TheSoapSessionthe webservice interface shall be created for.webServiceType- TheWebServiceTypeinterface, that shall be created.- Throws:
ResultException
-
-
Method Detail
-
process
@NotNull public T_SOAP_DOCUMENT process() throws ResultException
Execute the webservice operation and return the resulting
SoapWebService.
You can write the result of the webservice call via:SoapDocument.writeResult(File)orSoapDocument.writeResult(OutputStream)Be aware: A
SoapDocumentis usingDataHandlerobjects, which might require to be closed, to avoid resource leaks. You should callSoapDocument.close()on the hereby provided result document.Be aware: Most webservices require a source
SoapWebService, with few exceptions, such as the URL-converter webservice. Before using this method, make sure that this is valid for theWebServicecall you intend to hereby execute.- Returns:
- The resulting
SoapWebService. - Throws:
ResultException- Shall be thrown, upon an execution failure.
-
process
@NotNull public T_SOAP_DOCUMENT process(@NotNull T_SOAP_DOCUMENT sourceDocument) throws ResultException
Execute the webservice operation for the given source
SoapWebServiceand return the resultingSoapWebService.
You can write the result of the webservice call via:SoapDocument.writeResult(File)orSoapDocument.writeResult(OutputStream)on either the returned or the source document.Be aware: The hereby returned
SoapDocumentis identical to the given source document.
Be aware: ASoapDocumentis usingDataHandlerobjects, which might require to be closed, to avoid resource leaks. You should callSoapDocument.close()on the hereby provided result document.- Parameters:
sourceDocument- The sourceSoapWebService, that shall be processed.- Returns:
- The resulting
SoapWebService. - Throws:
ResultException- Shall be thrown, upon an execution failure.
-
getPassword
@NotNull public @NotNull PdfPasswordType getPassword()
Returns thePdfPasswordTypeof the current webservice.- Returns:
- the
PdfPasswordTypeof the current webservice.
-
setPassword
public void setPassword(@Nullable @Nullable PdfPasswordType password)Sets thePdfPasswordTypefor the current webservice.- Parameters:
password- ThePdfPasswordTypefor the current webservice.
-
getBilling
@NotNull public @NotNull BillingType getBilling()
Returns theBillingTypeof the current webservice.- Returns:
- the
BillingTypeof the current webservice.
-
setBilling
public void setBilling(@Nullable @Nullable BillingType billing)Sets theBillingTypefor the current webservice.- Parameters:
billing- TheBillingTypefor the current webservice.
-
getSettings
@Nullable public @Nullable SettingsType getSettings()
Returns theSettingsTypeof the current webservice.- Returns:
- the
SettingsTypeof the current webservice.
-
setSettings
public void setSettings(@Nullable @Nullable SettingsType settings)Sets theSettingsTypefor the current webservice.- Parameters:
settings- TheSettingsTypefor the current webservice.
-
processService
@Nullable protected abstract @Nullable jakarta.activation.DataHandler processService(@NotNull T_SOAP_DOCUMENT sourceDocument) throws WebServiceExceptionExecute the webservice operation and returns theDataHandlerof the resulting document.- Parameters:
sourceDocument- TheSoapWebServiceto process.- Returns:
- The
DataHandlerof the resulting document. - Throws:
WebServiceException- Shall be thrown, upon an execution failure.
-
getQName
@NotNull protected @NotNull QName getQName()
Returns theQNameof the current SOAP webservice.- Returns:
- the
QNameof the current SOAP webservice.
-
getWsdlDocumentLocation
@NotNull protected @NotNull URL getWsdlDocumentLocation() throws ResultException
Returns theURLof the wsdl document.- Returns:
- the
URLof the wsdl document. - Throws:
ResultException- aResultException
-
getMTOMFeature
@NotNull protected @NotNull jakarta.xml.ws.soap.MTOMFeature getMTOMFeature()
Returns the configuration of theMTOMFeaturefor the current webservice call.- Returns:
- The configuration of the
MTOMFeaturefor the current webservice call.
-
provideWebServicePort
@NotNull protected abstract T_WEBPDF_PORT provideWebServicePort() throws ResultException
Create a matching webservice port for future executions of thisSoapWebService.- Returns:
- The webservice port, that shall be used for executions.
- Throws:
ResultException- Shall be thrown, upon an execution failure.
-
getPort
@NotNull protected T_WEBPDF_PORT getPort()
Returns a matching webservice port for future executions of thisSoapWebService.- Returns:
- The webservice port, that shall be used for executions.
-
-