{"id":2536,"date":"2022-11-09T07:45:58","date_gmt":"2022-11-09T07:45:58","guid":{"rendered":"https:\/\/serviceobjects.wpaladdin.com\/?post_type=serviceobjects&#038;p=2536"},"modified":"2024-03-29T09:18:16","modified_gmt":"2024-03-29T16:18:16","slug":"avca2-soap","status":"publish","type":"page","link":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/","title":{"rendered":"AVCA2 &#8211; SOAP"},"content":{"rendered":"\n<div class=\"wp-block-create-block-tabs\"><ul class=\"tab-labels\" role=\"tablist\" aria-label=\"tabbed content\"><li class=\"tab-label active\" role=\"tab\" aria-selected=\"true\" aria-controls=\"C#\" tabindex=\"0\">C#<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Java\" tabindex=\"0\">Java<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"PHP\" tabindex=\"0\">PHP<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"RoR\" tabindex=\"0\">RoR<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Python\" tabindex=\"0\">Python<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"ColdFusion\" tabindex=\"0\">ColdFusion<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"VB\" tabindex=\"0\">VB<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Apex\" tabindex=\"0\">Apex<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"TSQL\" tabindex=\"0\">TSQL<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"NodeJS\" tabindex=\"0\">NodeJS<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 C# Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">response = ws.ValidateCanadianAddressV2(Address.Text, Address2.Text, Municipality.Text, Province.Text, PostalCode.Text, Language.Text, LicenseKey.Text);\nif ((response == null || (response.Error != null &amp;&amp; response.Error.TypeCode == \"3\")))\n{\n    throw new Exception();\n     \n}\nelse\n{\n    if (response.Error != null)\n        ProcessErrorResponse(response.Error);\n    else\n        ProcessValidResponse(response.CanadianAddressInfoV2);\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 Java Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">outputs = soap.validateCanadianAddressV2(address, address2, municipality, province, postalcode, language, licenseKey);\navca2error = outputs.getError();\nif(avca2error !=null &amp;&amp; avca2error.getTypeCode() == \"3\")\n{\n    throw new Exception(); \n}\n}\ncatch(Exception e)\n{   \/\/FAILOVER- USE BACKUP NOW\n    try{\n        \/\/CALL SOAP USING BACKUP URL (Change the endpoint)\n        outputs = soap.validateCanadianAddressV2(address, address2, municipality, province, postalcode, language, licenseKey);\n        avca2error = outputs.getError();\n    }\n    catch(Exception ex)\n    {\n     \n        throw new Exception(\"Both Primary and Backup soap calls failed: \" + ex.getMessage());\n    }\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 PHP Code Snippets<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$URL = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc?wsdl\";\n\/\/use backup url once given purchased license key\n$backupURL = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc?wsdl\";\ntry{\n     \n               \n                $client = new SoapClient($URL);\n    \/\/$soapClient = new SoapClient($URL, array( \"trace\" => 1 ));\n                $outputs = $client->ValidateCanadianAddressV2($params)->ValidateCanadianAddressV2Result;\n                 \n                if (empty($outputs))\n                {\n                    $backupClient = new SoapClient($backupURL);\n                    $outputs = $client->ValidateCanadianAddressV2($params)->ValidateCanadianAddressV2Result;\n                }<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 RoR Rest Code Snippets<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class RequestsController &lt; ApplicationController\n \n    def show\n        @request = Request.find(params[:id])\n        #Formats inputs into a hash to pass to Soap Client\n        #Hash Keys must be named as they are shown here.\n        message =   {                  \n                    \"Address\" => @request.address1,\n                    \"Address2\" => @request.address2,\n                    \"City\" => @request.municipality,\n                    \"State\" => @request.province,\n                    \"PostalCode\" => @request.postalcode,\n                    \"Language\" => @request.language,\n                    \"LicenseKey\" => @request.licensekey,\n                    }\n        #Implemented to make the code more readable when accessing the hash        \n        @avca2response = :validate_canadian_address_v2_response\n        @avca2result = :validate_canadian_address_v2_result\n        @avca2info = :canadian_address_info_v2\n        @avca2error = :error\n \n        #Set Primary and Backup URLs here as needed\n        dotsAVCA2Primary = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc?WSDL\"\n        dotsAVCA2Backup = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc?WSDL\"\n \n        begin\n            #initializes the soap client. The convert request keys global is necessary to receive a response from the service.\n            client = Savon.client(  wsdl: dotsAVCA2Primary,\n                                    element_form_default: :qualified,\n                                    convert_request_keys_to: :camelcase\n                                 )\n            #Calls the operation with given inptus and converts response to a hash.\n            response = client.call(:validate_canadian_address_v2, message: message).to_hash\n \n            #Checks to see what results came back from the service\n            processresults(response)           \n             \n        #If an error occurs during the call, this will use the backup url and attempt to retrieve data.\n        rescue Savon::Error => e\n            begin\n            backupclient = Savon.client(    wsdl: dotsAVCA2Backup,\n                                            element_form_default: :qualified,\n                                            convert_request_keys_to: :camelcase\n                                       )\n            #Sets the response to the backclient call to the operation and converts response to a hash.\n            response = backupclient.call(:validate_canadian_address_v2, message: message).to_hash\n            processresults(response)\n            end\n        end\n    end\n    private\n    def processresults(response)   \n            #Processes Error Response from soap Client     \n            #Processes Valid response from soap client \n         \n    end\nend<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 Python Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mAddress =  Address.get()\nif mAddress is None or  mAddress == \"\":\n     mAddress = \" \"\nmAddress2 = Address2.get()\nif mAddress2 is None or mAddress2 == \"\":\n    mAddress2 = \" \"\nmMunicipality = Municipality.get()\nif mMunicipality is None or mMunicipality == \"\":\n    mMunicipality = \" \"\nmProvince = Province.get()\nif mProvince is None or mProvince == \"\":\n    mProvince = \" \"\nmPostalCode = PostalCode.get()\nif mPostalCode is None or mPostalCode == \"\":\n    mPostalCode = \" \"\nmLanguage = Language.get()\nif mLanguage is None or mLanguage == \"\":\n    mLanguage = \" \"\nmLicenseKey = LicenseKey.get()\nif mLicenseKey is None or mLicenseKey == \"\":\n    mLicenseKey = \" \"\n \n#Set the primary and backup URLs as needed\nprimaryURL = 'https:\/\/trial.serviceobjects.com\/avca2\/api.svc?WSDL'\nbackupURL = 'https:\/\/trial.serviceobjects.com\/avca2\/api.svc?WSDL'\n #This block of code calls the web service and prints the resulting values to the screen\ntry:\n    client = Client(primaryURL)\n    result = client.service.ValidateCanadianAddressV2(Address=mAddress, Address2=mAddress2, Municipality=mMunicipality, Province=mProvince, PostalCode=mPostalCode, Language=mLanguage, LicenseKey=mLicenseKey)\n    #Handel response and check for errors\n \n#Tries the backup URL if the primary URL failed\nexcept:\n    try:\n        client = Client(backupURL)\n        result = client.service.ValidateCanadianAddressV2(Address=mAddress, Address2=mAddress2, Municipality=mMunicipality, Province=mProvince, PostalCode=mPostalCode, Language=mLanguage, LicenseKey=mLicenseKey)\n       #Handel response and check for errors\n \n    #If the backup call failed then this will display an error to the screen\n    except:\n        Label(swin.window, text='Error').pack()\n        print (result)<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation 2 Canada Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!--Makes Request to web service --->\n&lt;cfscript>\n        try\n        {\n            if (isDefined(\"form.Action\") AND Action neq \"\")\n            {\n                wsresponse = CreateObject(\"webservice\", \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc?WSDL\");                          \n                outputs = wsresponse.validateCanadianAddressV2(\"#Address#\", \"#Address2#\", \"#Municipality#\", \"#Province#\", \"#PostalCode#\", \"#Language#\", \"#LicenseKey#\");\n            }\n        }\n    catch(any Exception){\n        try\n            {\n                if (isDefined(\"form.Action\") AND Action neq \"\")\n                {\n                    wsresponse = CreateObject(\"webservice\", \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc?WSDL\");                          \n                    outputs = wsresponse.validateCanadianAddressV2(\"#Address#\", \"#Address2#\", \"#Municipality#\", \"#Province#\", \"#PostalCode#\", \"#Language#\", \"#LicenseKey#\");\n                }\n            }\n            catch(any Exception)   \n                {\n                 writeoutput(\"An Error Has Occured. Please Reload and try again: #Exception.message#\");             \n                }\n        }\n&lt;\/cfscript><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation 2 Canada Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"vhdl\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Try\n    Dim ws As New AVCA2.ValidateCanada2Client\n    Dim response As AVCA2.CanadianAddressResponseV2\n    response = ws.ValidateCanadianAddressV2(Address.Text, Address2.Text, Municipality.Text, Province.Text, PostalCode.Text, Language.Text, LicenseKey.Text)\n    If (response Is Nothing) Then\n        ProcessValidResponse(response)\n    Else\n        ProcessErrorResponse(response.Error)\n    End If\n \nCatch er As Exception\n    ''Set the Primary and Backup Service References as necessary\n    Try\n        Dim wsbackup As New AVCA2.ValidateCanada2Client\n        Dim response As AVCA2.CanadianAddressResponseV2\n        response = wsbackup.ValidateCanadianAddressV2(Address.Text, Address2.Text, Municipality.Text, Province.Text, PostalCode.Text, Language.Text, LicenseKey.Text)\n        If (response.Error Is Nothing) Then\n            ProcessValidResponse(response)\n        Else\n            ProcessErrorResponse(response.Error)\n        End If\n    Catch ex As Exception\n        resultsLabel.Visible = True\n        resultsLabel.Text = ex.Message\n    End Try\nEnd Try<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 Apex Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wwwServiceobjectsCom.CanadianAddressResponseV2 result;\ntry{\nwwwServiceobjectsCom.DOTSAVCA2 client = new wwwServiceobjectsCom.DOTSAVCA2();\nresult = client.ValidateCanadianAddressV2([Address], [Address2], [Municipality], [Province], [PostalCode], [Language], [LicenseKey]);\n}\ncatch(Exception ex){\n \/\/If the first request failed try the failover endpoint\nwwwServiceobjectsCom.DOTSAVCA2 backupClient = new wwwServiceobjectsCom.DOTSAVCA2();\n\/\/The backup environment will be provided to you upon purchasing a production license key\nbackupClient.endpoint_x = 'https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/soap';\nresult = backupClient.ValidateCanadianAddressV2([Address], [Address2], [Municipality], [Province], [PostalCode], [Language], [LicenseKey]);\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Canada 2 TSQL Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SET @requestBody ='&lt;s:Envelope xmlns:s=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">'+\n                   '&lt;s:Body>'+\n                   '&lt;ValidateCanadianAddressV2 xmlns=\"https:\/\/www.serviceobjects.com\">'+\n                   '&lt;Address>' + @address + '&lt;\/Address>'+\n                   '&lt;Address2>' + @address2 + '&lt;\/Address2>'+\n                   '&lt;Municipality>' + @municipality + '&lt;\/Municipality>'+\n                   '&lt;Province>' + @province + '&lt;\/Province>'+\n                   '&lt;PostalCode>' + @postalcode + '&lt;\/PostalCode>'+\n                   '&lt;Language>' + @language + '&lt;\/Language>'+\n                   '&lt;LicenseKey>' + @key + '&lt;\/LicenseKey>'+\n                   '&lt;\/ValidateCanadianAddressV2>'+\n                   '&lt;\/s:Body>'+\n                   '&lt;\/s:Envelope>'\n \nSET @requestLength = LEN(@requestBody)\n \n    --If a production key is purchased, this will execute the failover\nIF @isLiveKey = 1\nBEGIN\n    EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n    EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/soap', false\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'sws.serviceobjects.com'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text\/xml; charset=UTF-8'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '\"https:\/\/www.serviceobjects.com\/IValidateCanada2\/ValidateCanadianAddressV2\"'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength\n    EXEC sp_OAMethod @obj, 'send', NULL, @requestBody\n    EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT\n    EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT\n    EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT\n             \n    --Checks the Response for a fatal error or if null.\n    IF @response IS NULL\n    BEGIN\n        EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n        EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/soap', false\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'swsbackup.serviceobjects.com'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text\/xml; charset=UTF-8'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '\"https:\/\/www.serviceobjects.com\/IValidateCanada2\/ValidateCanadianAddressV2\"'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength\n        EXEC sp_OAMethod @obj, 'send', NULL, @requestBody\n        EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT\n        EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT\n        EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT\n    END\nEND<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong><strong>Address Validation Canada 2 NodeJS Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SET @requestBody ='&lt;s:Envelope xmlns:s=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">'+\n                   '&lt;s:Body>'+\n                   '&lt;ValidateCanadianAddressV2 xmlns=\"https:\/\/www.serviceobjects.com\">'+\n                   '&lt;Address>' + @address + '&lt;\/Address>'+\n                   '&lt;Address2>' + @address2 + '&lt;\/Address2>'+\n                   '&lt;Municipality>' + @municipality + '&lt;\/Municipality>'+\n                   '&lt;Province>' + @province + '&lt;\/Province>'+\n                   '&lt;PostalCode>' + @postalcode + '&lt;\/PostalCode>'+\n                   '&lt;Language>' + @language + '&lt;\/Language>'+\n                   '&lt;LicenseKey>' + @key + '&lt;\/LicenseKey>'+\n                   '&lt;\/ValidateCanadianAddressV2>'+\n                   '&lt;\/s:Body>'+\n                   '&lt;\/s:Envelope>'\n \nSET @requestLength = LEN(@requestBody)\n \n    --If a production key is purchased, this will execute the failover\nIF @isLiveKey = 1\nBEGIN\n    EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n    EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/soap', false\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'sws.serviceobjects.com'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text\/xml; charset=UTF-8'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '\"https:\/\/www.serviceobjects.com\/IValidateCanada2\/ValidateCanadianAddressV2\"'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength\n    EXEC sp_OAMethod @obj, 'send', NULL, @requestBody\n    EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT\n    EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT\n    EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT\n             \n    --Checks the Response for a fatal error or if null.\n    IF @response IS NULL\n    BEGIN\n        EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n        EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/soap', false\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'swsbackup.serviceobjects.com'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text\/xml; charset=UTF-8'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '\"https:\/\/www.serviceobjects.com\/IValidateCanada2\/ValidateCanadianAddressV2\"'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength\n        EXEC sp_OAMethod @obj, 'send', NULL, @requestBody\n        EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT\n        EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT\n        EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT\n    END\nEND<\/pre>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":2495,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2536","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AVCA2 - SOAP<\/title>\n<meta name=\"description\" content=\"C#JavaPHPRoRPythonColdFusionVBApexTSQLNodeJS Address Validation Canada 2 C# Code Snippet response = ws.ValidateCanadianAddressV2(Address.Text,\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AVCA2 - SOAP\" \/>\n<meta property=\"og:description\" content=\"C#JavaPHPRoRPythonColdFusionVBApexTSQLNodeJS Address Validation Canada 2 C# Code Snippet response = ws.ValidateCanadianAddressV2(Address.Text,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-29T16:18:16+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/\",\"name\":\"AVCA2 - SOAP\",\"isPartOf\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\"},\"datePublished\":\"2022-11-09T07:45:58+00:00\",\"dateModified\":\"2024-03-29T16:18:16+00:00\",\"description\":\"C#JavaPHPRoRPythonColdFusionVBApexTSQLNodeJS Address Validation Canada 2 C# Code Snippet response = ws.ValidateCanadianAddressV2(Address.Text,\",\"breadcrumb\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DOTS Address Validation &#8211; Canada 2\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AVCA2 &#8211; Code Snippets and Sample Code\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"AVCA2 &#8211; SOAP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.serviceobjects.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#organization\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"contentUrl\":\"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"width\":2560,\"height\":1440,\"caption\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\"},\"image\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AVCA2 - SOAP","description":"C#JavaPHPRoRPythonColdFusionVBApexTSQLNodeJS Address Validation Canada 2 C# Code Snippet response = ws.ValidateCanadianAddressV2(Address.Text,","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"AVCA2 - SOAP","og_description":"C#JavaPHPRoRPythonColdFusionVBApexTSQLNodeJS Address Validation Canada 2 C# Code Snippet response = ws.ValidateCanadianAddressV2(Address.Text,","og_url":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/","og_site_name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","article_modified_time":"2024-03-29T16:18:16+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/","url":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/","name":"AVCA2 - SOAP","isPartOf":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#website"},"datePublished":"2022-11-09T07:45:58+00:00","dateModified":"2024-03-29T16:18:16+00:00","description":"C#JavaPHPRoRPythonColdFusionVBApexTSQLNodeJS Address Validation Canada 2 C# Code Snippet response = ws.ValidateCanadianAddressV2(Address.Text,","breadcrumb":{"@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-soap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.serviceobjects.com\/docs\/"},{"@type":"ListItem","position":2,"name":"DOTS Address Validation &#8211; Canada 2","item":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/"},{"@type":"ListItem","position":3,"name":"AVCA2 &#8211; Code Snippets and Sample Code","item":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/"},{"@type":"ListItem","position":4,"name":"AVCA2 &#8211; SOAP"}]},{"@type":"WebSite","@id":"https:\/\/test.serviceobjects.com\/docs\/#website","url":"https:\/\/test.serviceobjects.com\/docs\/","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","description":"","publisher":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.serviceobjects.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.serviceobjects.com\/docs\/#organization","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","url":"https:\/\/test.serviceobjects.com\/docs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/","url":"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","contentUrl":"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","width":2560,"height":1440,"caption":"Service Objects | Contact, Phone, Email Verification | Data Quality Services"},"image":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/comments?post=2536"}],"version-history":[{"count":8,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2536\/revisions"}],"predecessor-version":[{"id":10047,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2536\/revisions\/10047"}],"up":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2495"}],"wp:attachment":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/media?parent=2536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}