getdata web service€¦ · strings are used to represent the xml because most programming...

72
Technical Manual www.creditsafeuk.com GetData Web Service Version 4.0

Upload: others

Post on 21-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Technical Manual

www.creditsafeuk.com GetData Web Service

Version 4.0

Page 2: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 2(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Legal Notice Creditsafe.com reserves the right to modify this manual to reflect updates to the www.creditsafeuk.com GetData Web Service. Customers should visit our website www.creditsafeuk.com for information on GetData updates and to download the latest version of this manual. This manual is for creditsafe.com customers only and cannot be redistributed to third-parties.

Page 3: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 3(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Contents Legal Notice.......................................................................................................... 2 1 Introduction................................................................................................ 5 2 www.creditsafeuk.com GetData Web Service .................................................. 6 2.1 GetData Web Method ................................................................................... 6 2.2 GetData Operations ..................................................................................... 6 2.3 GetData XML Request Structure .................................................................... 7 2.3.1 Request <header> Element .......................................................................... 8 2.3.2 Request <body> Element............................................................................. 8 2.4 GetData XML Response Structure .................................................................. 9 2.4.1 Response <header> Element .......................................................................10 2.4.2 Response <body> Element ..........................................................................10 3 GetCompanyInformation Operation...............................................................11 3.1 GetCompanyInformation Request .................................................................11 3.2 GetCompanyInformation Response ...............................................................13 3.2.1 <baseinformation> Element ........................................................................17 3.2.2 <industries> Element .................................................................................17 3.2.3 <tradingaddresses> Element .......................................................................17 3.2.4 <ratings> Element .....................................................................................17 3.2.5 <limits> Element .......................................................................................18 3.2.6 <previousnames> Element..........................................................................18 3.2.7 <recordofpayments> Element......................................................................18 3.2.8 <ccjsummary> Element ..............................................................................18 3.2.9 <statushistorys> Element ...........................................................................18 3.2.10 <mortgages> Element ................................................................................18 3.2.11 <mortgagesummary> Element ....................................................................18 3.2.12 <shareholders> Element .............................................................................18 3.2.13 <shareholdersummary> Element .................................................................18 3.2.14 <financials> Element ..................................................................................19 3.2.15 <eventhistory> Element..............................................................................19 3.2.16 <directors> Element...................................................................................19 3.3 GetCompanyInformation Example ................................................................20 4 CompanySearch Operation ..........................................................................26 4.1 CompanySearch Request.............................................................................26 4.1.1 Search Mode..............................................................................................28 4.1.2 Search Result Paging ..................................................................................29 4.2 CompanySearch Response...........................................................................31 4.2.3 <resultcounters> Element ...........................................................................32 4.2.4 <result> Element .......................................................................................33 4.3 CompanySearch Example ............................................................................33 5 GetNonLtdCompanyInformation Operation.....................................................35 5.1 GetNonLtdCompanyInformation Request .......................................................35 5.2 GetNonLtdCompanyInformation Response .....................................................37 5.2.1 <baseinformation> Element ........................................................................39 5.2.2 <ratings> Element .....................................................................................39 5.2.3 <limits> Element .......................................................................................39 5.2.4 <matchedccjsummary> Element ..................................................................39 5.2.5 <matchedrecordofpayments> Element..........................................................39 5.2.6 <possiblematchedccjsummary> Element.......................................................39 5.2.7 <possiblematchedrecordofpayments> Element ..............................................39

Page 4: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 4(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

5.2.8 <seniorexecutive> Element .........................................................................39 5.2.9 <events> Element......................................................................................39 5.3 GetNonLtdCompanyInformation Example.......................................................40 6 NonLtdCompanySearch Operation ................................................................43 6.1 NonLtdCompanySearch Request ...................................................................43 6.1.1 Search Mode..............................................................................................45 6.1.2 Search Result Paging ..................................................................................46 6.2 NonLtdCompanySearch Response .................................................................48 6.2.1 <resultcounters> Element ...........................................................................49 6.2.2 <result> Element .......................................................................................50 6.3 NonLtdCompanySearch Example ..................................................................50 7 Error Response...........................................................................................52 7.1 Error Response Structure ............................................................................52 8 Using www.creditsafeuk.com GetData Web Service.........................................54 8.1 Client Implementations ...............................................................................54 8.2 .NET Framework.........................................................................................54 8.3 Simple Object Access Protocol (SOAP) Toolkit ................................................61 8.4 Representation State Transfer (REST) ...........................................................67

Page 5: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 5(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

1 Introduction This manual is intended to be read by software developers who wish to use the www.creditsafeuk.com GetData Web Service. This manual provides a detailed description of the Web Service including the input and output for each operation. The manual also includes examples of how to call the www.creditsafeuk.com GetData Web Service using .NET Framework, Simple Object Application Protocol (SOAP) Toolkit and Representation State Transfer (REST).

Page 6: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 6(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

2 www.creditsafeuk.com GetData Web Service The www.creditsafeuk.com GetData Web Service exposes a single web method called GetData that retrieves information from the Creditsafeuk.com database. The address for the GetData Web Service is:

https://www.creditsafeuk.com/GetDataUK/Service/CreditsafeServices.asmx

2.1 GetData Web Method

The GetData Web Method requires XML as its input (termed the request XML) and returns XML as its output (termed the response XML). XML is used as the input and output mechanism because XML is extremely flexible. In the future GetData can easily be extended to provide further functionality. Requests for these new functions can be implemented by providing different input XML. This approach means that any existing request implementations are still valid and customers do not need to change their systems, unless they wish to use the new functionality. Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object Model (DOM), if required, for processing. As XML element names are case-sensitive all GetData XML element names are in lowercase characters. 2.2 GetData Operations Table 2.2.1, below, lists the operations GetData supports. Operation Name

Description

GetCompanyInformation This operation returns credit information for a specified Limited Company number in the request XML

CompanySearch This operation returns a list of Limited Companies that match the specified search criteria in the request XML

GetNonLtdCompanyInformation This operation returns credit information for a specified Non-Limited Company number in the request XML

NonLtdCompanySearch This operation returns a list of Non-Limited Companies that match the specified search criteria in the request XML

Table 2.2.1: GetData operations

The operation requested is determined by the XML request passed to GetData.

Page 7: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 7(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

2.3 GetData XML Request Structure All input XML to GetData contains an <xmlrequest> element and within this element a <header> element and a <body> element. Table 2.3.1 outlines the purpose of these XML elements. XML Element

Description

<xmlrequest> This is the root element of the request XML. This element contains two child elements: <header> and <body>.

<header> The <header> element contains reference information such as the username, password and the operation requested.

<body> The <body> element contains the parameters for the operation. The structure of the <body> element differs according to the operation requested.

Table 2.3.1: GetData Request XML Structure

The XML request structure required by GetData is shown in figure 2.3.1.

<xmlrequest> <header> <username>Username</username> <password>Password</password> <language>EN</language> <operation>Operation</operation> <chargereference>ChargeReference</chargereference> </header> <body> <!—- the request body XML goes here and the structure is dependent on the operation requested --> </body> </xmlrequest>

Figure 2.3.1: GetData XML request structure

Page 8: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 8(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

2.3.1 Request <header> Element

The <header> element contains reference information such as the username and password of the Creditsafeuk account making the request and the operation to perform. The <header> element structure never changes regardless of the operation requested. The structure of the <header> element is described in table 2.3.1.1.

XML Element Meaning Supported Values

<username> The customers username

A valid creditsafeuk.com account username

<password> The customers password The password for the creditsafeuk.com username

<language> The Language the results will be returned in (note: only certain data is language specific such as error messages)

EN - English

<operation> The name of the operation requested

GetCompanyInformation CompanySearch GetNonLtdCompanyInformation NonLtdCompanySearch

<chargereference> The customers charge reference

A valid charge reference for the creditsafeUK.com account

Table 2.3.1.1: Request <header> element

Example 1 If user “DemoUser” wishes to call the GetCompanyInformation operation and receive text in English then the <header> structure would be as shown in figure 2.3.1.1. <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>GetCompanyInformation</operation> <chargereference></chargereference> </header>

Figure 2.3.1.1: Example Request <header>

2.3.2 Request <body> Element

The <body> element of a GetData request is specific to the operation requested. Please refer to section 3.1 of this document for a description of the request <body> for the GetCompanyInformation operation and section 4.1 of this document for a description of the request <body> for the CompanySearch operation.

Page 9: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 9(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

2.4 GetData XML Response Structure All ouput XML to GetData contains an <xmlresponse> element and within this element a <header> element and a <body> element. Table 2.4.1 outlines the purpose of these XML elements. XML Element

Description

<xmlresponse> This is the root element of the response XML. This element contains two child elements: <header> and <body>.

<header> The <header> element contains reference information such as the time, version and provider.

<body> The <body> element contains the actual data returned. The structure of the <body> element differs according to the operation requested.

Table 2.4.1: GetData Response XML Structure

The XML response structure returned by GetData is shown in Figure 2.4.1.

<xmlresponse> <header> <reportinformation> <time>Time</time> <reporttype>ReportType</reporttype> <country>Country</country> <version>Version</version> <provider>Provider</provider> <chargereference></chargereference> </reportinformation> </header> <body> <!—- the response body XML goes here and the structure is dependent on the operation responding to --> </body> </xmlresponse>

Figure 2.4.1: GetData XML response structure

Page 10: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 10(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

2.4.1 Response <header> Element

The <header> element contains reference information such as the time, version and provider of the response. The <header> element structure never changes regardless of the operation. The structure of the <header> element is described in table 2.4.1.1.

XML Element Meaning Supported Values

<reportinformation> A container element for the report information

N/A

<time> The time the response message was generated

Date and time in format mm/dd/yyyy hh:nn:ss

<reporttype> This element contains the type of report returned by GetData i.e. what type of information is held in the <body> element

GetCompanyInformation GetCompanyInformationError CompanySearch CompanySearchError GetNonLtdCompanyInformation GetNonLtdCompanyInfromationError NonLtdCompanySearch NonLtdCompanySearchError Error

<country> The country to return data from

As specified in the request message

<version> The application version Version 4.0

<provider> The name of the service provider

www.creditsafe.com

<chargereference> The customer charge reference that made the request

As specified in the request message

Table 2.4.1.1: Response <header> element

2.4.2 Response <body> Element

The <body> element of a GetData response is specific to the operation. Please refer to the section 3.2 of this document for a description of the response <body> element for the GetCompanyInformation operation and section 4.2 of this document for a description of the response <body> element for the CompanySearch operation.

Page 11: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 11(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

3 GetCompanyInformation Operation 3.1 GetCompanyInformation Request The GetCompanyInformation operation returns credit information for a limited company with the specified company number. The structure of an XML request to call the GetCompanyInformation operation is shown in Figure 3.1.1 below.

<xmlrequest> <header> <username>Username</username> <password>Password</password> <language>EN</language> <operation>GetCompanyInformation</operation> <chargereference></chargereference> </header> <body> <package>Package</package> <country>Country</country> <companynumber>CompanyNumber</companynumber> </body> </xmlrequest>

Figure 3.1.1: GetCompanyInformation XML Request

The GetCompanyInformation request <header> element has the same structure as all other operation requests. The <operation> element must have the value GetCompanyInformation. The information that must be provided in the <body> element is shown in table 3.1.1. XML Element Meaning Supported Values

<package> The package name determines the data to return

A valid data package name

<country> The Country to return the data from UK – United Kingdom

<companynumber> The company number of the company to return the credit information on

A valid company number

Table 3.1.1: GetCompanyInformation <body> element

Page 12: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 12(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Example 1 User “DemoUser” wishes to call the GetCompanyInformation operation to retrieve the credit information defined by the “standard” package on the UK Limited Company with company number “00000001”. The request XML would be as shown in Figure 3.1.2.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>GetCompanyInformation</operation> <chargereference></chargereference> </header> <body> <package>standard</package> <country>UK</country> <companynumber>00000001</companynumber> </body> </xmlrequest>

Figure 3.1.2: Example GetCompanyInformation XML Request

Example 2 User “DemoUser” wishes to call the GetCompanyInformation operation to retrieve the credit information defined by the “standard” package on the UK Limited Company with company number “XYZ00006”. The request XML would be as shown in figure 3.1.3.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>GetCompanyInformation</operation> <chargereference></chargereference> </header> <body> <package>standard</package> <country>UK</country> <companynumber>XYZ00006</companynumber> </body> </xmlrequest>

Figure 3.1.3: Example GetCompanyInformation XML Request

Page 13: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 13(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

3.2 GetCompanyInformation Response

This GetCompanyInformation operation returns credit information for the limited company with the specified company number. The response consists of the standard response <header> element and a response <body> element. The response <body> element contains the actual company information. The GetCompanyInformation response is shown in figure 3.2.1. <xmlresponse> <header> <reportinformation> <time></time> <reporttype></reporttype> <country></country> <version></version> <provider></provider> <chargereference></chargereference> </reportinformation> </header> <body> <companies> <company> <baseinformation> <number></number> <name></name> <telephone></telephone> <tpsregistered></tpsregistered> <address1></address1> <address2></address2> <address3></address3> <address4></address4> <postcode></postcode> <siccode></siccode> <sicdescription></sicdescription> <secondarysiccodes> <secondarysiccode> (*) <siccode></siccode> <sicdescription></sicdescription> </secondarysiccode> </secondarysiccodes> <website></website> <companytype></companytype> <accountstype></accountstype> <annualreturndate></annualreturndate> <incorporationdate></incorporationdate> <accountsfilingdate></accountsfilingdate> <latestaccountsdate></latestaccountsdate> </baseinformation> <industries> <industry> (*) <name></name> </industry> </industries> <tradingaddresses> <tradingaddress> (*) <address1></address1>

Page 14: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 14(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<address2></address2> <address3></address3> <address4></address4> <postcode></postcode> <telephone></telephone> <tpsregistered></tpsregistered> </tradingaddress> </tradingaddresses> <ratings> <ratingdetail> (*) <date></date> <score></score> <description></description> </ratingdetail> </ratings> <limits> <limitdetail> (*) <limit></limit> <date></date> </limitdetail> </limits> <previousnames> <previousname> (*) <name></name> <date></date> </previousname> </previousnames> <recordofpayments> <rop> (*) <casenr></casenr> <ccjdate></ccjdate> <ccjdatepaid></ccjdatepaid> <court></court> <ccjstatus></ccjstatus> <ccjamount></ccjamount> </rop> </recordofpayments> <ccjsummary> <values></values> <numbers></numbers> <datefrom></datefrom> <dateto></dateto> </ccjsummary> <statushistorys> <status> (*) <date></date> <text></text> </status> </statushistorys> <mortgages> <mortgagedetail> (*) <mortgagetype></mortgagetype> <createddate></createddate> <registereddate></registereddate> <satisfieddate></satisfieddate> <status></status> <personsentitled> <personentitled> (*)

Page 15: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 15(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<name></name> </personentitled> </personsentitled> <amountsecured></amountsecured> <details></details> </mortgagedetail> </mortgages> <mortgagesummary> <outstanding></outstanding> <satisfied></satisfied> </mortgagesummary> <shareholders> <shareholderdetails> (*) <name></name> <shares></shares> <currency></currency> </shareholderdetails> </shareholders> <shareholdersummary> <sharecapital></sharecapital> </shareholdersummary> <financials> <financial> <period> <datefrom></datefrom> <dateto></dateto> <periodmonths></periodmonths> <currency></currency> </period> <profitloss> <consolidatedaccounts></consolidatedaccounts> <turnover></turnover> <export></export> <costofsales></costofsales> <grossprofit></grossprofit> <wagessalaries></wagessalaries> <operatingprofits></operatingprofits> <depreciation></depreciation> <auditfees></auditfees> <interestpayments></interestpayments> <pretax></pretax> <taxation></taxation> <posttax></posttax> <dividendspayable></dividendspayable> <retainedprofits></retainedprofits> <directorsemoluments></directorsemoluments> </profitloss> <balancesheet> <tangibleassets></tangibleassets> <intangibleassets></intangibleassets> <fixedassets></fixedassets> <currentassets></currentassets> <tradedebtors></tradedebtors> <stock></stock> <cash></cash> <othercurrentassets></othercurrentassets> <increaseincash></increaseincash> <miscellaneouscurrentassets>

Page 16: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 16(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

</miscellaneouscurrentassets> <totalassets></totalassets> <totalcurrentliabilities></totalcurrentliabilities> <tradecreditors></tradecreditors> <overdraft></overdraft> <othershorttermfinance></othershorttermfinance> <miscellaneouscurrentliabilities> </miscellaneouscurrentliabilities> <otherlongtermfinance></otherlongtermfinance> <longtermliabilities></longtermliabilities> <overdraftlongtermliabilites> </overdraftlongtermliabilites> <liabilities></liabilities> <netassets></netassets> <workingcapital></workingcapital> </balancesheet> <capitalreserves> <paidupequity></paidupequity> <profitlossreserve></profitlossreserve> <sundryreserves></sundryreserves> <revalutationreserve></revalutationreserve> <reserves></reserves> <networth></networth> <shareholderfunds></shareholderfunds> </capitalreserves> <netcashflowfromoperations></netcashflowfromoperations> <netcashflowbeforefinancing></netcashflowbeforefinancing> <netcashflowfromfinancing></netcashflowfromfinancing> <contingentliability></contingentliability> <capitalemployed></capitalemployed> <employees></employees> <auditors></auditors> <auditqualification></auditqualification> <bankers></bankers> <bankbranchcode></bankbranchcode> </miscellaneous> <ratios> <pretaxmargin></pretaxmargin> <networkingcapital></networkingcapital> <gearingratio></gearingratio> <equity></equity> <creditordays></creditordays> <debtordays></debtordays> <liquidity></liquidity> <returnoncapitalemployed></returnoncapitalemployed> <returnonassetsemployed></returnonassetsemployed> <currentratio></currentratio> <totaldebtratio></totaldebtratio> <stockturnoverratio></stockturnoverratio> <currentdebtratio></currentdebtratio> <returnonassetsemployed></returnonassetsemployed> </ratios> </financial> </financials> <eventhistory> <eventdetail> (*) <date></date> <text></text>

Page 17: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 17(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

</eventdetail> </eventhistory> <directors> <director> (*) <title></title> <name></name> <address1></address1> <address2></address2> <address3></address3> <address4></address4> <address5></address5> <address6></address6> <postcode></postcode> <birthdate></birthdate> <nationality></nationality> <honours></honours> <directorships> <directorship> (*) <companynumber></companynumber> <companyname></companyname> <companystatus></companystatus> <function></function> <appointeddate></appointeddate> </directorship> </directorships> </director> </directors> <company> <companies> </body> </xmlresponse> Where (*) denotes a repeating group

Figure 3.2.1: GetCompanyInformation Response

The GetCompanyInformation response data returned is briefly described in the following sections. 3.2.1 <baseinformation> Element

The <baseinformation> element contains base company information such as company number, name and address. Additionally this element contains the Standard Industry Codes (SIC) for the company, the company type and accounting dates. 3.2.2 <industries> Element

The <industries> element contains a description of the industries that the company operates in.

3.2.3 <tradingaddresses> Element

The <tradingaddresses> element contains the trading address of the company.

3.2.4 <ratings> Element

Page 18: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 18(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The <ratings> element contains the three most recent credit rating records for the company.

3.2.5 <limits> Element

The <limits> element contains the three most recent credit limit records for the company. 3.2.6 <previousnames> Element

The <previousnames> element contains the three most recent previous names records (i.e. the last three times the company has changed name). 3.2.7 <recordofpayments> Element

The <recordofpayments> element contains all County Court Judgement (CCJ) records for the company within the last three years from the date of request.

3.2.8 <ccjsummary> Element

The <ccjsummary> element contains a summary of the amount and number of current outstanding County Court Judgement (CCJ) records for the company within the last three years of the date of request (i.e. CCJ records at status JG – Judgement). 3.2.9 <statushistorys> Element

The <statushistorys> element contains all status records within the last three years from the date of request. A status record displays details of any adverse state notifications received from Companies House and Gazettes (London, Edinburgh and Belfast) such as administration orders and appointment of liquidators etc. 3.2.10 <mortgages> Element

The <mortgages> element contains all mortgages created within the last three years from the date of request for a company. The element includes the type of mortgage, the mortgage dates and the amount secured.

3.2.11 <mortgagesummary> Element

The <mortgagesummary> element contains a summary of mortgages created within the last three years of the date of request for a company. The summary includes a count of the number of outstanding mortgages and the number of satisfied mortgages.

3.2.12 <shareholders> Element

The <shareholders> element contains a list of the main shareholders in the company.

3.2.13 <shareholdersummary> Element

The <shareholdersummary> element contains the amount of share capital available to the company.

Page 19: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 19(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

3.2.14 <financials> Element

The <financials> element contains the most recent three financial records for the company. The <financials> element stores the financial information in <financial> child elements and includes profit & loss, balance sheet, capital & reserves and key ration information. Table 3.2.14.1 describes the child elements of the <financial> element. XML Element Meaning

<period>

This element contains the financial period (dates) that the financial information relates to.

<profitloss>

This element contains profit and loss information, such as turnover, about the company for the financial period specified by the <period> element

<balancesheet> This element contains balance sheet information, such as assets, about the company for the financial period specified by the <period> element

<capitalreserves> This element contains capital and reserves information, such as shareholder funds, about the company for the financial period specified by the <period> element

<miscellaneous> This element contains miscellaneous information, such as number of employees, about the company for the financial period specified by the <period> element

<ratios> This element contains ratio information, such as gearing ratio, about the company for the financial period specified by the <period> element

Table 3.2.14.1: GetCompanyInformation response <financial> element

3.2.15 <eventhistory> Element

The <eventhistory> element contains all key event records within the last three years from the date of request. The event data returned includes information such as new financial accounts filed, board member changes and secretary changes. 3.2.16 <directors> Element

The <directors> element contains information about all current directors of the company. The director data returned includes name & address information and a list of all current directorship positions held by each director. Please refer to the “Available Data” document for a comprehensive description of the data returned from the GetCompanyInformation operation.

Page 20: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 20(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

3.3 GetCompanyInformation Example Retrieve “standard” credit information for the UK Limited Company with company number “03836192”. The XML for this request is shown in figure 3.3.1.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <operation>GetCompanyInformation</operation> <language>EN</language> <chargereference></chargereference> </header> <body> <package>standard</package> <country>UK</country> <companynumber>03836192</companynumber> </body> </xmlrequest>

Figure 3.3.1: Example GetCompanyInformation XML Request

The response returned by this request is shown in figure 3.3.2. Please note: the response data shown is test data for demonstration purposes. <xmlresponse> <header> <reportinformation> <time>25/07/2005 14:21:22</time> <reporttype>GetCompanyInformation</reporttype> <country>UK</country> <version>4.0</version> <provider>www.creditsafe.com</provider> <chargereference></chargereference> </reportinformation> </header> <body> <companies> <company> <baseinformation> <number>03836192</number> <name>ASA CREDITSAFE.COM (UK) LIMITED</name> <telephone>08456012081</telephone> <tpsregistered>N</tpsregistered> <address1>BRYN HOUSE</address1> <address2>CAERPHILLY BUSINESS PARK</address2> <address3>VAN ROAD CAERPHILLY</address3> <address4>CF83 3GG</address4> <postcode>CF83 3GG</postcode> <siccode>7487</siccode> <sicdescription>OTHER BUSINESS ACTIVITIES</sicdescription> <secondarysiccodes/> <website>creditsafe.com</website> <companytype>Private limited with Share Capital</companytype> <accountstype>Full Accounts</accountstype>

Page 21: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 21(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<annualreturndate>31/08/2004</annualreturndate> <incorporationdate>31/08/1999</incorporationdate> <accountsfilingdate>31/12/2003</accountsfilingdate> <latestaccountsdate>31/12/2003</latestaccountsdate> </baseinformation> <industries> <industry> <name>Credit referencing services</name> </industry> </industries> <tradingaddresses> <tradingaddress> <address1>Bryn House</address1> <address2>Caerphilly Business Park</address2> <address3>Van Road</address3> <address4>Caerphilly</address4> <postcode>CF83 3GG</postcode> <telephone>601 2081</telephone> <tpsregistered>N</tpsregistered> </tradingaddress> </tradingaddresses> <ratings> <ratingdetail> <date>16/07/2003</date> <score>0</score> <description>Caution - Credit at your discretion</description> </ratingdetail> <ratingdetail> <date>12/03/2003</date> <score>-18</score> <description>Financial Statements too old</description> </ratingdetail> <ratingdetail> <date>11/12/2001</date> <score>0</score> <description>Caution - Credit at your discretion</description> </ratingdetail> </ratings> <limits> <limitdetail> <limit>5000000</limit> <date>31/01/2005</date> </limitdetail> <limitdetail> <limit>4000000</limit> <date>25/01/2005</date> </limitdetail> <limitdetail> <limit>1000000</limit> <date>31/10/2004</date> </limitdetail> </limits> <previousnames> <previousname> <name>CREDITSAFE U.K. LTD.</name> <date>03/08/2000</date> </previousname> </previousnames>

Page 22: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 22(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<recordofpayments> <rop> <casenr>WD304526</casenr> <ccjdate>15/08/2003</ccjdate> <ccjdatepaid></ccjdatepaid> <court>WATFORD</court> <ccjstatus>JG</ccjstatus> <ccjamount>1029</ccjamount> </rop> <rop> <casenr>5BF00376</casenr> <ccjdate>23/02/2005</ccjdate> <ccjdatepaid></ccjdatepaid> <court>BRENTFORD</court> <ccjstatus>JG</ccjstatus> <ccjamount>1048</ccjamount> </rop> <rop> <casenr>5QZ09679</casenr> <ccjdate>19/03/2005</ccjdate> <ccjdatepaid></ccjdatepaid> <court>BRADFORD</court> <ccjstatus>JG</ccjstatus> <ccjamount>253</ccjamount> </rop> <rop> <casenr>5QZ20924</casenr> <ccjdate>18/05/2005</ccjdate> <ccjdatepaid></ccjdatepaid> <court>NORTHAMPTON CCBC</court> <ccjstatus>JG</ccjstatus> <ccjamount>5096</ccjamount> </rop> </recordofpayments> <ccjsummary> <values>7426</values> <numbers>4</numbers> <datefrom>02/06/2002</datefrom> <dateto>02/06/2005</dateto> </ccjsummary> <statushistorys> <status> <date>27/05/2005</date> <text>Administration Order</text> </status> <status> <date>20/05/2005</date> <text>App of Admin Receiver Gazette</text> </status> <status> <date>01/04/2005</date> <text>Voluntary Admin/Wind up/Liq</text> </status> <status> <date>01/04/2005</date> <text>REMOVAL OF VOL LIQUIDATOR</text> </status> <status>

Page 23: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 23(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<date>01/03/2005</date> <text>Dis. Winding-Up</text> </status> <status> <date>01/03/2005</date> <text>F 1.11 Start of Moratorium</text> </status> </statushistorys> <mortgages> <mortgagedetail> <mortgagetype>rent deposit deed</mortgagetype> <createddate>07/01/2002</createddate> <registereddate>09/01/2002</registereddate> <satisfieddate></satisfieddate> <status>Outstanding</status> <personsentitled> <personentitled> <name> anthony record and beckett pension trustees (london) ltd </name> </personentitled> </personsentitled> <amountsecured> referred to in a lease of even datepursuant to the lease and under the terms of this deedœ30,000 due or to become due from the company to the chargee </amountsecured> <details>rent deposit account in the sum of œ30,000</details> </mortgagedetail> </mortgages> <mortgagesummary> <outstanding>1</outstanding> <satisfied>0</satisfied> </mortgagesummary> <shareholders> <shareholderdetails> <name>CREDITSAFE BUSINESS INFORMATION NV</name> <shares>2,000,000 ORD œ1</shares> <currency>GBP</currency> </shareholderdetails> </shareholders> <shareholdersummary> <sharecapital>2000000</sharecapital> </shareholdersummary> <financials> <financial> <period> <datefrom>01/01/2003</datefrom> <dateto>31/12/2003</dateto> <periodmonths>12</periodmonths> <currency>GBP</currency> </period> <profitloss> <consolidatedaccounts>N</consolidatedaccounts> <turnover>2804040</turnover> <export>0</export> <costofsales>0</costofsales>

Page 24: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 24(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<grossprofit>0</grossprofit> <wagessalaries>2445231</wagessalaries> <operatingprofits>-1636061</operatingprofits> <depreciation>210052</depreciation> <auditfees>15000</auditfees> <interestpayments>64105</interestpayments> <pretax>-1700021</pretax> <taxation>0</taxation> <posttax>-1700021</posttax> <dividendspayable>0</dividendspayable> <retainedprofits>-1700021</retainedprofits> <directorsemoluments>119394</directorsemoluments> </profitloss> <balancesheet> <tangibleassets>276525</tangibleassets> <intangibleassets>0</intangibleassets> <fixedassets>276525</fixedassets> <currentassets>1213150</currentassets> <tradedebtors>833296</tradedebtors> <stock>0</stock> <cash>121893</cash> <othercurrentassets>257961</othercurrentassets> <increaseincash>35472</increaseincash> <miscellaneouscurrentassets>0</miscellaneouscurrentassets> <totalassets>1489675</totalassets> <totalcurrentliabilities>670007</totalcurrentliabilities> <tradecreditors>241313</tradecreditors> <overdraft>0</overdraft> <othershorttermfinance>61585</othershorttermfinance> <miscellaneouscurrentliabilities>367109 </miscellaneouscurrentliabilities> <otherlongtermfinance>3021315</otherlongtermfinance> <longtermliabilities>5101410</longtermliabilities> <overdraftlongtermliabilites> 5101410 </overdraftlongtermliabilites> <liabilities>5771417</liabilities> <netassets>-4281742</netassets> <workingcapital>543143</workingcapital> </balancesheet> <capitalreserves> <paidupequity>2000000</paidupequity> <profitlossreserve>-9567149</profitlossreserve> <sundryreserves>3285407</sundryreserves> <revalutationreserve>0</revalutationreserve> <reserves>-6281742</reserves> <networth>-4281742</networth> <shareholderfunds>-4281742</shareholderfunds> </capitalreserves> <miscellaneous> <netcashflowfromoperations>0</netcashflowfromoperations> <netcashflowbeforefinancing>0</netcashflowbeforefinancing> <netcashflowfromfinancing>0</netcashflowfromfinancing> <contingentliability>Yes</contingentliability> <capitalemployed>819668</capitalemployed> <employees>113</employees> <auditors>PRICEWATERHOUSECOOPERS LLP</auditors> <auditqualification>Adverse Comments</auditqualification>

Page 25: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 25(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<bankers>DEN NORSKE BANK</bankers> <bankbranchcode>40-51-14</bankbranchcode> </miscellaneous> <ratios> <pretaxmargin>-60.6 %</pretaxmargin> <networkingcapital>5.16</networkingcapital> <gearingratio>-119.1 %</gearingratio> <equity>-287.4 %</equity> <creditordays>31.41</creditordays> <debtordays>108.47</debtordays> <liquidity>1.81</liquidity> <returnoncapitalemployed>-207.4 %</returnoncapitalemployed> <returnonassetsemployed>-114.1 %</returnonassetsemployed> <currentratio>1.81</currentratio> <totaldebtratio>-1.4 %</totaldebtratio> <stockturnoverratio>0.0 %</stockturnoverratio> <currentdebtratio>-0.2 %</currentdebtratio> <returnonnetassetsemployed>39.7 %</returnonnetassetsemployed> </ratios> </financial> </financials> <eventhistory> <eventdetail> <date>27/02/2006</date> <text>Linus Murphy has left the board</text> </eventdetail> </eventhistory> <directors> <director> <title></title> <name>CATO SYVERSEN</name> <address1>84 NINIAN ROAD</address1> <address2>CARDIFF</address2> <address3>SOUTH GLAMORGAN</address3> <address4></address4> <address5></address5> <address6></address6> <postcode>CF23 5EP</postcode> <birthdate>28/12/1965</birthdate> <nationality></nationality> <honours></honours> <directorships> <directorship> <companynumber> 03836192</companynumber> <companyname>ASA CREDITSAFE.COM (UK) LIMITED</companyname> <companystatus>Active</companystatus> <function>Director</function> <appointeddate>12/08/2003</appointeddate> </directorship> </directorships> </director> </directors> </company> </companies> </body> </xmlresponse>

Figure 3.3.2: Example GetCompanyInformation response

Page 26: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 26(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

4 CompanySearch Operation 4.1 CompanySearch Request The CompanySearch operation returns a list of limited companies that match the search criteria specified in the request <body>. The structure for an XML request to call this function is shown in Figure 4.1.1 below.

<xmlrequest> <header> <username>Username</username> <password>Password</password> <language>EN</language> <operation>CompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber>CompanyNumber</companynumber> <name>NameSearch</name> <namesearchmode>SearchMode</namesearchmode> <address>AddressSearch</address> <addresssearchmode>SearchMode</addresssearchmode> <postcode>Postcode</postcode> <telephone>Telephone</telephone> <country>Country</country> <startposition>StartPosition</startposition> <pagesize>PageSize</pagesize> </body> </xmlrequest>

Figure 4.1.1: CompanySearch XML Request

The CompanySearch request <header> element has the same structure as all other operation requests. The <operation> element must have the value CompanySearch.

Page 27: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 27(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The search criteria information that can be provided in the <body> element is shown in table 4.1.1. A company search is case insensitive. XML Element Meaning Supported Values

<companynumber> The company number denotes a company number of the company to search for. If a company number is specified then this overrides the search criteria.

Any valid company number

<name> This is the search criteria for the company name.

Any text

<namesearchmode> This is the search criteria operator for the company name

Begin Contain (see section 4.1.1 below for more information)

<address> This is the search criteria for the company address.

Any text

<addresssearchmode> This is the search criteria for the company address.

Begin Contain (see section 4.1.1 below for more information)

<postcode> This is the search criteria for the company postcode. Records that match this postcode are returned.

Valid postcode

<telephone> This is the search criteria for the company telephone number. Records that match this telephone number are returned.

Valid telephone number

<country> This is the Country to search in.

UK – United Kingdom

<startposition> A search can return many records. This specifies the start position to view records from.

A numeric value (see section 4.1.2. for more information)

<pagesize> A search can return many records. This specifies the maximum number of records to return in a response message.

A numeric value in the range 1 to 25 (inclusive) (see section 4.1.2 for more information)

Table 4.1.1: CompanySearch <body> element

Page 28: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 28(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

4.1.1 Search Mode

The <namesearchmode> element and <addresssearchmode> element can take one of three values: Begin, Contain and Exact. The meaning of these values is described in table 4.1.1.2. Value Meaning

Begin This will return company data that starts with the value in the element. Example 1 If <name> is “albert” and <namesearchmode> is “Begin” then all companies with a name that starts with “albert” would be returned such as “Albert and Company Limited”. Example 2 If <address> is “albert” and <addresssearchmode> is “Begin” then all companies with an address that starts with “albert” would be returned such as “1-2-1 Loans and Mortgages, Albert Street”.

Contain This will return company data that contains the value in the element. Example 1 If <name>is “albert” and <namesearchmode> is “Contain” then all companies with a name that contains the text “albert” would be returned such as “Café Albert”. Example 2 If <address> is “albert” and <addresssearchmode> is “Contain” then all companies with an address that contains the text “albert” would be returned such as “Aboutnet Limited, Price Albert Street”.

Table 4.1.1.2: Search Mode Values

Page 29: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 29(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

4.1.2 Search Result Paging

A search could potentially return thousands of records. The <pagesize> element and <startposition> element can be used to make these results more manageable by paging them. The <pagesize> element specifies the maximum number of records to return in a response. This value must be in the range 1 to 25 (inclusive). The <startposition> specifies the starting point in the search results to return records from. For example, consider a search that returns 100 records with a <pagesize> element value of 25. • To view the records from 1 to 25, the <startposition> must be 1. • To view the records from 26 to 50 the <startposition> must be set to 26. • To view the records from 51 to 75 the <startposition> must be set to 51. • To view the records from 76 to 100 the <startposition> must be set to 76. Example 1 User “DemoUser” wishes to call the CompanySearch operation to retrieve all companies that have an address as “Albert Hall” in the UK then the request XML would be as shown in figure 4.1.2.1.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>CompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber></companynumber> <name></name> <namesearchmode></namesearchmode> <address>Albert Hall</address> <addresssearchmode>Contains</addresssearchmode> <postcode></postcode> <telephone></telephone> <country>UK</country> <startposition>1</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 4.1.2.1: Example CompanySearch XML Request

The request XML shown in figure 4.1.2.1 would return the first 25 records.

Page 30: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 30(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Example 2 In order to view the next 25 records returned by the search demonstrated in Example 1, an XML request as shown in figure 4.1.2.2 would need to be sent to GetData.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>CompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber></companynumber> <name></name> <namesearchmode></namesearchmode> <address>Albert Hall</address> <addresssearchmode>Contains</addresssearchmode> <postcode></postcode> <telephone></telephone> <country>UK</country> <startposition>26</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 4.1.2.2: Example CompanySearch XML Request

Figure 4.1.2.2 shows that the <startposition> element has been changed from “1” to “26”.

Page 31: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 31(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

4.2 CompanySearch Response

The CompanySearch function returns a list of limited companies that match search criteria specified in the XML request. The response returned for a CompanySearch request is shown in figure 4.2.1 below.

<xmlresponse> <header> <reportinformation> <time></time> <reporttype></reporttype> <country></country> <version></version> <provider></provider> <chargereference></chargereference> </reportinformation> </header> <body> <resultcounters> <startposition></startposition> <endposition></endposition> <totalcount></totalcount> <pagesize></pagesize> </resultcounters> <results> <result> (*) <name></name> <number></number> <country></country> <address></address> </result> </results> </body> </xmlresponse> (*) denotes a repeating group

Figure 4.2.1: CompanySearch Response

The <header> element is the standard response header as described in section 2.4 of this document.

Page 32: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 32(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The <body> element contains a <results> child element with two child elements <resultcounters> and <result>. Table 4.2.1 describes each of these elements. XML Element Meaning Values

<resultcounters> This element is a container for the counter information such as the current records displayed and the total number of records that matched the search criteria

Please see section 4.2.1 for more information about the result counter elements

<results> This is a container element for the search results data

N/A

<result> This element is a container for the actual data records that matched the search criteria

Please see section 4.2.2 for more information about the result elements

Table 4.2.1: CompanySearch response <body> element

4.2.3 <resultcounters> Element

The <resultcounters> element is a container for the search results counter information. Table 4.2.1.1 describes the <resultcounters> elements. The <resultcounters> elements are used in conjunction with the paging functionality.

XML Element Meaning

<startposition> This element holds the position of the first record being displayed (as specified in the request XML).

<endposition> This element holds the position of the last record being displayed.

<totalcount> This element shows the total number of records that matched the search criteria. This value never changes regardless of which page is being displayed.

<pagesize>

This element shows the current page size (as specified in the request XML)

Table 4.2.1.1: CompanySearch <resultcounters> element

Page 33: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 33(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

4.2.4 <result> Element

The <result> element displays the data for a company that matched the search criteria. Table 4.2.2.1 describes the <result> element.

XML Element Meaning

<name> The name of the company that matched the search criteria

<number> The company number of the company that matched the search criteria

<country> The country of the company that matched the search criteria

<address>

The address of the company that matched the search criteria

Table 4.2.2.1: CompanySearch <result> element

4.3 CompanySearch Example To retrieve all UK Companies with an address that contains “Albert Hall” in the UK then the request XML would be as shown in Figure 4.3.1.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>CompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber></companynumber> <address>Albert Hall</address> <addresssearchmode>Contain</addresssearchmode> <postcode></postcode> <telephone></telephone> <country>UK</country> <startposition>1</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 4.3.1: Example CompanySearch XML Request

Page 34: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 34(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The response returned by this request is shown in Figure 4.3.2. The response would show the first 25 records that match the search criteria as <pagesize> has the value 25 and <startposition> has the value 1.

<xmlresponse> <header> <reportinformation> <time>25/07/2005 14:21:22</time> <reporttype>CompanySearch</reporttype> <country>UK</country> <version>4.0</version> <provider>www.creditsafe.com</provider> <chargereference></chargereference> </reportinformation> </header> <body> <resultcounters> <startposition>1</startposition> <endposition>25</endposition> <totalcount>88</totalcount> <pagesize>25</pagesize> </resultcounters> <results> <result> <name>"CERTAIN-VERTIGO" LIMITED</name> <number>03830676</number> <country>UK</country> <address>84 ALBERT HALL MANSIONS</address> </result> <result> <name>A2ZTRAINING LTD</name> <number>05057929</number> <country>UK</country> <address>84 ALBERT HALL MANSIONS</address> </result> ... <result> <name>GLOBAL PRINTING MACHINERY LIMITED</name> <number>03325757</number> <country>UK</country> <address>84 ALBERT HALL MANSIONS</address> </result> </results> </body> </xmlresponse>

Figure 4.3.2: Example CompanySearch response

Note: Only the 1st, 2nd and 25th records are shown in figure 4.3.2.

Page 35: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 35(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

5 GetNonLtdCompanyInformation Operation 5.1 GetNonLtdCompanyInformation Request The GetNonLtdCompanyInformation operation returns credit information for a non-limited company with the specified company number. The structure of an XML request to call the GetNonLtdCompanyInformation operation is shown in Figure 5.1.1 below.

<xmlrequest> <header> <username>Username</username> <password>Password</password> <language>EN</language> <operation>GetNonLtdCompanyInformation</operation> <chargereference></chargereference> </header> <body> <package>Package</package> <country>Country</country> <companynumber>CompanyNumber</companynumber> </body> </xmlrequest>

Figure 5.1.1: GetNonLtdCompanyInformation XML Request

The GetNonLtdCompanyInformation request <header> element has the same structure as all other operation requests. The <operation> element must have the value GetNonLtdCompanyInformation. The information that must be provided in the <body> element is shown in table 5.1.1. XML Element Meaning Supported Values

<package> The package name determines the data to return

A valid data package name

<country> The Country to return the data from UK – United Kingdom

<companynumber> The company number of the non-limited company to return the credit information on

A valid non-limited company number

Table 5.1.1: GetNonLtdCompanyInformation <body> element

Page 36: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 36(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Example 1 User “DemoUser” wishes to call the GetNonLtdCompanyInformation operation to retrieve the credit information defined by the “nonltdstandard” package on the UK Company with company number “00000001”. The request XML would be as shown in Figure 5.1.2.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>GetNonLtdCompanyInformation</operation> <chargereference></chargereference> </header> <body> <package>nonltdstandard</package> <country>UK</country> <companynumber>00000001</companynumber> </body> </xmlrequest>

Figure 5.1.2: Example GetNonLtdCompanyInformation XML Request

Example 2 User “DemoUser” wishes to call the GetNonLtdCompanyInformation operation to retrieve the credit information defined by the “nonltdstandard” package on the UK Company with company number “XYZ00006”. The request XML would be as shown in figure 5.1.3.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>GetNonLtdCompanyInformation</operation> <chargereference></chargereference> </header> <body> <package>nonltdstandard</package> <country>UK</country> <companynumber>XYZ00006</companynumber> </body> </xmlrequest>

Figure 5.1.3: Example GetNonLtdCompanyInformation XML Request

Page 37: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 37(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

5.2 GetNonLtdCompanyInformation Response

This GetNonLtdCompanyInformation operation returns credit information for a non-limited company with the specified company number. The response consists of the standard response <header> element and a response <body> element. The response <body> element contains the actual company information. The GetNonLtdCompanyInformation response is shown in figure 5.2.1. <xmlresponse> <header> <reportinformation> <time></time> <reporttype></reporttype> <country></country> <version></version> <provider></provider> <chargereference></chargereference> </reportinformation> </header> <body> <companies> <company> <baseinformation>

<number></number> <name></name> <address1></address1> <address2></address2> <address3></address3> <address4></address4> <postcode></postcode> <mpsregistered></mpsregistered> <addressdate></addressdate> <addressreason></addressreason> <premisestype></premisestype>

<telephonenumbers> <telephonenumber> (*) <telephone></telephone> <tpsregistered></tpsregistered> <main></main> </telephonenumber> </telephonenumbers> <faxnumbers> <faxnumber> (*) <fax></fax> <fpsregistered></fpsregistered> <main></main> </faxnumber> </faxnumbers> <activities></activities> <employees></employees> <website></website> <email></email> </baseinformation> <ratings> <ratingdetail> (*) <date></date>

Page 38: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 38(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<score></score> <description></description> </ratingdetail> </ratings> <limits> <limitdetail> (*) <limit></limit> <date></date> </limitdetail> </limits> <matchedccjsummary> <value></value> <number></number> <datefrom></datefrom> <dateto></dateto> </matchedccjsummary> <matchedrecordofpayments> <rop> (*) <casenr></casenr> <ccjdate></ccjdate> <ccjdatepaid></ccjdatepaid> <court></court> <ccjstatus></ccjstatus> <ccjamount></ccjamount> <against></against> <address></address> </rop> </matchedrecordofpayments> <possiblematchedccjsummary> <value></value> <number></number> <datefrom></datefrom> <dateto></dateto> </possiblematchedccjsummary> <possiblematchedrecordofpayments> <rop> (*) <casenr></casenr> <ccjdate></ccjdate> <ccjdatepaid></ccjdatepaid> <court></court> <ccjstatus></ccjstatus> <ccjamount></ccjamount> <against></against> <address></address> </rop> </possiblematchedrecordofpayments> <seniorexecutive> <name></name> <position></position> <email></email> </seniorexecutive> <events> <eventdetail> (*) <date></date> <text></text> </eventdetail> </events> </company>

Page 39: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 39(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

</companies> </body> </xmlresponse> Where (*) denotes a repeating group

Figure 5.2.1: GetNonLtdCompanyInformation Response

The GetNonLtdCompanyInformation response data returned is briefly described in the following sections. 5.2.1 <baseinformation> Element

The <baseinformation> element contains base company information such as company number, name, address, telephone numbers and fax numbers.

5.2.2 <ratings> Element

The <ratings> element contains the three most recent credit rating records for the company.

5.2.3 <limits> Element

The <limits> element contains the three most recent credit limit records for the company. 5.2.4 <matchedccjsummary> Element

The <matchedccjsummary> element contains a summary (number and total value) of all matched outstanding County Court Judgments (CCJ) against the company in the past three years. 5.2.5 <matchedrecordofpayments> Element

The <matchedrecordofpayments> element contains the details of all matched outstanding County Court Judgments against the company in the past three years.

5.2.6 <possiblematchedccjsummary> Element

The <possiblematchedccjsummary> element contains a summary (number and total value) of all possible matched outstanding County Court Judgments (CCJ) against the company in the past three years. 5.2.7 <possiblematchedrecordofpayments> Element

The <possiblematchedrecordofpayments> element contains the details of all possible matched outstanding County Court Judgments against the company in the past three years. 5.2.8 <seniorexecutive> Element

The <seniorexecutive> element contains person contact details information for the senior executive at the company.

5.2.9 <events> Element

The <events> element contains all event records within the last three years from the date of request. An event record displays information such as new ccjs, change of address etc. Please refer to the “Available Data” document for a comprehensive description of the data returned from the GetNonLtdCompanyInformation operation.

Page 40: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 40(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

5.3 GetNonLtdCompanyInformation Example This example will retrieve “nonltdstandard” credit information for the UK Non-Limited Company with company number “9999999”. The XML for this request is shown in figure 5.3.1.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <operation>GetNonLtdCompanyInformation</operation> <language>EN</language> <chargereference></chargereference> </header> <body> <package>nonltdstandard</package> <country>UK</country> <companynumber>99999999</companynumber> </body> </xmlrequest>

Figure 5.3.1: Example GetNonLtdCompanyInformation XML Request

The response returned by this request is shown in figure 5.3.2. Please note: the response data shown is test data for demonstration purposes. <xmlresponse> <header> <reportinformation> <time>27/01/2006 11:09:13</time> <reporttype>GetNonLtdCompanyInformation</reporttype> <country>UK</country> <version>4.0</version> <provider>www.creditsafe.com</provider> <chargereference></chargereference> </reportinformation> </header> <body> <companies> <company> <baseinformation> <number>9999999</number> <name>NON LIMITED TEST COMPANY</name> <address1>THE BIG HOUSE,999 LETS B AVENUE</address1> <address2>THE COVE</address2> <address3>PENARTH</address3> <address4>VALE OF GLAMORGAN</address4> <postcode>CF00 8PP</postcode> <mpsregistered>Y</mpsregistered> <addressdate>05/2000</addressdate> <addressreason>New Business</addressreason> <premisestype>Office &amp; Administration</premisestype> <telephonenumbers> <telephonenumber> <telephone>02920886500</telephone>

Page 41: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 41(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<tpsregistered>N</tpsregistered> <main></main> </telephonenumber> </telephonenumbers> <faxnumbers> <faxnumber> <fax>029 20 886500</fax> <fpsregistered>Y</fpsregistered> <main>Y</main> </faxnumber> <faxnumber> <fax>029 20 886500</fax> <fpsregistered>Y</fpsregistered> <main>N</main> </faxnumber> </faxnumbers> <activities>SAMPLE COMPANY AND TESTING</activities> <employees>10</employees> <website>CREDITSAFEUK.COM</website> <email>[email protected]</email> </baseinformation> <ratings> <ratingdetail> <date>12/05/2005</date> <score>70</score> <description>Good Credit Worthiness</description> </ratingdetail> <ratingdetail> <date>01/04/2005</date> <score>89</score> <description>Very Good Credit Worthiness</description> </ratingdetail> </ratings> <limits> <limitdetail> <limit>3000</limit> <date>12/05/2005</date> </limitdetail> <limitdetail> <limit>4000</limit> <date>01/04/2005</date> </limitdetail> </limits> <matchedccjsummary> <value>250</value> <number>1</number> <datefrom>27/01/2003</datefrom> <dateto>27/01/2006</dateto> </matchedccjsummary> <matchedrecordofpayments> <rop> <casenr>TEST0001</casenr> <ccjdate>26/01/2006</ccjdate> <ccjdatepaid></ccjdatepaid> <court>TEST COURT</court> <ccjstatus>JG</ccjstatus> <ccjamount>250</ccjamount> <against>NON LIMITED TEST COMPANY</against>

Page 42: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 42(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<address>THE BIG HOUSE,999 LETS B AVENUE</address> </rop> </matchedrecordofpayments> <possiblematchedccjsummary> <value>550</value> <number>1</number> <datefrom>27/01/2003</datefrom> <dateto>27/01/2006</dateto> </possiblematchedccjsummary> <possiblematchedrecordofpayments> <rop> <casenr>TEST0002</casenr> <ccjdate>26/01/2006</ccjdate> <ccjdatepaid></ccjdatepaid> <court>TEST COURT</court> <ccjstatus>JG</ccjstatus> <ccjamount>550</ccjamount> <against>NON LIMITED TEST COMPANY</against> <address>THE BIG HOUSE,999 LETS B AVENUE</address> </rop> </possiblematchedrecordofpayments> <seniorexecutive> <name>MR GARETH EVANS</name> <position>ASSISTANT IT MANAGER</position> <email>[email protected]</email> </seniorexecutive> <events> <eventdetail> <date>12/05/2005</date> <text>Company Activities</text> </eventdetail> <eventdetail> <date>12/05/2005</date> <text>Address details changed</text> </eventdetail> <eventdetail> <date>12/05/2005</date> <text>Contact /Exec details changed</text> </eventdetail> </events> </company> </companies> </body> </xmlresponse>

Figure 5.3.2: Example GetNonLtdCompanyInformation response

Page 43: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 43(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

6 NonLtdCompanySearch Operation 6.1 NonLtdCompanySearch Request The NonLtdCompanySearch operation returns a list of non-limited companies that match search criteria specified in the request <body>. The structure for an XML request to call this function is shown in Figure 6.1.1 below.

<xmlrequest> <header> <username>Username</username> <password>Password</password> <language>EN</language> <operation>NonLtdCompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber>CompanyNumber</companynumber> <name>NameSearch</name> <namesearchmode>SearchMode</namesearchmode> <address>AddressSearch</address> <addresssearchmode>SearchMode</addresssearchmode> <postcode>Postcode</postcode> <telephone>Telephone</telephone> <country>Country</country> <startposition>StartPosition</startposition> <pagesize>PageSize</pagesize> </body> </xmlrequest>

Figure 6.1.1: NonLtdCompanySearch XML Request

The CompanySearch request <header> element has the same structure as all other operation requests. The <operation> element must have the value NonLtdCompanySearch.

Page 44: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 44(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The search criteria information that can be provided in the <body> element is shown in table 6.1.1. A company search is case insensitive. XML Element Meaning Supported Values

<companynumber> The company number denotes a company number of the company to search for. If a company number is specified then this overrides the search criteria.

Any valid company number

<name> This is the search criteria for the company name.

Any text

<namesearchmode> This is the search criteria operator for the company name

Begin Contain (see section 6.1.1 below for more information)

<address> This is the search criteria for the company address.

Any text

<addresssearchmode> This is the search criteria for the company address.

Begin Contain (see section 6.1.1 below for more information)

<postcode> This is the search criteria for the company postcode. Records that match this postcode are returned.

Valid postcode

<telephone> This is the search criteria for the company telephone number. Records that match this telephone number are returned.

Valid telephone number

<country> This is the Country to search in.

UK – United Kingdom

<startposition> A search can return many records. This specifies the start position to view records from.

A numeric value (see section 6.1.2. for more information)

<pagesize> A search can return many records. This specifies the maximum number of records to return in a response message.

A numeric value in the range 1 to 25 (inclusive) (see section 6.1.2 for more information)

Table 6.1.1: NonLtdCompanySearch <body> element

Page 45: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 45(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

6.1.1 Search Mode

The <namesearchmode> element and <addresssearchmode> element can take one of three values: Begin, Contain and Exact. The meaning of these values is described in table 6.1.1.1. Value Meaning

Begin This will return company data that starts with the value in the element. Example 1 If <name> is “albert” and <namesearchmode> is “Begin” then all companies with a name that starts with “albert” would be returned such as “Albert Tague”. Example 2 If <address> is “albert” and <addresssearchmode> is “Begin” then all companies with an address that starts with “albert” would be returned such as “3 Albert Street”.

Contain This will return company data that contains the value in the element. Example 1 If <name>is “albert” and <namesearchmode> is “Contain” then all companies with a name that contains the text “albert” would be returned such as “Prince Albert Hotel”. Example 2 If <address> is “albert” and <addresssearchmode> is “Contain” then all companies with an address that contains the text “albert” would be returned such as “61 Alberta Road”.

Table 6.1.1.1: Search Mode Values

Page 46: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 46(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

6.1.2 Search Result Paging

A search could potentially return thousands of records. The <pagesize> element and <startposition> element can be used to make these results more manageable by paging them. The <pagesize> element specifies the maximum number of records to return in a response. This value must be in the range 1 to 25 (inclusive). The <startposition> specifies the starting point in the search results to return records from. For example, consider a search that returns 100 records with a <pagesize> element value of 25. • To view the records from 1 to 25, the <startposition> must be 1. • To view the records from 26 to 50 the <startposition> must be set to 26. • To view the records from 51 to 75 the <startposition> must be set to 51. • To view the records from 76 to 100 the <startposition> must be set to 76. Example 1 User “DemoUser” wishes to call the NonLtdCompanySearch operation to retrieve all companies that have an address as “Albert Hall” in the UK then the request XML would be as shown in figure 6.1.2.1.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>NonLtdCompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber></companynumber> <name></name> <namesearchmode></namesearchmode> <address>Albert Hall</address> <addresssearchmode>Contains</addresssearchmode> <postcode></postcode> <telephone></telephone> <country>UK</country> <startposition>1</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 6.1.2.1: Example NonLtdCompanySearch XML Request

The request XML shown in figure 6.1.2.1 would return the first 25 records.

Page 47: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 47(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Example 2 In order to view the next 25 records returned by the search demonstrated in Example 1, an XML request as shown in figure 6.1.2.2 would need to be sent to GetData.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>NonLtdCompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber></companynumber> <name></name> <namesearchmode></namesearchmode> <address>Albert Hall</address> <addresssearchmode>Contains</addresssearchmode> <postcode></postcode> <telephone></telephone> <country>UK</country> <startposition>26</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 6.1.2.2: Example NonLtdCompanySearch XML Request

Figure 6.1.2.2 shows that the <startposition> element has been changed from “1” to “26”.

Page 48: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 48(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

6.2 NonLtdCompanySearch Response

The NonLtdCompanySearch function returns a list of Non-Limited companies that match the search criteria specified in the XML request. The response returned for a NonLtdCompanySearch request is shown in figure 6.2.1 below.

<xmlresponse> <header> <reportinformation> <time></time> <reporttype></reporttype> <country></country> <version></version> <provider></provider> <chargereference></chargereference> </reportinformation> </header> <body> <resultcounters> <startposition></startposition> <endposition></endposition> <totalcount></totalcount> <pagesize></pagesize> </resultcounters> <results> <result> (*) <companyname></companyname> <companynumber></companynumber> <country></country> <address></address> </result> </results> </body> </xmlresponse> (*) denotes a repeating group

Figure 6.2.1: NonLtdCompanySearch Response

The <header> element is the standard response header as described in section 2.4 of this document.

Page 49: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 49(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The <body> element contains a <results> child element with two child elements <resultcounters> and <result>. Table 6.2.1 describes each of these elements. XML Element Meaning Values

<resultcounters> This element is a container for the counter information such as the current records displayed and the total number of records that matched the search criteria

Please see section 6.2.1 for more information about the result counter elements

<results> This is a container element for the search results data

N/A

<result> This element is a container for the actual data records that matched the search criteria

Please see section 6.2.2 for more information about the result elements

Table 6.2.1: NonLtdCompanySearch response <body> element

6.2.1 <resultcounters> Element

The <resultcounters> element is a container for the search results counter information. Table 6.2.1.1 describes the <resultcounters> elements. The <resultcounters> elements are used in conjunction with the paging functionality.

XML Element Meaning

<startposition> This element holds the position of the first record being displayed (as specified in the request XML).

<endposition> This element holds the position of the last record being displayed.

<totalcount> This element shows the total number of records that matched the search criteria. This value never changes regardless of which page is being displayed.

<pagesize>

This element shows the current page size (as specified in the request XML)

Table 6.2.1.1: NonLtdCompanySearch <resultcounters> element

Page 50: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 50(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

6.2.2 <result> Element

The <result> element displays the data for a company that matched the search criteria. Table 6.2.2.1 describes the <result> element.

XML Element Meaning

<companyname> The name of the company that matched the search criteria

<companynumber> The company number of the company that matched the search criteria

<country> The country of the company that matched the search criteria

<address>

The address of the company that matched the search criteria

Table 6.2.2.1: NonLtdCompanySearch <result> element

6.3 NonLtdCompanySearch Example To retrieve all UK Non-Limited Companies with an address that contains “Albert Hall” in the UK then the request XML would be as shown in Figure 6.3.1.

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>NonLtdCompanySearch</operation> <chargereference></chargereference> </header> <body> <companynumber></companynumber> <address>Albert Hall</address> <addresssearchmode>Contain</addresssearchmode> <postcode></postcode> <telephone></telephone> <country>UK</country> <startposition>1</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 6.3.1: Example NonLtdCompanySearch XML Request

Page 51: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 51(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The response returned by this request is shown in Figure 6.3.2. The response would show the first 25 records that match the search criteria as <pagesize> has the value 25 and <startposition> has the value 1. In this case there are only 18 records that match the search criteria so all 18 records are returned.

<xmlresponse> <header> <reportinformation> <time>25/07/2005 14:21:22</time> <reporttype>CompanySearch</reporttype> <country>UK</country> <version>4.0</version> <provider>www.creditsafe.com</provider> <chargereference></chargereference> </reportinformation> </header> <body> <resultcounters> <startposition>1</startposition> <endposition>18</endposition> <totalcount>18</totalcount> <pagesize>25</pagesize> </resultcounters> <results> <result> <name>MANCHESTER SOCIAL SERVICES</name> <number>1183069</number> <country>UK</country> <address>HEAD OFFICE,TOWN HALL,ALBERT SQ</address> </result> <result> <name>OPTION TECHNOLOGIES LTD</name> <number>1388181</number> <country>UK</country> <address>ALBERT HALL,161 ALBERT ST</address> </result> … <result> <name>HORLEY COMMUNITY PRE-SCHOOL</name> <number>929434</number> <country>UK</country> <address>STRAWSON HALL,ALBERT RD</address> </result> </results> </body> </xmlresponse>

Figure 6.3.2: Example NonLtdCompanySearch response

Note: Only the 1st, 2nd and 18th records are shown in figure 6.3.2.

Page 52: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 52(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

7 Error Response 7.1 Error Response Structure If an XML request message contains an error, such as an invalid username/password or an incorrectly formatted <body> element then an error response is returned. Figure 7.1.1 shows the structure of an error response. <xmlresponse> <header> <reportinformation> <time>Time</time> <reporttype>ReportType</reporttype> <country>Country</country> <version>Version</version> <provider>www.creditsafe.com</provider> <chargereference></chargereference> </reportinformation> </header> <body> <errors> <errordetail> (*) <code>Error Code</code> <desc>Error Message</desc> </errordetail> </errors> </body> </xmlresponse> Where (*) denotes repeating group

Figure 7.1.1: Error response structure

The <header> structure is the standard response header. The <body> element contains an <errors> element. The information contained in the <errors> element is described in Table 7.1.1. XML Element Meaning Values

<errordetail> This is a container element for error information.

N/A

<code> This element holds an error number that identifies the error.

An error code e.g. “130”

<desc> This element holds an error message that provides a meaningful description about the error.

An error description e.g. “Invalid Account”

Table 7.1.1: Response <errors> element

Page 53: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 53(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Figure 7.1.2 below shows an example error response message. <xmlresponse> <header> <reportinformation> <time>25/07/2005 15:30:12</time> <reporttype>CompanySearchError</reporttype> <country>UK</country> <version>4.0</version> <provider>www.creditsafe.com</provider> <chargereference></chargereference> </reportinformation> </header> <body> <errors> <errordetail> <code>130</code> <desc>Invalid account</desc> </errordetail> </errors> </body> </xmlresponse>

Figure 7.1.2: Example error response message

Please refer to the “Error Responses” document for a comprehensive description of www.creditsafeUK.com GetData Web Service error responses.

Page 54: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 54(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

8 Using www.creditsafeuk.com GetData Web Service 8.1 Client Implementations The www.creditsafeuk.com GetData Web Service supports Representation State Transfer (REST) and Simple Object Access Protocol (SOAP) implementations and can be called from any programming language/platform that supports these technologies. This section provides example code that calls the www.creditsafeuk.com GetData Web Service using .NET Framework, a SOAP Toolkit and REST. 8.2 .NET Framework In this example a Microsoft .NET Framework Windows application is created that calls the www.creditsafeuk.com GetData Web Service. 1. Using Microsoft Visual Studio.NET create a new Windows Application Visual C# Project

named “Windows_client_Sample” as shown in figure 8.2.1.

Figure 8.2.1: Visual Studio.NET create project dialog

This creates a Windows Application project containing a form named “form1”.

Page 55: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 55(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

2. Right-click on the Project name and select “Add Web Reference” from the pop-up menu as shown in figure 8.2.2.

Figure 6.2.2: Add a Web Reference

3. The “Add Web Reference” dialog box appears. In the URL combo-box enter the

GetData (UK) URL:

https://www.creditsafeuk.com/GetDataUK/Service/CreditsafeServices.asmx Click the “Go” button next to the URL combo-box. The “Add Web Reference” dialog will retrieve the methods available from the URL entered and display them as shown in figure 8.2.3.

Figure 8.2.3: GetData Web Reference Dialog

Page 56: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 56(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

The “Add Web Reference” dialog lists the methods exposed by the Web Service. In this case there is one Web Method named “GetData”.

4. On the “Add Web Reference” dialog enter the name “GetData” in the “Web reference

name:” textbox and click the “Add Reference” button. This adds “GetData” to the project web references as shown in figure 8.2.4.

Figure 8.2.4: GetData Web Reference

Adding a Web Reference to a project creates a proxy class that that can be used to invoke the web methods exposed by the Web Service. The class has methods identical to those of the Web Service. Variables can be created whose data type is this proxy class as shown in the following line of C# code.

GetData.CreditsafeServices objData = new GetData.CreditsafeServices();

This proxy class contains methods that correspond to the Web Methods exposed by the GetData Web Service. Figure 6.2.5 shows some method automatically created in the proxy class and the GetData method is highlighted.

Figure 8.2.5: GetData proxy class methods

A call to the proxy class GetData method is used to make a call to the www.creditsafeuk.com GetData Web Method.

Page 57: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 57(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

5. In the “Windows_client_Sample” project double click on the “form1” to display the form editor. Modify the form so that it looks like figure 8.2.6. Table 8.2.1 shows the property values to create this form.

Object Property Value

Form1 Text GetData Windows Client Sample

Width 696 Height 512 Label1 Location X 8

Y 8 Size

Width 100 Height 23 Text Request XML:

Textbox1 Name txtRequest Multiline True Scrollbars Vertical Location

X 120 Y 8

Size Width 552 Height 208

Button1 Name cmdGetData Text GetData Location X 120

Y 224 Size Width 75 Height 23 Label2 Location X 12 Y 256

Size Width 100

Height 23 Text Response XML: Textbox2 Name txtResponse Multiline True Scrollbars Vertical Location X 124

Y 256 Size

Width 552 Height 208

Table 8.2.1: form1 properties

Page 58: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 58(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Figure 8.2.6: Form1 Design View

The idea of this form is that the request XML will be entered into the “txtRequest” textbox then click the GetData button to call the www.creditsafeuk.com GetData Web Service and the response of the call will be displayed on the “txtResponse” textbox.

Page 59: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 59(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

6. In the form design view double-click the “GetData” button. This will display the code view for the form. Enter the code shown in figure 8.2.7 to call GetData passing the request XML entered in “txtRequest” textbox.

private void cmdGetData_Click(object sender, System.EventArgs e) { string strRequest = ""; string strResponse = ""; //get the request xml strRequest = txtRequest.Text; try { //create instance of proxy class GetData.CreditsafeServices objGetData = new GetData.CreditsafeServices(); //call GetData passing the request xml strResponse = objGetData.GetData(strRequest); //format the output by adding new line chars strResponse = strResponse.Replace("><", ">\r\n<"); } catch (Exception objEx) { //display the error message strResponse = objEx.Message; } //display the response txtResponse.Text = strResponse; }

Figure 8.2.7: Sample code to call www.creditsafeuk.com GetData Web Service

The code shown in figure 8.2.7 performs the following: • Declares two string variables “strRequest” and “strResponse“ • Variable strRequest is assigned to the text stored in textbox “txtRequest” • A variable, objGetData, is declared of type GetData.CreditsafeServices (the proxy

class created by the Web Reference) • The GetData method is called passing variable “strRequest” and the result of this call

is returned to variable “strResponse” • Variable “strResponse” is then formatted to insert newline characters after closing

tags (to aide readability). • Finally “strResponse” is displayed on textbox “txtResponse”. Press the “F5” (function key) to run the program. The form “Form1” will be displayed and enter the request XML into “txtRequest” textbox as shown in Figure 8.2.9. Hit the “GetData” button and the results will be displayed in textbox “txtResponse”.

Page 60: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 60(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<xmlrequest> <header> <username>DemoUser</username> <password>Password</password> <language>EN</language> <operation>CompanySearch</operation> <chargereference></chargereference> </header> <body> <country>UK</country> <name>ibm</name> <namesearchmode>begin</namesearchmode> <startposition>1</startposition> <pagesize>25</pagesize> </body> </xmlrequest>

Figure 8.2.8: Test Request XML

Figure 8.2.9 shows an example of running the C#.NET Windows Client Sample.

Figure 8.2.9: Example Windows client application

Page 61: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 61(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

8.3 Simple Object Access Protocol (SOAP) Toolkit Invoking a Web Service using SOAP is usually performed using a SOAP toolkit. Microsoft provides a SOAP Toolkit (V3.0) that can be downloaded freely from their website (http://www.microsoft.com). The SOAP toolkit contains components to construct, transmit, read and process SOAP messages. In this example a Microsoft Excel spreadsheet containing Visual Basic for Application code is used to call the www.creditsafeuk.com GetData Web Service through the SOAP Toolkit. Please note: this section assumes the Microsoft SOAP Toolkit has been installed. 1) Using Microsoft Excel create a new spreadsheet. On the spreadsheet use the Menu at

the top of the screen and select Tools – Macro – Visual Basic Editor as shown in figure 8.3.1.

Figure 8.3.1: Launching Visual Basic for Applications Editor

This Visual Basic for Applications Editor is now displayed. 2) To add a reference to the SOAP Toolkit use the Menu at the top of the screen and

select Tools – References as shown in figure 8.3.2.

Page 62: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 62(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Figure 8.3.2: Add Reference

This displays the Add Reference Dialog box as shown in figure 8.3.3.

Figure 8.3.3: Add Reference Dialog

In the Add Reference dialog scroll through the list and check the box next to the “Microsoft Soap Type Library v3.0” item. Click the OK button. Adding a reference means that variables can be created of the data types provided by the SOAP Toolkit.

Page 63: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 63(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

3) Add a UserForm to the project using the Menu select Insert – UserForm as shown in figure 8.3.4.

Figure 8.3.4: Add a UserForm to project

Create the User Interface as shown in figure 8.3.5.

Figure 8.3.5: User Interface

Page 64: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 64(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Set the properties for the user interface items as shown in table 8.3.1.

Object Property Value

UserForm1 Caption SOAP Toolkit Sample Height 417

Width 542 Label1 Caption Request XML Top 6 Left 6

Height 18 Width 72 Textbox1 Name txtRequest

Top 0 Left 78

Height 171 Width 450 Multiline True Scrollbars 2 – frmScrollbarsVertical

CommandButton1 Name cmdGetData Top 180 Left 78

Label2 Caption Response XML Top 222

Left 6 Height 18 Width 72 Textbox2 Name txtRequest

Top 216 Left 78 Height 171

Width 450 Multiline True

Scrollbars 2 – frmScrollbarsVertical Table 8.3.1: User Interface

Page 65: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 65(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

4) Double-click the “GetData” button to enter the code view for the form. Enter the code shown in figure 8.3.6.

Private Sub cmdGetData_Click() Dim objSOAPClient As New MSSOAPLib30.SoapClient30 Dim strURL As String Dim strRequest As String Dim strResponse As String On Error GoTo error_handler 'get the request XML strRequest = txtRequest.Text 'set the SOAP client property to use HTTP objSOAPClient.ClientProperty("ServerHTTPRequest") = True 'the URL to the GetData Web Service strURL = "https://www.creditsafeuk.com" strURL = strURL & "/getdatauk/service/CreditsafeServices.asmx?WSDL" 'connect to the web service objSOAPClient.MSSoapInit strURL 'call the GetData method strResponse = objSOAPClient.GetData(strRequest) 'format the results strResponse = Replace(strResponse, "><", ">" & vbNewLine & "<") 'display the results txtResponse.Text = strResponse 'terminate SOAP object Set objSOAPClient = Nothing Exit Sub error_handler: 'display an error message txtResponse.Text = "Error " & Err.Number & ": " & Err.Description End Sub

Figure 8.3.6: Sample SOAP Toolkit code to call GetData

The Visual Basic for Applications (VBA) code shown in figure 8.2.8 performs the following: • Declares a variable, objSOAPClient, of type MSSOAPLib30.SOAPClient30 that is used

to invoke the call to GetData • Declare three string variables “strURL”, “strRequest” and “strResponse“ • Variable strRequest is assigned to the text stored in textbox “txtRequest” • The “ServerHTTPProperty” for objSOAPClient is set to True • Variable strURL is set to the URL of the Web Service Description Language (WSDL)

document for the GetData Web Service

Page 66: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 66(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

• The MSSoapInit method is called to initialize the SOAP client object passing the Web Service Description document for the GetData Web Service. MSSoapInit allows the SOAP Toolkit to retrieve all the methods exposed by the Web Service.

• The GetData method is called passing variable “strRequest” and the result of this call is returned to variable “strResponse”

• Variable “strResponse” is then formatted to insert vbNewLine characters after closing tags to aide readability.

• Finally “strResponse” is displayed on textbox “txtResponse”.

To run the SOAP client press the “F5” (function key). The form “UserForm1” is displayed. Enter some valid request XML in “txtRequest” textbox and hit the GetData button. The results will be displayed in “txtResponse” textbox.

Figure 8.3.7 shows an example of the SOAP Client running.

Figure 8.3.7: SOAP client Example

Page 67: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 67(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

8.4 Representation State Transfer (REST) Microsoft provides an XML Document Object Model (DOM) (V4.0) that contains a library of components to work, manipulate and process XML data. The XML Document Object Model (V4.0) is shipped with Microsoft Internet Explorer Version 5.0 or later. The XML DOM provides an object (MSXML2.ServerXMLHTTP) that can transmit and receive XML data using HTTP. A HTML web page can be used to call the www.creditsafeuk.com GetData Web Service but using the ServerXMLHTTP object provides more flexibility to display the response. Figure 8.4.1 shows some Visual Basic Script inside an Active Server Page <head> section and some Hypertext Markup Language (HTML) inside the <body> section.

Page 68: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 68(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

<% dim strRequest dim strGetResponse dim strPostResponse 'check if any data has been posted to this page if Request("txtRequest") <> "" then 'get the data strRequest = Request("txtRequest") 'Invoke GetData via REST Get strGetResponse = GetWebService(strRequest) 'format the REST Get response xml strGetResponse = Replace(strGetResponse, "&gt;&lt;", ">" & Chr(13) & "<") 'Invoke GetData via REST Post strPostResponse = PostWebService(strRequest) 'format the REST Post response xml strPostResponse = Replace(strPostResponse, "&gt;&lt;", ">" & Chr(13) & "<") end if Function GetWebService(i_strData) Dim webServiceUrl, httpReq 'build the URL for a GET webServiceUrl = "https://www.creditsafeuk.com/getdatauk/service/" & _ "CreditsafeServices.asmx" "/GetData?requestXmlStr=" & i_strData 'create ServerXMLHTTP object Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP") 'Create the GET httpReq.Open "GET", webServiceUrl, False 'Send the Request httpReq.Send 'Get the return value GetWebService = httpReq.responseText End Function Function PostWebService(i_strData) Dim webServiceUrl, httpReq 'build the UTL for a POST webServiceUrl = "https://www.creditsafeuk.com/getdatauk/service/ & _ "CreditsafeServices.asmx/GetData" 'create ServerXMLHTTP object Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")

Page 69: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 69(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

'Create the post httpReq.Open "POST", webServiceUrl, False 'set the content type httpReq.setRequestHeader "Content-Type" , _ "application/x-www-form-urlencoded" 'send the request httpReq.Send "requestXmlStr=" & i_strData 'return the result PostWebService = httpReq.responseText End Function %>

<body> <form method="post" id="frmGetData"> <table> <tr valign='top'> <td>Request</td> <td> <textarea name="txtRequest" cols="100" rows= "15"> <%Response.Write (strRequest)%> </textarea> </td> </tr> <tr valign='top'> <td></td> <td> <input type="submit" name="Submit" value="GetData"> </td> </tr> <tr valign='top'> <td>GET</td> <td> <textarea name="txtGet" cols="100" rows= "15"> <%Response.Write (strGetResponse)%> </textarea> </td> </tr> <tr valign='top'> <td>POST</td> <td> <textarea name="txtPost" cols="100" rows= "15"> <%Response.Write (strPostResponse)%> </textarea> </td> </tr> </table> </form> </body>

Figure 8.4.1: Active Server Page containing VBScript and HTML to call www.creditsafeuk.com GetData Web Service

Page 70: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 70(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Figure 8.4.2 shows the Web Page generated by the above code.

Figure 8.4.2 Active Server page user interface to call GetData

When the page is first load there is no data to process so no VBScript is executed. The user enters some request XML into the “txtRequest” textbox. The user then Clicks the “GetData” button which causes the page to be posted back to itself. This time as there is data (stored in Request(“txtRequest”)) the VBScript is executed and calls GetData using REST Get and REST Post. The Visual Basic Script code and HTML shown in figure 8.4.1 performs the following actions: • Declares three string variables “strRequest”, “strGetResponse” and “strPostResponse“ • The program checks the Request(“txtRequest”) variable to see if any request XML

data has been entered by the user • If there is data then

o variable “strRequest” is set to the request XML

Page 71: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 71(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

o Variable “strGetResponse” is set to the return value of function GetWebService (see below)

o Variable “strPostResponse” is set to the return value of function PostWebService (see below)

o Both “strGetResponse” and “strPostResponse” are formatted to aide readability of the response XML and later on displayed in “txtGet” and “txtPost” textboxes.

The “GetWebService” function performs the following actions: • The input parameter i_strData contains the request XML • Builds a URL to the GetData web service containing the request xml as part of the

querystring for the URL. • Creates an instance of MSXML2.ServerXMLHTTP • Opens a GET connection to the URL • Sends the request • Returns the response XML The “PostWebService” function performs the following actions: • The input parameter i_strData contains the request XML • Builds a URL to the GetData Web Service • Creates an instance of MSXML2.ServerXMLHTTP • Opens a POST connection to the URL • Sets the content type to “application/x-www-form-urlencoded” • Sends the request with the request XML as part of the form post data • Returns the response XML

Page 72: GetData Web Service€¦ · Strings are used to represent the XML because most programming languages support character data. Strings are also easily loaded into an XML Document Object

Document name Page

Creditsafe.com Technical Manual GetData Web Service 72(72)

Issuer Date Appendix Div Version

www.creditsafeuk.com 29-05-2006 4.0

Copyright – CreditSafe Business Information NV

Figure 8.4.2 shows the results of using the above active service page.

Figure 8.4.2: Active Server Page call to www.creditsafeuk.com GetData Web Service