Use a web service

To use web service references in TotalAgility, install the Microsoft .NET Framework on the TotalAgility server.

To access a web service, perform the following steps.

  1. Create a web service reference to store information such as the URL in a central place to make it easier to select and edit the web service.
  2. Create a web service activity or add a web service action to interact with internet web services. You can call any web service with a public class and public methods from a web service activity. Each public method has a list of parameters to which you must assign variables.

    If you are using the SOAP UI to test the WCF service methods and if the service method has an object as return type, then as a workaround, you must update the XML of the Request based on the data type. See following example which uses the String type.

Use the SOAP UI to call TotalAgility SDK service

When SOAP sends other than object data type values (including null) to Object data type parameter, .NET is not able to read conversion. Therefore, if you are using the SOAP UI to test the WCF service methods and if the service method has an object as return type, then to ensure that .NET is able to read conversion, you must modify the XML of the "Request" based on the data type.

Note You only need to modify XML if the input type is object data type.

In the example XML for CreateCase2(), the Value property of Variable is Object data type. Modify the XML to pass String data type to value.

Note To pass null value as input to service, modify the XML. For example, for the start date, change the following:
<sdk:StartDate i:nil="true"></sdk:StartDate>

The generated XML is as follows:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:sdk="http://www.kofax.com/agility/services/sdk">
   <soapenv:Header/>
   <soapenv:Body>
     <sdk:CreateCase2>
         <!--Optional:-->
         <sdk:sessionId>CF804840115111D48C6100104B71BD07</sdk:sessionId>
         <!--Optional:-->
         <sdk:processIdentity>
            <sdk:Id>9CD1C8C5471F41C19C370E4BAD971F47</sdk:Id>
            <sdk:Version>176.000</sdk:Version>
            <sdk:Name>LAS_New_Request</sdk:Name>
         </sdk:processIdentity>
         <!--Optional:-->
         <sdk:caseReference>POC_123_201402001</sdk:caseReference>
         <!--Optional:-->
         <sdk:caseInitialization>
            <sdk:InputVariables>
               <!--Zero or more repetitions:-->
               <sdk:InputVariable>
                  <sdk:Id>MARKET</sdk:Id>
                  <sdk:Value>BIFA</sdk:Value>
               </sdk:InputVariable>
                <sdk:InputVariable>
                  <sdk:Id>POLICY_NUMBER</sdk:Id>
                  <sdk:Value>44/018/EUR/8508</sdk:Value>
               </sdk:InputVariable>
			 <sdk:InputVariable>
                  <sdk:Id>POLICY_TYPE</sdk:Id>
                  <sdk:Value>PCP_VIP</sdk:Value>
               </sdk:InputVariable>
			<sdk:InputVariable>
                  <sdk:Id>TRANSACTION_ID</sdk:Id>
                  <sdk:Value>55555555</sdk:Value>
               </sdk:InputVariable>
                <sdk:InputVariable>
                  <sdk:Id>TRANSACTION_TYPE</sdk:Id>
                  <sdk:Value>WITHDRAWAL</sdk:Value>
               </sdk:InputVariable>
			 <sdk:InputVariable>
                  <sdk:Id>INITIAL_CASE_TEAM</sdk:Id>
                  <sdk:Value>PCS - BFFM</sdk:Value>
               </sdk:InputVariable>
            </sdk:InputVariables>
            <sdk:StartDate>?</sdk:StartDate>
         </sdk:caseInitialization>
      </sdk:CreateCase2>
   </soapenv:Body>
</soapenv:Envelope>
  1. Modify the XML as follows (see the bold code):
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sdk="http://www.kofax.com/agility/services/sdk">
       <soapenv:Header/>
       <soapenv:Body>
         <sdk:CreateCase2>
            <!--Optional:-->
             <sdk:sessionId>CF804840115111D48C6100104B71BD07</sdk:sessionId>
             <!--Optional:-->
             <sdk:processIdentity>
                <sdk:Id>9CD1C8C5471F41C19C370E4BAD971F47</sdk:Id>
                <sdk:Version>176.000</sdk:Version>
                <sdk:Name>LAS_New_Request</sdk:Name>
             </sdk:processIdentity>
             <!--Optional:-->
             <sdk:caseReference>POC_123_201402007</sdk:caseReference>
             <!--Optional:-->
             <sdk:caseInitialization xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <sdk:InputVariables>
                   <!--Zero or more repetitions:-->
                   <sdk:InputVariable>
                      <sdk:Id>MARKET</sdk:Id>
                      <sdk:Value i:type="a:string" xmlns:a="http://www.w3.org/2001/XMLSchema">BIFA</sdk:Value>
                   </sdk:InputVariable>                
                </sdk:InputVariables>
                <sdk:StartDate i:nil="true"></sdk:StartDate>
             </sdk:caseInitialization>
          </sdk:CreateCase2>
       </soapenv:Body>
    </soapenv:Envelope>
    
  2. The following response is generated; in this case it returns the case ID as follows (see the bold code):
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body>
          <CreateCase2Response xmlns="http://www.kofax.com/agility/services/sdk">
             <CreateCase2Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <Id>F04EBA61C1A64F47885A80A766CA3B59</Id>
             </CreateCase2Result>
          </CreateCase2Response>
       </s:Body>
    </s:Envelope>