Class RestWebService<T_OPERATION_DATA,T_OPERATION_PARAMETER,T_REST_DOCUMENT extends RestDocument>
- java.lang.Object
-
- net.webpdf.wsclient.webservice.AbstractWebService<RestSession<T_REST_DOCUMENT>,T_OPERATION_DATA,T_OPERATION_PARAMETER,T_REST_DOCUMENT,OperationBilling,OperationPdfPassword,OperationSettings>
-
- net.webpdf.wsclient.webservice.rest.RestWebService<T_OPERATION_DATA,T_OPERATION_PARAMETER,T_REST_DOCUMENT>
-
- Type Parameters:
T_OPERATION_DATA- The operation type of the targeted webservice endpoint.T_OPERATION_PARAMETER- The parameter type of the targeted webservice endpoint.T_REST_DOCUMENT- The expectedRestDocumenttype for the documents used by the webPDF server.
- All Implemented Interfaces:
WebService<RestSession<T_REST_DOCUMENT>,T_OPERATION_PARAMETER,T_REST_DOCUMENT,OperationBilling,OperationPdfPassword,OperationSettings>
- Direct Known Subclasses:
BarcodeRestWebService,ConverterRestWebService,OcrRestWebService,PdfaRestWebService,SignatureRestWebService,ToolboxRestWebService,UrlConverterRestWebService
public abstract class RestWebService<T_OPERATION_DATA,T_OPERATION_PARAMETER,T_REST_DOCUMENT extends RestDocument> extends AbstractWebService<RestSession<T_REST_DOCUMENT>,T_OPERATION_DATA,T_OPERATION_PARAMETER,T_REST_DOCUMENT,OperationBilling,OperationPdfPassword,OperationSettings>
An instance ofRestWebServicewraps a wsclient connection to a specific webPDF webservice endpoint (WebServiceType), usingWebServiceProtocol.RESTand expecting aRestDocumentas the result.
-
-
Constructor Summary
Constructors Constructor Description RestWebService(@NotNull RestSession<T_REST_DOCUMENT> session, @NotNull WebServiceType webServiceType)Creates a webservice interface of the givenWebServiceTypefor the givenRestSession.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T_REST_DOCUMENTprocess()Execute the webservice operation and return the resultingRestWebService.protected T_REST_DOCUMENTprocess(@NotNull String urlPath)Execute the webservice operation for the given urlPath and return the resultingRestWebService.T_REST_DOCUMENTprocess(T_REST_DOCUMENT sourceDocument)Execute the webservice operation for the given sourceRestWebServiceand return the resultingRestWebService.-
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
getBilling, getOperationParameters, getPassword, getSettings, setBilling, setOperationParameters, setPassword, setSettings
-
-
-
-
Constructor Detail
-
RestWebService
public RestWebService(@NotNull @NotNull RestSession<T_REST_DOCUMENT> session, @NotNull @NotNull WebServiceType webServiceType)Creates a webservice interface of the givenWebServiceTypefor the givenRestSession.- Parameters:
session- TheRestSessionthe webservice interface shall be created for.webServiceType- TheWebServiceTypeinterface, that shall be created.
-
-
Method Detail
-
process
@NotNull public T_REST_DOCUMENT process() throws ResultException
Execute the webservice operation and return the resulting
RestWebService.Be aware: Most webservices require a source
RestWebService, 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
RestWebService. - Throws:
ResultException- Shall be thrown, upon an execution failure.
-
process
@NotNull public T_REST_DOCUMENT process(@NotNull T_REST_DOCUMENT sourceDocument) throws ResultException
Execute the webservice operation for the given source
RestWebServiceand return the resultingRestWebService.- Parameters:
sourceDocument- The sourceRestWebService, that shall be processed.- Returns:
- The resulting
RestWebService. - Throws:
ResultException- Shall be thrown, upon an execution failure.
-
process
@Nullable protected T_REST_DOCUMENT process(@NotNull @NotNull String urlPath) throws ResultException
Execute the webservice operation for the given urlPath and return the resulting
RestWebService.- Parameters:
urlPath- The resource path (URI) to execute the request on.- Returns:
- The resulting
RestWebService. - Throws:
ResultException- Shall be thrown, upon an execution failure.
-
-