Prerequisite:

 

This is guideline to install the iConnector Server on Windows Server with Internet Information Services. Other OS and servers may follow different steps.

 

  1. Install IIS
  2. Ensure "Application Development Features" are enabled
  3. Ensure HTTP-Activation is enabled
  4. Create application in IIS and point to iConnector Web Service
  5. Access Rights
  6. Test Run

Install IIS

Ref: http://msdn.microsoft.com/en-us/library/hh167503(v=nav.71).aspx

To install IIS features on Windows 8

1.     On the Start page, choose Control Panel, and then choose Programs.

2.     Under Programs and Features, choose Turn Windows features on or off.

3.     In the Windows features dialog box, expand .NET Framework 4.5 Advanced Services, and then select ASP.NET 4.5.

4.     Expand WCF Services, and then select HTTP Activation.

5.     If the .NET Framework 3.50 is installed, then expand Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0), and then select Windows Communication Foundation HTTP Activation.

6.     In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.

7.     Expand Application Development Features, and select the following features: All except CGI.

8.     Expand Common HTTP Features, and then select the Static Content feature.

9.     Expand Security, and then select the following features:

10.   To install Internet Information Service (IIS) Manager, under Internet Information Services, expand Web Management Tools, and then select IIS Management Console.

This step is optional. You use Internet Information Service IIS Manager to manage local and remote web servers and sites.

11.   Choose the OK button to complete the installation.

12.   To verify that the web server has been installed correctly, start your browser, and then type http://localhost in the address.
The default web site opens and should display an IIS 8 image.

 

Ensure "Application Development Features" are enabled

Ref: http://msdn.microsoft.com/en-us/library/hh167503(v=nav.71).aspx

1.     On the Start page, choose Control Panel, and then choose Programs.

2.     Under Programs and Features, choose Turn Windows features on or off.

3.     In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.

4.     Expand Application Development Features, and select the following features: All except CGI.

5.     Choose the OK button to complete the installation.

6.     To verify that the web server has been installed correctly, start your browser, and then type http://localhost in the address.

The default web site opens and should display an IIS 8 image.

 

Ensure HTTP-Activation is enabled

Ref: http://msdn.microsoft.com/en-us/library/hh167503(v=nav.71).aspx

 

1.     Under Programs and Features, choose Turn Windows features on or off.

2.     In the Windows features dialog box, expand .NET Framework 4.5 Advanced Services, and then select ASP.NET 4.5.

3.     Expand WCF Services, and then select HTTP Activation.

4.     If the .NET Framework 3.50 is installed, then expand Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0), and then select Windows Communication Foundation HTTP Activation.

5.     Choose the OK button to complete the installation.

6.     To verify that the web server has been installed correctly, start your browser, and then type http://localhost in the address.

The default web site opens and should display an IIS 8 image.

 

Create application in IIS and point to iConnector Web Service

  1. On the Start page, search “iis” and choose “Internet Information Services” on the right.
  2. On IIS console’s right panel, expand the machine name, Sites, Default Web Sites.
  3. Right click on the Default Web Site, chose Add Application… as shown below:

4. Type iConnector as the Alias and browse to the iConnector folder as the Physical path: as shown below.

5. Click OK

 

Access Rights

Ensure users IUSR and IIS_IUSRS have these permissions “Read”, “Read & Execute” on CumulusPro.Server.Connectorweb.config file.

 
Ensure user IIS_IUSRS have these permissions “Modify”, “Read”, “Read & Execute”, “List Content” and “write” on CumulusPro.Server.Connectoruploads folder.
This is the Upload folder where documents get stored in the sample code

Test Run

Install “Advanced REST client” 

Using Chrome browser, click on the Apps, select Store, search “advanced REST client”.
 


 

Choose “Advanced REST client” and click on “+Free

Click Add on the popup.

New browser will open and Advanced REST client is installed.

Open the Advanced REST client. 

 

Check Service

Paste “https://<your server>/iConnector/ConnectorService.svc/json/CheckService?value=test” on the url textbox , select GET and click Send.

Replace <your server> in the above URL with your server name

If the iConnector is configured correctly, the response should be as below:

Upload Metadata Test

Paste “https://<your server>/iConnector/ConnectorService.svc/json/UploadMetadata” on the url textbox , select POST, select content-type “application/json” from dropdown. Copy the following:

