Some of the service methods require or return a structure which is known as a Document. This structure is defined as follows.
public class Document { //This represents the document ID String docID; //This represents the extension of the component String docType; //This represents the actual “data” which should be converted to a readable data by the //de-veloper byte[] data; //This represents the Component ID String compId; //This represents the size of the component String compSize; //This represents the response code of the server request String status; }
The tia Webservice exposes the following APIs.
Service name | Service method | Description | Parameter Description | Return codes / Return Type | Availability |
---|---|---|---|---|---|
ServiceCheck | String ServiceCheck(String ApplicationName, String UserName, String seckey) | This API may be used in order to check whether a service is available for an application. This API returns the application name. Please note: In case an application is configured and deactivated, it will still return the application name. | ApplikationName: Application which is mapped against a specific Content Server. UserName: Username which is delivered / provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. | Returns a string indicating whether web service is availble for the specified application name. | API available since version 1 |
serverInfo | int ContentServerInfo(String ApplicationName, String UserName, String seckey) | API may be used to check whether configured content server is available. This API is equivalent to an SAP ArchiveLink Server Info-command. It returns a response code. Please refer to SAP Content Server HTTP Interface guide for more details regarding the response code. | ApplicationName: Application which is mapped against a specified Content Server. UserName: Username which is provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. | 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 1 |
info | Document ContentServerDocInfo(String ApplicationName, Document document, String UserName, String seckey) | The API may be used in order to fetch information regarding a certain Document and its respective components. This API returns a Document structure which should be implemented by the client application. Please refer to Structures used in Webservice (WA) for additional information. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
(Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for info-Requests). | Returns a document structure containing the following.
Return code: 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 1 |
delete | int ContentServerDocDel(String ApplicationName, Document document, String UserName, String seckey) | This API may be used in order to delete the specified document. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
(Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for delete-Requests). | Return code: 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 1 |
get | Document ContentServerDocGet(String ApplicationName, Document document, String UserName, String seckey) | This API may be used in order to fetch the specified document. In case no component was specified the default data component will be fetched. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
UserName: Username which is delivered / provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for delete-Requests). | Returns a document structure containing the following:
Return code: 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 1 |
MDocument ContentServerDocGetv2(String ApplicationName, MDocument recvDoc, String UserName, String seckey, Boolean ConvertToPdf, String Watermark) | This API may be used in order to fetch the specified document. In case no component was specified the default data component will be fetched. In addition to the features from version 1 this API also allows you to convert a component during the retrieval process to Pdf as well as placis a watermark on the generated Pdf document, if specified. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
UserName: Username which is delivered / provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for delete-Requests). (Optional) ConvertToPdf: Defines whether a component should be converted to a Pdf file. This flag applies to each component, whose content type is either
(Optional) Watermark: Defines whether a Pdf should be marked with the specified watermark text. | Returns a document structure containing the following:
Return code: 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 2 | |
create | int ContentServerDocCreate(String ApplicationName, Document document, Boolean Async, String UserName, String seckey) | This API may be used in order to create a document. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
Async: The Async boolean defines, whether the received document should be placed in the specified Working Directory. Asynchronous requests may be used best, when tia Document Router is involved. It’s recommended to define Document Router’s Input directory as the Webservices working directory. UserName: Username which is delivered / provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for create-Requests). Please note: In case of synchronous requests, the correct mime type will be determined automatically by the webservice. In case of asynchronous requests the mime type will be appended at the end of the file generated at the asynchronous directory location. | Return code: 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 1 |
getAll | Document[] ContentServerDocGetAll(String ApplicationName, Document document, String UserName, String seckey, Boolean FetchContent) | This API may be used in order to feth the specified documents. In case no component was provided, all components will be feteched. Each component will be returend as a separate document structure. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
UserName: Username which is delivered / provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for create-Requests). FetchContent: Defines whether the content should be delivered or not. | Returns a document structure containing the following:
Return code: 200: OK 400: Bad request
401: Forbidden
500: Internal Server Error
| 1 |
MDocument[] ContentServerDocGetAllv2(String ApplicationName, MDocument document, String username, String secKey, Boolean fetchContent, boolean convertToPDF, Boolean ConvertToMul-tiPagePDF, String watermark) | This API may be used in order to feth the specified documents. In case no component was provided, all components will be feteched. Each component will be returend as a separate document structure. | ApplicationName: Application which is mapped against a specific Content Server. document: A document structure needs to be provided with the following fields filled.
UserName: Username which is delivered / provided by the client (Authentication should be handled at the remote end. Webservice itself doesn’t offer user authentication.) (Optional) seckey: The seckey represents a signed ApplicationName. In case the security is enabled and the alias is specified, the seckey will be verified against the configured alias in the keystore. (Seckey is optional for create-Requests). FetchContent: Defines whether the content should be delivered or not. ConvertToMultiPagePDF: Specifies whether a component should be converted to a Pdf file. In case this flag is being activated components of the following type will be converted to PDF and merged as a single Pdf file:
Watermark: Defines whether a Pdf should be marked with the specified watermark text. | 2 |