Home
Directories Web Services
Contents
1. INVALIDLICENSE You do not have enough privileges to execute this service Interface Specification Directories Web Services To be allowed for this service you must have a valid subscription to the Directory product INVALIDCOUNTRY The Country Code within the supplied IBAN is not valid Example ZZ Is validated against the list of ISO country code CT file INVALIDIBANCOUNTRY The Country Code exists but is not registered in the IBAN Registry example ZW Is validated against the field IBAN COUNTRY CODE in the BICPlusIBAN Directory IS file gt Previous condition INVALIDCOUNTRY is checked first UNLISTEDCOUNTRY The Country Code is registered in the IBAN Registry but the national codes of this country are not listed in the BICPlusIBAN Directory ERRORCHECKDIGITS The IBAN failed the modulus check they are calculated based on the scheme defined in ISO IEC 7064 Modulo 97 10 INVALIDNATIONALID The country is listed but the supplied IBAN NATIONAL ID retrieved from the IBAN does not exist in the BICPlusIBAN Directory for this country it does not mean that the code does not exist in absolute ERRORIBANLENGTH The length of the supplied IBAN is not correct for this country 2 5 6 ValidatelbanBic 2 5 6 1 ValidatelbanBic service performs the following functions e Validates any supplied IBAN according to the following criteria e Validate first if IBAN
2. 13 Deir EE 14 2 5 4 NahdateNatonall EE 14 os ERR SERERE 15 2 5 0 VahdatelbanBie 4 eee eant o d RUE Pe TUI a ed 17 2 3 1 GetDetailsFromBiC udo dora e eo ai 19 2 5 8 GetDetailsFromNationalld eene 21 Interface Specification Directories Web Services 2 5 9 GetDetailsFromChipsUlid eee enne 23 25 10 Terres 24 Oh MEE P EE 26 e el E CT WT 27 ZW GetConnected E 29 3 COOK BOOK E 30 3 1 IMTFOGUCHION per 30 3 2 Writing a Web Service Java Client 31 3 21 HTTPS et EE 31 4 22 Code lient WIth ARIS e geet 31 2 2 9 Code Client with TAX W Sx EE 34 3 3 Writing a Web Service PHP Client 37 Ael ZEITEN 38 3 3 2 0 p M 38 3 95 SEENEN 38 3 4 Writing a Web Service PERL Cent 39 8 NM iplc CUP E 39 SAD PERE EE 40 3 5 Writing a Web Service NET 048 40 Sos HETES Protocol EE 40 35 2 Code Client with N T aii e rod D xdi deeds 40 92 29 COde icu pesi S loi RUD aaa awa nied qua Nen Rd a 41 Interface Specification Directories Web Services 1 Preface 1 1 Purpose of this guide SWIFT has made a new set of web resources Web Services Technology available from SWIFT website These resources allow su
3. INVALIDBIC The supplied BIC does not exist INVALIDBIC1 The supplied BIC exists but is not a BIC1 3 Cook Book 3 1 Introduction In this cook book section we provided samples only for set of the most popular languages and implementations But it does not mean that the Directories Web Services are not supported by other language or other implementation Here worked examples showing how to access Directories Web Services from JAVA language JAX WS and AXIS2 PERL language Active Perl with SOAP Lite package PHP language PHP with PEAR SOAP package NET language NET 2 0 with Visual Studio For more information see the Axis2 Apache website http ws apache org axis2 see JAX WS Reference Implementation https jax ws dev java net see the PEAR site http pear php net package SOAP see the NET site http msdn microsoft com en us netframework default aspx Interface Specification Directories Web Services 3 2 Writing a Web Service Java Client 3 2 1 HTTPS Protocol As our Directories Web Services is accessible through HTTPS protocol the virtual machine of your JAVA client should trust the SWIFT com certificate and thus you should import the SWIFT com certificate in your JRE In the following example SWIFT CA is used as the root certificate keytool import keystore JAVA HOME jre lib security cacerts storepass PASS alias SWIFT CA file SCERTFILE 3 2 2 Code Client wit
4. Return Message Return Message Description Interface Specification Directories Web Services Object Object Name Nationalld Attributes e result e countryCode e uniqueNationalld XML nationalld resulb lt resulb countryCode countryCode uniqueNationalld uniqueNationalld lt nationalld gt The attribute result code meanings Result Code Description VALID The supplied NATIONAL ID exists in the BICPlusIBAN Directory for this country INVALID The country is listed but the supplied NATIONAL ID does not exist in the BICPlusIBAN Directory for this country it does not mean that the code does not exist in absolute INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product INVALIDCOUNTRY The Country Code of the Country Code supplied is not valid Example ZZ Must be validated against the list of ISO country code CT file UNLISTEDCOUNTRY The national codes of this country are not listed in the BICPlusIBAN Directory Example ZW e Indeed the directory does not include the national codes of all world countries so the system should first check if the country is valid or not INVALIDCOUNTRY and if valid then check if the country is a listed country of the directory 2 5 5 Validatelban 2 5 5 1 Validatelban service perform
5. UNLISTEDCOUNTRY See details below in each service description INVALIDIBANCOUNTRY ERRORIBANLENGTH See details below in each service description See details below in each service description Interface Specification Directories Web Services ERRORCHECKDIGITS See details below in each service description INVALIDNATIONALID See details below in each service description INVALIDBIC See details below in each service description INVALIDBIC1 See details below in each service description INVALIDCOMBINATION See details below in each service description NOMATCHING See details below in each service description INVALIDDATE See details below in each service description TOOMANYRECORDS See details below in each service description OTHERERROR An unknown exception occurs for example inputing a parameter of length greater than 32000 characters 2 4 Web Service for the BIC Directory All the queries access the Live SWIFT BIC Directory which is daily updated This assumes that the queries get always the latest SWIFT BIC Directory data 2 4 1 WSDL file The WSDL file is located in our SWIFT com public site http www swift com solutions messaging information products image doc bicdirectory wsdl 2 4 2 BlCDirectoryWSService version 1 1 Service Description GetStatus Returns the status of the Web Service ValidateBic Validates the BIC fr
6. e specialCode e chipsUid e physicalAddress1 e physicalAddress2 e physicalAddress3 e physicalAddress4 e zipCode e location e countryName biclbanDetails resulb lt result lt bicCode lt bicCode banchCode branchCode lt institutionName gt lt institutionName lt branchInformation gt lt branchInformation cityHeading cityHeading countryCode lt countryCode gt nationalld gt lt nationalld gt specialCode specialCode chipsUid VchipsUid lt physicalAddress1 physicalAddress 1 physicalAddress2 gt lt physicalAddress2 physicalAddress3 lt physicalAddress3 physicalAddress4 physicalAddress4 azipCode x zipCode lt location gt lt location countryName gt lt countryName gt biclbanDetails XML The attribute result code meanings Result Code Description VALID The supplied BIC exists in the BICPlusIBAN Directory INVALID The supplied BIC does not exist in the BICPlusIBAN Directory INVALIDLICENSE You do not have enough privileges to execute this service Interface Specification Directories Web Services To be allowed for this service you must have a valid subscription to the Directory product 2 5 8 GetDetailsFromNationalld 2 5 8 1 GetDetailsFromNationalld service performs the following functions e Checks that the NATIONAL ID exists in the BICPlusIBAN Directory and
7. YourUserName gt YourPassWord print BICDIRECTORY Service is SOAP Lite gt proxy https www2 swift com crdpws bicdirectory cookie jar gt HTTP Cookies new ignore discard gt 1 gt uri https ws swift com getStatus result print An sprint Xn my SbicCode SOAP Data gt type string gt name argO gt ABNANL2A my Sservice SOAP Lite gt proxy https www2 swift com crdpws bicdirectory cookie jar gt HTTP Cookies gt new ignore discard gt 1 gt uri https ws swift com my result Sservice gt getAddress SbicCode gt result foreach my key keys Sresult 1 print key Sresult gt Skey Mn 3 5 Writing a Web Service NET Client This sample is written with the following version Visual Studio 2008 NET 2 0 3 5 1 HTTPS Protocol Directories Web Services is accessible through HTTPS protocol but as the NET client is running in a WEB Application there is no specific setting to do 3 5 2 Code Client with NET First you have to generate the code client based on the Directories Web Services WSDL e http www swift com solutions messaging information products image doc bicdirectory ws dl for BIC Directory Web Service Interface Specification Directories Web Services e http www swift com solutions messaging information products image doc ibandirectory w sdl for BICPlusIBAN Directory Web Servic
8. have to set parameters to be compliant with the SWIFT com security policy The POST method encoding cannot use the chunked encoding and the BASIC authentication must be re active author wjoiris public class BicWebServiceTest public static void main String args throws Exception try String username your user name String password your password IbanDirectoryWSServiceStub stub new lbanDirectoryWSServiceStub addHttpBasicAuthentication stub username password This sample check the IbanDirectory WebService getDetailsFromNationalld String countryCode String nationalld GetDetailsFromNationalld nationalld new GetDetailsFromNationalld nationalld setArgO RU A Country Code nationalld setArg1 44583892 National Id GetDetailsFromNationalldE nationalldE new GetDetailsFromNationalldE nationalldE setGetDetailsFromNationalld nationalld GetDetailsFromNationalldResponseE responseE stub getDetailsFromNationalld nationalldE if responseE null GetDetailsFromNationalldResponse response responseE Interface Specification Directories Web Services getGetDetailsFromNationalldResponse NationalldDetails nationalldDetails response get_return if nationalldDetails null amp amp VALID equals nationalldDetails getResult System out printin Institution Name nationalldDetails getInstitutionName System out printIn Ci
9. if yes it returns specific info for the supplied code e Returns a information message 2 5 8 2 Parameter Format for GetDetailsFromNationalld ReturnMessage getDetailsFromNationalld String arg0 String arg1 Where Input Parameters Parameter Description argo country is the Country Code for which the national code has to be validated corresponds to field COUNTRY CODE in BICPlusIBAN arg nationalid is the National Code to be validated corresponds to field UNIQUE NATIONAL ID in BICPlusIBAN Return Message Return Message Description Object Object Name NationalldDetails Attributes e result e countryCode e uniqueNationalld e specialCode e institutionName e cityHeading e branchlnformation e bicCode e branchCode e chipsUid e physicalAddress1 e physicalAddress2 e physicalAddress3 e physicalAddress4 Interface Specification Directories Web Services e zipCode e location e countryName nationalldDetails resulb resulb countryCode dcountryCode uniqueNationalld uniqueNationalld specialCode specialCode lt institutionName gt lt institutionName lt branchInformation gt lt branchInformation cityHeading cityHeading bicCode gt bicCode branchCode branchCode chipsUid gt lt chipsUid gt lt physicalAddress1 physicalAddress 1 physicalAddress2 physicalAddress2 physicalAddres
10. in the IBAN Registry but the national codes of this country are not listed in the BICPlusIBAN Directory ERRORCHECKDIGITS The IBAN failed the modulus check they are calculated based on the scheme defined in ISO IEC 7064 Modulo 97 10 INVALIDNATIONALID The country is listed but the supplied IBAN NATIONAL ID retrieved from the IBAN does not exist in the BICPlusIBAN Directory for this country it does not mean that the code does not exist in absolute ERRORIBANLENGTH The length of the supplied IBAN is not correct for this country 2 5 7 GetDetailsFromBic 2 5 7 1 GetDetailsFromBic service performs the following functions e Checks that the 11 character BIC exists in the BICPlusIBAN Directory and if yes it returns specific info for the supplied BIC e If an 8 character BIC is provided then XXX is automatically added as branch code e Note that the unpublished BICs are not considered as valid e Returns a information message 2 5 7 2 Parameter Format for GetDetailsFromBic ReturnMessage getDetailsFromBic String argO Where Input Parameters Parameter Description argo bic is the BIC to be validated Return Message Return Message Description Object Object Name BiclbanDetails Interface Specification Directories Web Services Attributes e result e bicCode e branchCode e institutionName e branchlnformation e CityHeading e countryCode e nationalld
11. of about 100 records 2 5 Web Service for the BICPlusIBAN Directory All the queries access the Live SWIFT BICPlusIBAN Directory which is daily updated This assumes that the queries get always the latest SWIFT BICPlusIBAN Directory data 2 5 1 WSDL file The WSDL file is located in our SWIFT com public site http www swift com solutions messaging information products image doc ibandirectory wsdl 2 5 2 IbanDirectoryWSService version 1 0 Service Description GetStatus Returns the status of the Web Service ValidateNationalld Validates the National code from a National ID and a Country code and returns the validation result Validatelban Validates the IBAN from an IBAN and returns the validation result ValidatelbanBic Validates the combination of the IBAN and the BIC from an IBAN and a BIC and returns the validation result GetDetailsFromBic Gets details about a specific institution from a BIC and returns the information result GetDetailsFromNationalld Gets details about a specific institution from a National ID and a Country code and returns the information result GetDetailsFromChipsUid Gets details about a specific institution from a Chips UID and returns the information result DeriveBicFromlban Looks up the BIC issued with the IBAN from an IBAN and returns the information result LinkBic Provides the National ID linked to the BIC from a BIC and return
12. the NAMESPACE 3 3 2 1 Directories Web Services NAMESPACE BIC Directory Web Service https ws swift com IBAN Directory Web Service https ws swift com 3 3 2 2 Directories Web Services ENDPOINT BIC Directory Web Service https www2 swift com crdpws bicdirectory IBAN Directory Web Service https www2 swift com crdpws ibandirectory 3 3 3 PHP Code lt html gt lt head gt lt title gt PHP Web Services Directories BICDIRECTORY lt title gt lt head gt lt body gt lt h2 gt PHP Web Services Directories BICDIRECTORY lt h2 gt lt php require once SOAP Client php SendPoint https www2 swift com crdpws bicdirectory Snamespace https ws swift com Sproxy array user gt YourUserName pass YourPassWord soapclient new SOAP Client SendPoint false false S proxy Ssoapclient gt setOpt curl CURLOPT SSL VERIFYPEER FALSE First call to enable the Basic Authentication challenge soapclient call getStatus array namespace ret soapclient call getStatus array Snamespace printf lt br gt The BICDIRECTORY is lt b gt s lt b gt ret Interface Specification Directories Web Services echo lt br gt lt br gt First call to enable the Basic Authentication challenge soapclient call getStatus array namespace Sparam array arg0 gt SOGEFRPP re
13. DE fields If yes then take the value of the ROUTING BIC CODE ROUTING BRANCH CODE if they exist e If an 8 character BIC is provided then XXX is automatically added as branch code e Note that the unpublished BICs are not considered as valid e Make a search on the field IBAN BIC CODE IBAN BRANCH CODE e Returns a information message 2 5 13 2 Parameter Format for GetConnectedBic ReturnMessage getConnectedBic String argO Where Input Parameters Parameter Description argo bic is the BIC to be checked Return Message Return Message Description Object Object Name ConnectedBic Attributes e result e ibanBicCode e ibanBranchCode e routingBicCode e routingBranchCode connectedBio resulb lt result gt lt ibanBicCode gt lt ibanBicCode lt ibanBranchCode gt lt ibanBranchCode XML Interface Specification Directories Web Services lt routingBicCode gt lt routingBicCode lt routingBranchCode gt lt routingBranchCode lt connectedBic The attribute result code meanings Result Code Description VALID BIC1 is valid and a ROUTING BIC CODE is found INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product NOMATCHING The supplied BIC1 exists but it does not find a ROUTING BIC CODE in the BICPlusIBAN Directory
14. Directories Web Services Messaging Directories Web Services Interface Specification These technical specifications provide detailed information about the Directories Web Services It is intended for developers IT operations and architects Interface Specification Directories Web Services Table of contents 1 rjrp f H 4 1 1 Purpose of this 8 4 1 2 Related publication ete v Dn a e e DA ks 4 2 Interface Description eer ege Eege ee 4 2 1 SIMI MEE 7 4 2 2 Authentication and Authorization nennen 4 2 2 1 SWIFT com Username restrictions 5 2 3 Web Service Return Message 5 23 1 Return MESSAGES 5 23 27 d uist of EE Een 5 2 4 Web Service for the BIC Directonm nens 6 2L D lee Ee 6 2 4 2 BICDirectoryWSService version ll 6 24 3 EE 6 CMalidate EE 7 DAD EE 8 2 4 6 c GelListOfDeletedBIC ucc bei osten lime onmia tat 10 24 7 JGetbistOfAddedBie aisi ete et EUH Pa presa 11 2 5 Web Service for the BICPlusIBAN Directory 13 e NN RE TE 13 2 5 2 IbanDirectoryWSService version 1 0
15. Parameters Parameter Description argo chips is the CHIPS UID to be validated Return Message Return Message Description Object Object Name NationalldDetails Attributes e result e countryCode e uniqueNationalld e specialCode e institutionName e cityHeading e branchlnformation e bicCode e branchCode e chipsUid e physicalAddress1 e physicalAddress2 e physicalAddress3 e physicalAddress4 e zipCode e location e countryName nationalldDetails resulb lt result countryCode countryCode uniqueNationalld uniqueNationalld specialCode specialCode XML Interface Specification Directories Web Services lt institutionName gt lt institutionName lt branchInformation branchlnformation cityHeading cityHeading bicCode gt lt bicCode branchCode branchCode chipsUid gt lt chipsUid gt physicalAddress1 physicalAddress 1 physicalAddress2 lt physicalAddress2 physicalAddress3 gt lt physicalAddress3 physicalAddress4 physicalAddress4 azipCodex zipCode lt location gt lt location countryName gt lt countryName gt 4 nationalldDetails The attribute result code meanings Result Code Description VALID The supplied CHIPS UID exists in the BICPlusIBAN Directory INVALID The supplied CHIPS UID does not exist in the BICPlusIBAN Directory INVALIDLICENSE
16. You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product 2 5 10 DeriveBicFromlban 2 5 10 1 DeriveBicFromlban service performs the following functions e Validates any supplied IBAN according to the following criteria e Validate first if IBAN is correct e Validate that the BIC is correct e Derive from the given IBAN the BIC issued with this IBAN For how to derive the BIC from an IBAN see the BICPlusIBAN Directory Technical Specifications Please note that an IBAN must be provided in its electronic format e print format CZ94 5500 0000 0010 1103 8930 e electronic format CZ9455000000001 011038930 e will be up to the user to convert to the electronic format first i e remove blank spaces e Returns a information message 2 5 10 2 Parameter Format for DeriveBicFromlban ReturnMessage deriveBicFromlban String argO Where Interface Specification Directories Web Services Input Parameters Parameter Description argo dban is the IBAN to be validated Note that IBANs have the same formats in a given country but the formats can be different from country to country These formats are defined in the IBAN Registry SWIFT is the ISO registrar The IS file of the BICPlusIBAN directory also provides a machine readable list of the IBAN formats Return Message Return Message Description Object O
17. bject Name IbanBic Attributes result iban e ibanBicCode e ibanBranchCode e lt ibanBic lt result lt result lt iban gt lt iban gt lt ibanBicCode gt lt ibanBicCode lt ibanBranchCode gt lt ibanBranchCode dibanBic The attribute result code meanings Result Code Description VALID IBAN is valid Note that we do not check the account number and the returned message will provide the BIC in its answer INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product INVALIDCOUNTRY The Country Code within the supplied IBAN does not exist example ZZ gt Is validated against the list of ISO country code CT file INVALIDIBANCOUNTRY The Country Code exists but is not registered in the IBAN Registry example ZW Interface Specification Directories Web Services Is validated against the field IBAN COUNTRY CODE in the BICPIusIBAN Directory IS file gt Previous condition INVALIDCOUNTRY is checked first UNLISTEDCOUNTRY The Country Code is registered in the IBAN Registry but the national codes of this country are not listed in the BICPlusIBAN Directory ERRORCHECKDIGITS The IBAN failed the modulus check they are calculated based on the scheme defined in ISO IEC 7064 Modulo 97 10 INVALIDNATIONALID The country is listed but the supplie
18. bscribers to the Directories Web Services service to use Web Services technologies to query the SWIFT Online Directories Data This document describes how to use this new service and how programmers can write code to invoke the service 1 2 Related publication To ensure correct use of the service it is mandatory that you read the user manual before using the information contained in this guide The user manual provides valuable information about e Password policy e Subscription to the services e Account management 2 Interface Description 2 1 Overview The Directories Web Services service is available through a service accessible through HTTPS The service base URL is https www2 swift com crdpws The Directories Web Services service provides two Web Services e AWeb Service for the BIC Directory This service mapped name is bicdirectory e A Web Service for the BICPlusIBAN Directory This service mapped name is ibandirectory 2 2 Authentication and Authorization The Directories Web Services service imposes the basic authentication method which mandates that client applications set the HTTPS header with a username and password pair for every request There is cookie returned to the requestor because there is application session maintained on the server See the HFC 2617 for a full description of Basic HTTP Authentication framework Specifically if HTTP client libraries other than Apache are selected particular att
19. d IBAN NATIONAL ID retrieved from the IBAN does not exist in the BICPlusIBAN Directory for this country it does not mean that the code does not exist in absolute ERRORIBANLENGTH The length of the supplied IBAN is not correct for this country 2 5 11 LinkBic 2 5 11 1 LinkBic service performs the following functions e Checks that the 11 character BIC exists in the BICPlusIBAN Directory and if yes it returns the NATIONAL ID for the supplied BIC e If an 8 character BIC is provided then XXX is automatically added as branch code e Note that the unpublished BICs are not considered as valid e Makes a search on the field UNIQUE BIC CODE UNIQUE BRANCH CODE e Returns a information message 2 5 11 2 Parameter Format for LinkBic ReturnMessage linkBic String argO Where Input Parameters Parameter Description argo bic is the BIC to be validated Return Message Return Message Description Object Object Name LinkBic Attributes e result e bicCode e branchCode Interface Specification Directories Web Services e countryCode e nationalld e specialCode dinkBic result result bicCodex bicCode branchCode x branchCode lt countryCode gt lt countryCode lt nationalld gt lt nationalld gt specialCode specialCode lt linkBic gt XML The attribute result code meanings Result Code Description VALID The sup
20. d as branch code e Note that the unpublished BICs are not considered as valid e Returns a information message 2 4 5 2 Parameter Format for GetAddress ReturnMessage getAddress String argO Where Input Parameters Parameter Description argo bic is the BIC to be validated Interface Specification Directories Web Services Return Message Return Message Description Object Object Name BicDetails Attributes e result e bicCode e branchCode e institutionName branchinformation e CityHeading e countryCode e subType e valueAddedServices e extralnformation e physicalAddress1 e physicalAddress2 e physicalAddress3 e physicalAddress4 e location e countryName bicDetails lt resulb lt result gt bicCodex bicCode branchCode branchCode lt institutionName gt lt institutionName lt branchInformation gt lt branchInformation cityHeading cityHeading countryCode lt countryCode subTypex subType lt valueAddedServices gt lt valueAddedServices lt extralnformation gt lt extralnformation lt physicalAddress1 gt lt physicalAddress1 physicalAddress2 gt lt physicalAddress2 physicalAddress3 gt lt physicalAddress3 lt physicalAddress4 gt lt physicalAddress4 lt location gt lt location gt countryName dcountryName lt bicDetails XML The attribute result code meanings Interface Specificatio
21. e 3 5 3 Code using System using System Collections Generic using System Web using System Web UI using System Web UI WebControls using System Net using SWIFTWS public partial class Default System Web UI Page 1 protected void Page Load object sender EventArgs ea 1 Erw Setup cookie container CookieContainer cookieContainer new CookieContainer Setup network credentials NetworkCredential networkCredential new NetworkCredential username password Instantiate the IbanDirectory Web Service IbanDirectoryWSService ibanDirectoryWSService new IbanDirectoryWSService ibanDirectoryWSService CookieContainer cookieContainer ibanDirectoryWSService Credentials networkCredential Check if IbanDirectory Web Service is running string ibanDirectoryStatus ibanDirectoryWSService getStatus Response Write string Format IbanDirectoryWSService Status 0 br ibanDirectoryStatus Response Write lt br gt if ibanDirectoryStatus Equals running nationalldDetails nationalldDtls null Interface Specification Directories Web Services na na na na na ibanDirectoryWSService getDetailsFromNationalId RU na na na na na 11 na ibanDirectoryWSService getDetailsFromNationalId BE A tionalIdDtls result Equals VALID 1 tionalldDtls bicCode Example of getDetailsFromNationalld t
22. ention must be paid to the way the HTTP challenge is managed as the Basic HTTP Authentication method used by SWIFT is non pre emptive method and cookie based Please note also that our SWIFT com infrastructure does not allow the chunked encoding in the POST method Interface Specification Directories Web Services 2 2 1 SWIFT com Username restrictions The SWIFT com Username used for the basic authentication cannot be a multi profile SWIFT com Username 2 3 Web Service Return Message All services in their return message have always a result attribute This result attribute is the main information about the status of the service execution 2 3 1 Return Message Return Message Description Object Object Name Object Attributes e result objecb esulb resultb dobjecb 2 3 2 List of result code Result Code Description VALID If the service request is valid See details below in each service description VALIDOTHER If the service request is valid See details below in each service description INVALID If the service request is invalid See details below in each service description INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the directory product ERRORCONTEXT INVALIDCOUNTRY See details below in each service description See details below in each service description
23. fromDate is the from date This parameter is mandatory Date Format YYYYMMDD arg toDate is the to date If this parameter is left empty null the to date will be the current date of the day Date Format YYYYMMDD Return Message Return Message Description List of Object Object List BicActivationList Attributes e result e list List Of BicActivation Object Name BicActivation Attributes bicCode branchCode e institutionName e activationDate YYYYMMDD lt bicActivationList gt esulb resulb lt list gt bicActivation bicCodex bicCode branchCode branchCode lt InstitutionName gt lt institutionName lt activationDate gt lt activationDate lt bicActivation lt bicActivation gt lt bicActivation gt lt list gt lt bicActivationList gt The attribute result code meanings Result Code Description VALID At least of one deleted BIC has been found in the BIC Directory INVALID No result has been found Interface Specification Directories Web Services INVALIDDATE The from date or to date is invalid INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product TOOMANYRECORDS The query returns too many records The WebService returns a list of BicActivation with a maximum
24. h Axis2 First you have to generate the code client based on the Directories Web Services WSDL e http www swift com solutions messaging information products image doc bicdirectory ws d for BIC Directory Web Service e http www swift com solutions messaging information products image doc ibandirectory w sdl for BICPlusIBAN Directory Web Service 3 2 2 1 Code JURE ENDORSE OR AIQUET I D OU E ODE pde Copyright C S W I F T sc 2009 All rights reserved TEP REAERSR EEESRE AER E AER EARER ERASE AERA HC RAAR AREAS RENE HERS HERES ERERA ERE REAR CAE f import org apache axis2 AxisFault import org apache axis2 client Options import org apache axis2 transport http HttpTransportProperties import com swift ws IbanDirectoryWSServiceStub import com swift ws IbanDirectoryWSServiceStub GetDetailsFrom Nationalld import com swift ws lbanDirectoryW SServiceStub GetDetailsFromNationalldE import com swift ws lbanDirectoryW SServiceStub GetDetailsFromNationalldResponse import com swift ws IbanDirectoryW SServiceStub GetDetailsFromNationalldResponseE import com swift ws lbanDirectoryW SServiceStub NationalldDetails Class to test the SWIFT com BicPlusIBAN Directory WebServices Interface Specification Directories Web Services This is to test the AXIS2 client implementation to access the SWIFT com Directories WebServices As the AXIS2 implementation uses Common HTTP Client of apache you
25. he password and the session maintain property in the header param bicDirectoryWS Si private static void addHttpBasicAuthentication BicDirectoryWS bicDirectoryW S String userName String password Map lt String Object request BindingProvider bicDirectoryWS getRequestContext Must be true to re inject the cookies request put BindingProvider SESSION MAINTAIN PROPERTY true request put BindingProvider SSERNAME PROPERTY userName request put BindingProvider PASSWORD PROPERTY password 3 3 Writing a Web Service PHP Client This sample is written with the following version PHP 5 3 1 PEAR 1 8 0 PEAR SOAP 0 12 0 PEAR HTTP Request 1 4 4 PEAR Net URL 1 07 4 PEAR Net Socket 1 0 12 Interface Specification Directories Web Services 3 3 1 HTTPS Protocol As our Directories Web Services is accessible through HTTPS protocol the PHP client can verify the certificate or can bypass the verification In the following example we choose to bypass the verification 3 3 2 WSDL The Directories Web Services WSDL e BIC Directory Web Service http www swift com solutions messaging information products image doc bicdirectory ws d e IBAN Directory Web Service http www swift com solutions messaging information products image doc ibandirectory w sdl But in the following example as the PEAR SOAP WSDL version is not compatible with our WSDL the example uses the ENDPOINT and
26. ic static void main String args throws Exception r Instantiates the BicDirectoryWSService by passing the WSDL public url and QNAME String username your user name String password your password BicDirectoryWSService s new BicDirectoryWSService BicDirectoryWS bicDirectoryWS s getBicDirectoryWSPort Interface Specification Directories Web Services addHttpBasicAuthentication bicDirectory WS username password try r Initiates the authentication challenge by a first call This will throw automatically a ClientTransportException System out printIn bicDirectoryWS getStatus catch ClientTransportException ex L Eats the exception and checks if it is a real Unauthorized exception Ei if The server sent HTTP status code 401 Unauthorized equals ex getLocalizedMessage r At this stage you can start your Web Service calls L This sample check the BicDirectory WebService getAddress String bic BicDetails details bicDirectoryWS getAddress SOGEFRPP if details null amp amp VALID equals details getResult System out printIn Bic Code details getBicCode System out println Branch Code details getBranchCode System out printIn Institution Name details getInstitutionName else throw ex finally Interface Specification Directories Web Services Jh Sets the username t
27. ionalldDtls nationalIdDtls null amp amp A sponse Write string Format BIC tionalIdDtls cityHeading D Writ Spons s D Write s spons tring Format D Write s spons R Write lt br gt na LE tionalIdDtls bicCode spons Example of getDetailsFromNationalld tionalldDtls nationalIdDtls null amp amp tionalIdDtls result Equals VALID 1 D sponse Write string Format BIC tionalld tionalIdDtls branchCode D sponse Write string Forma D Sponse Write string Format Dtls cityHeading tionalld D sponse Writ Dtls institu string Forma tionName el R se Writ Bate Resp spons tring Format Branch Code tionalIdDtls branchCode City Heading tring Format Institution Name tionalIdDtls institutionName t Branch Code City Heading t Institution Name Not all web services ar h Exception e Write ons StackTrace WOOO s 0 br CO 0 br LO lt br gt 44583892 0 lt br gt 0 lt br gt 0 lt br gt Oj lt br gt running 7 Interface Specification
28. is correct e Validate that the BIC is correct e Derive from the given IBAN the BIC issued with this IBAN e f the derived BIC is the same as BIC argument provided If a 8 character BIC is provided then XXX is automatically added as BRANCH CODE then the returned message is VALID e f the derived BIC is not the same as BIC argument provided then validate the IBAN BIC combination For how to validate the IBAN BIC combination see the BICPlusIBAN Directory Technical Specifications Please note that an IBAN must be provided in its electronic format e print format CZ94 5500 0000 0010 1103 8930 e electronic format CZ9455000000001 011038930 e It will be up to the user to convert to the electronic format first i e remove blank spaces e Returns a validation message 2 5 6 2 Parameter Format for ValidatelbanBic ReturnMessage validatelbanBic String argO String arg1 Where Input Parameters Interface Specification Directories Web Services Parameter Description argo lt ibam is the IBAN to be validated Note that IBANs have the same formats in a given country but the formats can be different from country to country These formats are defined in the IBAN Registry SWIFT is the ISO registrar The IS file of the BICPlusIBAN directory also provides a machine readable list of the IBAN formats arg1 bic is the BIC to be validated Return Message Return Message Description Object Ob
29. ject Name IbanBic Attributes result iban e ibanBicCode e ibanBranchCode lt ibanBic resulb lt result lt iban gt lt iban gt lt ibanBicCode gt lt ibanBicCode lt ibanBranchCode gt lt ibanBranchCode dibanBic The attribute result code meanings Result Code Description VALID IBAN is valid Note that we do not check the account number and the returned message will provide the BIC in its answer VALIDOTHER IBAN is valid Note that we do not check the account number and the returned message will provide the BIC of the user and the BIC of the BICPlusIBAN Directory in its answer INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product INVALIDBIC The supplied BIC does not exist INVALIDCOMBINATION The supplied IBAN BIC combination is not valid Interface Specification Directories Web Services INVALIDCOUNTRY The Country Code within the supplied IBAN does not exist example ZZ gt Is validated against the list of ISO country code CT file INVALIDIBANCOUNTRY The Country Code exists but is not registered in the IBAN Registry example ZW Is validated against the field IBAN COUNTRY CODE in the BICPlusIBAN Directory IS file gt Previous condition INVALIDCOUNTRY is checked first UNLISTEDCOUNTRY The Country Code is registered
30. kBic resulb lt result gt bicCodex bicCode branchCode x branchCode countryCode dcountryCode nationalld Vnationalld specialCode specialCode lt linkBic gt XML The attribute result code meanings Result Code Description VALID National ID for the country is found and a BIC is matched the field BIC CODE is not empty INVALID The supplied National ID does not exist in the BICPlusIBAN Directory for this country INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product INVALIDCOUNTRY The Country Code of the supplied Country Code does not exist example 22 Must be validated against the list of ISO country code CT file UNLISTEDCOUNTRY The national codes of this country are not listed in the BICPlusIBAN Directory Interface Specification Directories Web Services NOMATCHING The supplied NATIONAL ID exists for this country but it does not match to a BIC in the BICPlusIBAN Directory 2 5 13 GetConnectedBic 2 5 13 1 GetConnectedBic service performs the following functions e Checks that the 11 character BIC exists in the BICPlusIBAN Directory and if yes it returns the ROUTING BIC CODE for the supplied BIC1 e Checks that the proposed BIC is a BIC1 e Check if the BIC1 is present in the IBAN BIC CODE IBAN BRANCH CO
31. lt bicActivationList gt lt resulb lt result gt lt list gt bicActivation bicCodex bicCode branchCode branchCode lt InstitutionName gt lt institutionName lt activationDate gt lt activationDate lt bicActivationy lt bicActivation lt bicActivation gt lt list gt lt bicActivationList gt XML The attribute result code meanings Result Code Description VALID At least of one deleted BIC has been found in the BIC Directory INVALID No result has been found INVALIDDATE The from date or to date is invalid INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product TOOMANYRECORDS The query returns too many records The WebService returns a list of BicActivation with a maximum of about 100 records 2 4 7 GetListOfAddedBic 2 4 7 1 GetListOfAddedBic service performs the following functions e Checks if the period has been defined by a from date and a to date The from date is mandatory The to date is not mandatory e Returns the list of added BICs for the period defined by the from date and to date 2 4 7 2 Parameter Format for GetListOfAddedBic ReturnMessage getListOfAddedBic Date arg0 Date arg1 Where Input Parameters Interface Specification Directories Web Services Parameter Description argo
32. n Directories Web Services Result Code Description VALID The supplied BIC exists in the BIC Directory INVALID The supplied BIC does not exist in the BIC Directory INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product 2 4 6 GetListOfDeletedBic 2 4 6 1 GetListOfDeletedBic service performs the following functions e Checks if the period has been defined by a from date and a to date The from date is mandatory The to date is not mandatory e Returns the list of deleted BICs for the period defined by the from date and to date 2 4 6 2 Parameter Format for GetListOfDeletedBic ReturnMessage getListOfDeletedBic Date arg0 Date arg1 Where Input Parameters Parameter Description argo lt fromDate gt is the from date This parameter is mandatory Date Format YYYYMMDD arg lt toDate gt is the to date If this parameter is left empty null the to date will be the current date Date Format YYYYMMDD Return Message Return Message Description List of Object Object List BicActivationList Attributes e result e list List Of BicActivation Object Name BicActivation Attributes e bicCode Interface Specification Directories Web Services e branchCode e institutionName e activationDate YYYYMMDD
33. om a BIC Directory and message validation context and returns the validation result GetAddress Gets the address about a specific institution from a BIC and returns the information result GetListOfDeletedBic Gets the list of deleted BICs for a period defined by a from date and a to date GetListOfAddedBic Gets the list of added BICs for a period defined by a from date and a to date 2 4 3 GetStatus 2 4 3 1 GetStatus service performs the following functions e Verifies if the BIC Directory Web Service is running Interface Specification Directories Web Services e Returns a status message 2 4 3 2 Parameter Format for GetStatus ReturnMessage getStatus Where ReturnMessage is a String RUNNING the Web Service is up and running ERROR the Web Service is up and running but cannot access the Database INVALIDLICENSE the Web Service is up and running but the user does not have the right license 2 4 4 ValidateBic 2 4 4 1 ValidateBic service performs the following functions e Validates 11 character BICs e If an 8 character BIC is provided then XXX is automatically added as branch code e Note that the unpublished BICs are not considered as valid e Returns a validation message 2 4 4 2 Parameter Format for ValidateBic ReturnMessage validateBic String argO String arg1 Where Input Parameters Parameter Description argo bic is the BIC to be valida
34. ons messaging information products image doc ibandirectory w sdl for BICPlusIBAN Directory Web Service 3 2 3 1 Code PER EREREER ER ERES BAEEELE REESE RERES EERE REESE ERERERESERERE ESAS EEAEEE SERENE RER EE Copyright C S W I F T sc 2009 All rights reserved EE EE REESE f import java util Map import javax xml ws BindingProvider import com sun xml ws client ClientTransportException import com swift ws bicdirectory client BicDetails Interface Specification Directories Web Services import com swift ws bicdirectory client BicDirectoryW S import com swift ws bicdirectory client BicDirectoryW SService import com swift ws ibandirectory client IbanDirectory WS import com swift ws ibandirectory client lbanDirectoryWSService E Class to test the SWIFT com BicDirectory WebServices This is to test the JAX WS client implementation to access the SWIFT com Directories WebServices As the HTTP Client of the JAX WS implementation uses the pre emptive method for Basic Authentication the client application needs to simulate it self re active basic authentication to be compliant with the SWIFT security policy To simulate the re active basic authentication the BindingProvider SESSION MAINTAIN PROPERTY must be true and a first call to the WebService must be done to initiate the Basic Authenticatuion challenge author wjoiris Ki public class BicW ebServiceTest publ
35. plied BIC exists in the BICPlusIBAN Directory and a match to a national ID is found INVALID The supplied BIC does not exist in the BICPlusIBAN Directory INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product NOMATCHING The supplied BIC exists but it does not match to a NATIONAL ID in the BICPlusIBAN Directory 2 5 12 LinkNationalld 2 5 12 1 LinkNationalld service performs the following functions e Checks that the NATIONAL ID from a specific country exists in the BICPlusIBAN Directory and if yes it returns the 11 character BIC for the supplied code e Make a search on the fields COUNTRY CODE and UNIQUE NATIONAL ID e Returns a information message 2 5 12 2 Parameter Format for LinkNationalld ReturnMessage linkNationalld String argO String arg1 Where Input Parameters Parameter Description Interface Specification Directories Web Services argo country is the Country Code for which the national code has to be validated corresponds to field COUNTRY CODE in BICPlusIBAN argi nationalid is the National Code to be validated corresponds to field UNIQUE NATIONAL ID in BICPlusIBAN Return Message Return Message Description Object Object Name LinkBic Attributes e result e bicCode e branchCode e countryCode e nationalld e specialCode din
36. s the information result LinkNationalld Provides the BIC linked to the National ID and the Country code from a Country code and a National ID and returns the Interface Specification Directories Web Services information result GetConnectedBic Looks up the BIC connected to SWIFT for the non connected BIC from a BIC and returns the information result 2 5 3 GetStatus 2 5 3 1 GetStatus service performs the following functions e Verifies if the BICPlusIBAN Directory Web Service is running e Returns a status message 2 5 3 2 Parameter Format for GetStatus ReturnMessage getStatus Where ReturnMessage is a String RUNNING the Web Service is up and running ERROR the Web Service is up and running but cannot access the Database INVALIDLICENSE the Web Service is up and running but the user does not have the right license 2 5 4 ValidateNationalld 2 5 4 1 ValidateNationalld service performs the following functions e Checks that a national code from a specific country exists in the BICPlusIBAN Directory e Returns a validation message 2 5 4 2 Parameter Format for ValidateNationalld ReturnMessage validateNationalld String argO String arg1 Where Input Parameters Parameter Description argo country is the Country Code for which the national code has to be validated arg nationalid is the National Code to be validated
37. s the following functions e Validates any supplied IBAN according to the following criteria e Country code e Check digits they are calculated based on the scheme defined in ISO IEC 7064 Modulo 97 10 e IBAN NATIONAL ID contained in the IBAN e IBAN total length Interface Specification Directories Web Services Please note that an IBAN must be provided in its electronic format e print format CZ94 5500 0000 0010 1103 8930 e electronic format CZ945500000000101 1038930 e t will be up to the user to convert to the electronic format first i e remove blank spaces e Returns a validation message 2 5 5 2 Parameter Format for Validatelban ReturnMessage validatelban String argO Where Input Parameters Parameter Description argo lt ibam is the IBAN to be validated Note that IBANs have the same formats in a given country but the formats can be different from country to country These formats are defined in the IBAN Registry SWIFT is the ISO registrar The IS file of the BICPlusIBAN directory also provides a machine readable list of the IBAN formats Return Message Return Message Description Object Object Name Iban Attributes e result e iban lt iban gt resulb resulb dbam ibam lt iban gt The attribute result code meanings Result Code Description VALID IBAN is valid According to the 4 criteria Note that we do not check the account number
38. s3 physicalAddress3 physicalAddress4 physicalAddress4 lt zipCode gt lt zipCode lt location gt lt location countryName gt lt countryName 4 nationalldDetails XML The attribute result code meanings Result Code Description VALID The supplied NATIONAL ID exists in the BICPlusIBAN Directory for this country INVALID The country is listed but the supplied NATIONAL ID does not exist in the BICPlusIBAN Directory for this country it does not mean that the code does not exist in absolute INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product INVALIDCOUNTRY The Country Code of the supplied Country Code argument is not valid Example ZZ gt 15 validated against the list of ISO country code CT file UNLISTEDCOUNTRY The national codes of this country are not listed in the BICPlusIBAN Directory Example ZW Interface Specification Directories Web Services 2 5 9 GetDetailsFromChipsUid 2 5 9 1 GetDetailsFromChipsUid service performs the following functions e Checks that the NATIONAL ID exists in the BICPlusIBAN Directory and if yes it returns specific info for the supplied code e Returns a information message 2 5 9 2 Parameter Format for GetDetailsFromChipsUid ReturnMessage getDetailsFromChipsUid String argO Where Input
39. t Ssoapclient gt call getAddress Sparam Snamespace if PEAR isError ret 1 print br An error 4 Sret gt getCode occurred br print Error ret getMessage lt br gt n else echo br Funtion getAddress SOGEFRPP result is lt b gt print_r ret echo lt b gt EE body html 3 4 Writing a Web Service PERL Client This sample is written with the following version ACTIVEPERL 5 8 9 826 SOAP Lite 0 55 r1 3 4 4 WSDL The Directories Web Services WSDL e BIC Directory Web Service http www swift com solutions messaging information products image doc bicdirectory ws d e IBAN Directory Web Service http www swift com solutions messaging information products image doc ibandirectory w sdl But in the following example as the SOAP Lite WSDL version is not compatible with our WSDL the example uses the PROXY and the URI 3 4 1 1 Directories Web Services URI BIC Directory Web Service https ws swift com BAN Directory Web Service https ws swift com 3 4 1 2 Directories Web Services PROXY BIC Directory Web Service https www2 swift com crdpws bicdirectory BAN Directory Web Service https www2 swift com crdpws ibandirectory Interface Specification Directories Web Services 3 4 2 PERL Code f perl w use HTTP Cookies use SOAP Lite sub SOAP Transport HTTP Client get basic credentials return
40. ted contexb specifies the context in which the user wants to validate the BIC The following values can be used e FINHEADER Check that the BIC is valid for the header of a FIN message arg e FINBODY Check that the BIC is valid for the body of a FIN message e NONE Check that the BIC exists the context has no importance Return Message Return Message Description Object Object Name BicContext Attributes Interface Specification Directories Web Services result bicCode branchCode context bic lt resulb lt result gt bicCodex bicCode branchCode branchCode contexb contexb bic XML The attribute result code meanings Result Code Description VALID The supplied BIC is valid for the specified context INVALID The supplied BIC does not exist or The supplied BIC exists but is not valid for the specified context INVALIDLICENSE You do not have enough privileges to execute this service To be allowed for this service you must have a valid subscription to the Directory product ERRORCONTEXT The specified context in the input parameters is not correct 2 4 5 GetAddress 2 4 5 1 GetAddress service performs the following functions e Checks that the 11 character BIC exists in the BIC Directory and if yes it returns the address for the supplied BIC e If an 8 character BIC is provided then XXX is automatically adde
41. ty Heading nationalldDetails getCityHeading System out printIn Bic Code nationalldDetails getBicCode System out println Branch Code nationalldDetails getBranchCode catch AxisFault fault fault printStackTrace Jh Sets the BasicAuthentication object and the chunked property in the header param IbanDirectoryWSServiceStub private static void addHttpBasicAuthentication IbanDirectoryWSServiceStub stub String userName String password HttpTransportProperties Authenticator basicAuthentication new HttpTransportProperties Authenticator basicAuthentication setUsername userName basicAuthentication setPassword password Reactive basic authentication Interface Specification Directories Web Services basicAuthentication setPreemptiveAuthentication false Options options stub getServiceClient getOptions options setProperty org apache axis2 transport http HT TPConstants AUTHENTICATE basicAuthentication SWIFT Does not allow CHUNKED Encoding in the POST method options setProperty org apache axis2 transport http HT TPConstants CHUNKED false 3 2 3 Code Client with JAX WS First you have to generate the code client based on the Directories Web Services WSDL e http www swift com solutions messaging information products image doc bicdirectory ws dl for BIC Directory Web Service e http www swift com soluti
Download Pdf Manuals
Related Search
Related Contents
CU 009 ITA-ENG-FRA FHY-32GS9 Four électrique KF56.. Multicooker 1956 AMC Hudson Body Bulletins GL220 User Manual SERVICE Manual - Paradise Place GUIDE TECHNIQUE PIED DE LEVAGE AT-05 Copyright © All rights reserved.
Failed to retrieve file