WSDL/SOAP Service

SOAP API

FillAnyPDF provides the API via a WSDL/SOAP Web Service.

For most developers using high level languages like C# or Java, consuming WSDL/SOAP Web Services is a simple task.

Requirements

  • Developer Key.
  • Ability to create a Proxy from the WSDL contract.

WSDL Contract

The WSDL for the service is located at this location:
https://www.fillanypdf.com/api/FormAPI.svc?wsdl

Create a Client Proxy

The Service Contract

[ServiceContract]
public interface IFormAPI
{
    [OperationContract]
    ServiceResult<string> Handshake(string login, string password, string apikey);
 
    [OperationContract]
    ServiceResult<bool> IsHandshakeExpired(string handshake);
 
    [OperationContract]
    ServiceResult<int> UploadTemplate(string handshake, string name, byte[] document);
 
    [OperationContract]
    ServiceResult<bool> UpdateTemplateInfo(string handshake, int templateid, TemplateDescriptor modified);
 
    [OperationContract]
    ServiceResult<bool> CreateDraftCopy(string handshake, int savedcopyid);
 
    [OperationContract]
    ServiceResult<bool> MarkAsComplete(string handshake, int savedcopyid);
 
    [OperationContract]
    ServiceResult<bool> UpdateSavedCopyInfo(string handshake, int savedcopyid, SavedCopyDescriptor modified);
 
    [OperationContract]
    ServiceResult<TemplateDescriptor> GetTemplateDescriptor(string handshake, int id);
 
    [OperationContract]
    ServiceResult<SavedCopyDescriptor> GetSavedCopyDescriptor(string handshake, int id);
 
    [OperationContract]
    ServiceResult<List<TemplateDescriptor>> ListTemplates(string handshake, string searchPattern, int max, int skip);
 
    [OperationContract]
    ServiceResult<bool> DeleteTemplate(string handshake, int templateID);
 
    [OperationContract]
    ServiceResult<string> GetDownloadURL(string handshake, int savedcopyID);
 
    [OperationContract]
    ServiceResult<bool> EmailInvitation(string handshake, int id, string recipients, string subject, string body,
                                  TicketAction action, DocumentType docType);
 
    [OperationContract]
    ServiceResult<string> BuildSocialShareLink(string handshake, int id, DocumentType type);
 
    [OperationContract]
    ServiceResult<List<SocialShareLinkDescriptor>> ListSocialShareLinks(string handshake, int id, DocumentType type, int max, int skip);
 
    [OperationContract]
    ServiceResult<bool> DeleteSocialShareLink(string handshake, int linkID);
 
    [OperationContract]
    ServiceResult<int> CountSocialShareLinks(string handshake, int id, DocumentType type);
 
    [OperationContract]
    ServiceResult<string> CreateTicket(string handshake, int id, DocumentType type, TicketAction action);
 
    [OperationContract]
    ServiceResult<string> ExportAll(string handshake, int savedcopyID);
 
    [OperationContract]
    ServiceResult<List<SavedCopyDescriptor>> ListSavedCopies(string handshake, int templateID, SavedCopyStatus status, string searchpattern, int max, int skip);
 
    [OperationContract]
    ServiceResult<int> CountSavedCopies(string handshake, int templateID, SavedCopyStatus status);
 
    [OperationContract]
        ServiceResult<bool> ResendInvitation(string handshake, int invitationID);
 
    [OperationContract]
    ServiceResult<bool> DeleteInvitation(string handshake, int invitationID);
 
    [OperationContract]
    ServiceResult<List<InvitationDescriptor>> ListInvitations(string handshake, int id, DocumentType type, int max, int skip);
 
    [OperationContract]
    ServiceResult<int> CountInvitations(string handshake, int id, DocumentType type );
 
    [OperationContract]
    ServiceResult<bool> DeleteSavedCopy(string handshake, int savedcopyID);
 
    [OperationContract]
    ServiceResult<byte[]> DownloadTemplatePageImage(string handshake, int templateID, int page, bool thumb);
}

The ServiceResult<T> Data Contract

FAP Services are built on top of Windows Communication Foundation (WCF), to provide more powerful and scalable services. The service contract exposes a data contract as a return type that uses generics.

        public class ServiceResult<T>
        {          
            public string Error;  
            public bool Failed;          
            public T Result;
        }

This wrapper is used to encapsulate the desired result for the service operation, and also provide any error information when necessary.

Properties for ServiceResult<T>

name type comment
Result T generic, given by the return type result is null, if an error ocurred
Error string Message for the error, if any
Failed bool true if an error occurred

Compatibility with SOAP 1.1

The endpoint is compatible with SOAP 1.1, and the generated proxy will create a specific class for each case like ServiceResultOfTypeInt so you don't need to worry if you language does not support generics, your SOAP tool will handle that.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License