Navigation:  Admin Panel > Adapters > Webservice >

Webservice Add entry

Previous pageReturn to chapter overviewNext page

To set up a web service to add, update,delete or retrieve data to/from a parameter, go to Admin/Adapters/Web Services

WSSetUP

 

Click on AddNewWebserviceCallButton

1. The first part of the configuration is the Details

WSDetails

 

Name: Give the web service a name

Description: this is optional

URL: the first part of the URL is the address of SSP in the local environment. The second part is always Common/webservice/datastore.asmx

Call type: for add, and update it is Insert. To read data from a parameter is Retrieve

XSLT In: For Add always use this (for update, this is different. see section for Web service Update Entry)

<?xml version='1.0'?>

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>

 <xsl:template match='/SSPAdapterCall'>
         <soapenv:Envelope xmlns:soapenv='http://www.w3.org/2003/05/soap-envelope' xmlns:dat="http://smt-x.com/SSP/Common/DataStore">
                 <soapenv:Header/>        
                 <soapenv:Body>
                         <dat:addEntry>
                                 <dat:p_strParameterName>Customer Information</dat:p_strParameterName>
                                 <dat:p_strHash>B2E6A6424DF1D90A6D215C8DEF276CBD9F8D5A01</dat:p_strHash>
                                 <dat:p_blnIsHidden>false</dat:p_blnIsHidden>
                                 <dat:p_blnResetCache>true</dat:p_blnResetCache>
                                 <dat:p_arr_strNameValues>
                                         <xsl:for-each select="Field">
                                                 <dat:string>
                                                         <xsl:value-of select="@Name" />
                                                 </dat:string>
                                                 <dat:string>
                                                         <xsl:value-of select="." />
                                                 </dat:string>
                                         </xsl:for-each>
                                 </dat:p_arr_strNameValues>
                         </dat:addEntry>
                 </soapenv:Body>
         </soapenv:Envelope>
 </xsl:template>
</xsl:stylesheet>

Pay attention to the highlighted fields.

Parameter name. This is the name of the parameter that will be used in the web service.

Hash: This is the hash for the parameter. To retrieve this value, go to <localSSPaddress>/Forms/test.aspx. Login "query", clikc on HashCheck, Insert the name of the parameter and click on get Hash. Copy-paste this string in place of the above value.

XSLT out: Copy the below into this field.

<?xml version='1.0' ?>

<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ssp="http://smt-x.com/SSP/Common/DataStore"version='1.0'>
 <xsl:template match="/">
         <SSPAdapterResult>
                 <xsl:apply-templates select="/soap:Envelope/soap:Body/ssp:addEntryResponse/ssp:addEntryResult"/>
                 <xsl:apply-templates select="/soap:Envelope/soap:Body/soap:Fault"/>
         </SSPAdapterResult>
 </xsl:template>
 <xsl:template match="/soap:Envelope/soap:Body/ssp:addEntryResponse/ssp:addEntryResult">
         <Value><xsl:value-of select='.' /></Value>
 </xsl:template>
 <xsl:template match="/soap:Envelope/soap:Body/soap:Fault">
         <Error>code:<xsl:value-of select='soap:faultcode' /><xsl:value-of select='soap:Code/soap:Value' /> - string:<xsl:value-of select='soap:faultstring' /><xsl:value-of select='soap:Reason/soap:Text' /></Error>
 </xsl:template>
</xsl:stylesheet>

2. Web service Call Headers

WSHeaders

SOAPAction is http://smt-x.com/SSP/Common/DataStore/addEntry for adding new entry (this is different for updating an entry. See section on Web service Update entry)

Content-Type is usually text/xml;charset=UTF-8

3. Web service call Fields

WSFiields

Here, add the name of the fields of the parameter that will be updated by this web service.

Type is usually string

and Direction is Input.

When done, click on save or clip0172

The Web service is ready to be used in a process. For instructions on how to set up a process Webservice Call step, see the link Webservice Call