Replace <your server> in the above URL with your server name
{
    "ConfigurationUniqueId": "f7401f61-5401-4f54-ba47-0efc29fc77a1",
    "UniqueId": "43de0ccf-bceb-431c-810d-8dcf8f6ca7c2",
    "Name": "Test iConnector Server",
    "DeviceUniqueId": null,
    "Documents": [
        {
            "DocumentTypeUniqueId": "878252e8-75b7-443f-ba87-6d082254eab4",
            "UniqueId": "47df8025-3b32-4c16-a826-82686c827a82",
            "Name": "Invoice",
            "SaveNameTemplate": null,
            "DocumentFormat": "PDF",
            "Fields": [
                {
                    "Name": "InvoiceNumber",
                    "Value": "33233"
                },
                {
                    "Name": "InvoiceDate",
                    "Value": "2014-06-01"
                },
                {
                    "Name": "InvoiceStatus",
                    "Value": "Received"
                }],
            "CustomConfiguration": null
        }],
    "CustomConfiguration": null,
    "CustomData": "customer-id-12345"
}

 

Paste the above code into the Payload multi textbox and click Send.

Expected result should be 'ok'

 

LookupValuesForKey Test

Paste “https://<your server>/iConnector/ConnectorService.svc/json/LookupValuesForKey” on the url textbox , select POST, select content-type “application/json” from dropdown. Copy the following:

Replace <your server> in the above URL with your server name
{
    "Configuration": {
        "ConfigurationUniqueId": "e7d45bd6-1c1c-4af7-b389-121e18a2e4b8",
        "Name": "JSON Test",
        "CustomConfiguration": null,
        "CustomData": null
    },
    "DocumentType": {
        "DocumentTypeUniqueId": "6794225c-97ce-48ea-b135-9150741a9a02",
        "Name": "DynamicFieldTest",
        "SaveNameTemplate": null,
        "DocumentFormat": "PDF",
        "CustomConfiguration": null
    },
    "Fields": [
        {
            "Name": "CustomerID",
            "Value": ""
        },
        {
            "Name": "Department",
            "Value": "DepartmentA"
        },
        {
            "Name": "Employee",
            "Value": null
        }],
    "Key": "Employee"
}

 

Paste the above code into Payload multi textbox and click Send.

 

The expected result should be as below:

 

FieldDefinitionsForDocument Test

Paste “https://<your server>/iConnector/ConnectorService.svc/json/FieldDefinitionsForDocument” on the url textbox , select POST, select content-type “application/json” from dropdown. Copy the following:

Replace <your server> in the above URL with your server name

 

{
  "Configuration": {
    "ConfigurationUniqueId": "e7d45bd6-1c1c-4af7-b389-121e18a2e4b8",
    "Name": "JSON Test",
    "CustomConfiguration": null,
    "CustomData": "customer-id-2345"
  },
  "DocumentType": {
    "DocumentTypeUniqueId": "6794225c-97ce-48ea-b135-9150741a9a02",
    "Name": "DynamicFieldTest",
    "SaveNameTemplate": null,
    "DocumentFormat": "PDF",
    "CustomConfiguration": null
  }
}

 

Paste it to Payload multi textbox and click Send.

Expected result as below as the bottom…

[{"DefaultValue":null,"DisplayName":"Customer number","FieldDatatype":"number","IsRequired":true,"LookupValues":null,"Name":"CustomerID","ServerLookupKey":null},{"DefaultValue":null,"DisplayName":"Department","FieldDatatype":"lookup","IsRequired":true,"LookupValues":[{"DisplayValue":"Department A","Value":"DepartmentA"},{"DisplayValue":"Department B","Value":"DepartmentB"}],"Name":"Department","ServerLookupKey":null},{"DefaultValue":null,"DisplayName":"Employee","FieldDatatype":"lookup","IsRequired":false,"LookupValues":null,"Name":"Employee","ServerLookupKey":"Employee"}]

 

ValidateDocumentFields Test

Paste “https://<your server>/iConnector/ConnectorService.svc/json/ValidateDocumentFields” on the url textbox , select POST, select content-type “application/json” from dropdown. Copy the following:

Replace <your server> in the above URL with your server name

  "Configuration": {
    "ConfigurationUniqueId": "f7401f61-5401-4f54-ba47-0efc29fc77a1",
    "Name": "Test iConnector Server",
    "CustomConfiguration": null,
    "CustomData": "customer-id-12345"
  },
  "Document": {
    "DocumentTypeUniqueId": "878252e8-75b7-443f-ba87-6d082254eab4",
    "UniqueId": null,
    "Name": "JSONTestDoc",
    "SaveNameTemplate": null,
    "DocumentFormat": "PDF",
    "Fields": [
      {
        "Name": "InvoiceNumber",
        "Value": "33233"
      },
      {
        "Name": "Test",
        "Value": "2014-06-01"
      },
      {
        "Name": "InvoiceStatus",
        "Value": "Received"
      }
    ],
    "CustomConfiguration": null,
    
  }
}

 

Paste it to Payload multi textbox and click Send.

Expected result as below as the bottom…

[{"FieldName":"InvoiceNumber","Message":"The value of this field should always be Test"}]

 

Create your own Knowledge Base