1 2 Previous Next 43 Replies Latest reply on Sep 30, 2014 8:12 AM by BKBK

    can't get webservice to work - VIES checkVat WSDL

    fede_ctfd Level 1

      I'm trying to incorporate a VAT checking function in my website, for validating entered VAT.
      This service is granted by european Vies WSDL service.
      No matter what I try, I always get the same error:

       

       

      Web service operation checkVat with parameters {xx,xxxxxxxxxxx} cannot be found.

       

      This is the last code I tried (maybe the fifth or sixth method experimented),

      just straight from the Coldfusion documentation:

       

       

      <cfscript>

          ws = CreateObject("webservice",

      "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");

          ws.checkVat("xx","xxxxxxxxxxx");

          req = getSOAPRequest(ws);

      </cfscript>

      <cfdump var="#req#">

       

      <cfset soapreq = GetSOAPRequest(ws)>

      <h2>SOAP Request</h2>

      <cfdump var="#soapreq#">

       

      <cfset soapresp = GetSOAPResponse(ws)>

      <h2>SOAP Response</h2>

      <cfdump var="#soapresp#">

       

       

      Where red x represent country code and VAT number.

       

      I'm about to let down, three days spent in trying and still no luck.
      Someone willing to bang his head with mine?

       

      Thanks anyway.

        • 1. Re: can't get webservice to work - VIES checkVat WSDL
          BKBK Adobe Community Professional & MVP

          You are practically there already! Just skip all the SOAP bits:

           

          <cfscript>

              ws = CreateObject("webservice", "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");

             response = ws.checkVat("GB","123456789");

             nm = response.getName();

             addr = response.getAddress();

          </cfscript>

           

          <cfoutput>

          Name: #nm#<br>

          Address: #addr#<br>

          </cfoutput>

           

          <!--- Uncomment the following line, to see the various methods you can invoke to obtain information the response contains --->

          <!--- <cfdump var="#response#"> --->

           

          You certainly would like to know about this previous thread on the same subject.

          • 2. Re: can't get webservice to work - VIES checkVat WSDL
            fede_ctfd Level 1

            Thank you for the fast and kind reply,

            but nope >:(, it isn't still working for me.

             

            At first I've tried to modify my code following your direction, but got the same old error.


            Then I tried copy-pasting your code just to be sure nothing was mismatched, and still got the same error:

             

            Web service operation checkVat with parameters {GB,123456789} cannot be found.

             

            Just to investigate more deeply: is this code working for you?
            Could it be something wrong on my side, like admin settings or other??

             

            That would be strange, I've used and still use other WSDL services (i.e. for currency conversion) and they work faultless.

             

            (Thank you for the link, I think I saw that other thread during my endless days of internet research on the subject but unfurtunately that didn't do the trick for me)

            • 3. Re: can't get webservice to work - VIES checkVat WSDL
              BKBK Adobe Community Professional & MVP

              You should pass strings as I do, that is, checkVat("xx","yyyyyyyyy") and not checkVat(xx, yyyyyyyyy). In fact, I have just run the following code, and it gives me the details of a well-known bank in the UK:

               

              <cfscript>

                  ws = CreateObject("webservice", "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");

                 response = ws.checkVat("GB","244155576");

                 nm = response.getName();

                 addr = response.getAddress();

              </cfscript>

               

              <cfoutput>

              Name: #nm#<br>

              Address: #addr#<br>

              </cfoutput>

               

              <!--- Uncomment the following line, to see the various methods you can invoke to obtain information the response contains --->

              <!--- <cfdump var="#response#"> --->

              • 4. Re: Re: can't get webservice to work - VIES checkVat WSDL
                fede_ctfd Level 1

                Thank you again for the much appreciated support, but sadly still that doesn't work for me.

                 

                I pass the info as strings, exactly as in your example.

                 

                Just to be completely sure, I tried copy-pasting again from your reply, and I get:

                 

                Web service operation checkVat with parameters {GB,244155576} cannot be found.

                 

                Glad to know that it is indeed working for someone... but painfully inexplicably why it is not to me >:(

                 

                I use Coldfusion8, maybe something wrong on my "old" version?

                Should I check firewall settings on my CF server?

                Something admin-side or something else to be initialized on the page?

                 

                 

                Anyway, agonizingly grateful for your kind support

                • 5. Re: can't get webservice to work - VIES checkVat WSDL
                  BKBK Adobe Community Professional & MVP

                  You may have to refresh the WSDL. Try a different tack, namely

                   

                  <cfinvoke

                      webservice="http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"

                      method="checkVat"

                      refreshwsdl="yes"

                      returnvariable="ws_response">

                      <cfinvokeargument name="countryCode" value="GB">

                      <cfinvokeargument name="vatNumber" value="244155576">

                  </cfinvoke>

                   

                  <cfset nm = ws_response.getName()>

                  <cfset addr = ws_response.getAddress()>

                   

                  <cfoutput>

                  Name: #nm#<br>

                  Address: #addr#<br>

                  </cfoutput>

                   

                   

                  <!--- Uncomment the following line, to see the various methods you can invoke to obtain information the response contains --->

                  <!--- <cfdump var="#ws_response#"> --->

                  • 6. Re: can't get webservice to work - VIES checkVat WSDL
                    fede_ctfd Level 1

                    Copy-pasted your code again, and got:

                     

                    Web service operation checkVat with parameters {vatNumber={244155576},countryCode={GB}} cannot be found.


                    Still no luck. Since it is working for you, I assume something's wrong by my side.

                     

                    I'm checking firewall settings now, and url filtering... hope to find the right trick.

                    • 7. Re: can't get webservice to work - VIES checkVat WSDL
                      BKBK Adobe Community Professional & MVP

                      At least, we can now identify a clue. Your setup is apparently passing a struct, hence a complex type, to the service, instead of strings.

                      • 8. Re: can't get webservice to work - VIES checkVat WSDL
                        fede_ctfd Level 1

                        Yes, only with last example, when data was passed as argument.

                         

                        After whitelisting, checking admin settings (checkvat is listed in web services), still got same error.

                         

                        Tried every combination of parameter/string/object/complex or simple, but still no luck.

                        Tried refreswsdl, no luck.

                         

                        Don't know where the issue could be.

                        • 9. Re: can't get webservice to work - VIES checkVat WSDL
                          BKBK Adobe Community Professional & MVP

                          Is there an intervening method or some other process that is, for example, doing a conversion to JSON?

                          • 10. Re: can't get webservice to work - VIES checkVat WSDL
                            BKBK Adobe Community Professional & MVP

                            fede_ctfd wrote:

                             

                            After whitelisting, checking admin settings (checkvat is listed in web services), still got same error.

                            It may or may not have anything to do with the issue, but you should change the web service name to something other than checkvat. That is the name of the method.

                            • 11. Re: Re: can't get webservice to work - VIES checkVat WSDL
                              fede_ctfd Level 1

                              Sorry, my bad explaining, it is listed with full weburl of wsdl, as automated listing, I didn't change.

                               

                              Just to be sure nothing was interfering, I created a blank page only with the code:

                               

                              <html>

                              <head>

                              <title>Untitled Document</title>

                              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

                              </head>

                               

                              <body>

                               

                              <cfscript>

                               

                                  ws = CreateObject("webservice", "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");

                               

                                response = ws.checkVat("GB","244155576");

                               

                                nm = response.getName();

                               

                                addr = response.getAddress();

                               

                              </cfscript>

                               

                               

                              <cfoutput>

                               

                              Name: #nm#<br>

                               

                              Address: #addr#<br>

                               

                              </cfoutput>

                               

                              </body>

                              </html>

                               

                              But still, painfully, got the same error:

                               

                              Web service operation checkVat with parameters {GB,244155576} cannot be found.


                              Now going to lunch, hoping a pause will ease my pain...

                              • 12. Re: can't get webservice to work - VIES checkVat WSDL
                                BKBK Adobe Community Professional & MVP

                                Remove the meta tag. In fact, the HTML code is unnecessary.

                                • 13. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                  fede_ctfd Level 1

                                  code:

                                   

                                  <html>

                                  <head>

                                  <title>Untitled Document</title>

                                  </head>

                                   

                                  <body>

                                   

                                  <cfscript>

                                   

                                      ws = CreateObject("webservice", "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");

                                   

                                     response = ws.checkVat("GB","244155576");

                                   

                                     nm = response.getName();

                                   

                                     addr = response.getAddress();

                                   

                                  </cfscript>

                                   

                                   

                                   

                                  <cfoutput>

                                   

                                  Name: #nm#<br>

                                   

                                  Address: #addr#<br>

                                   

                                  </cfoutput>

                                   

                                  </body>

                                  </html>

                                   

                                  Response:

                                   

                                  Web service operation checkVat with parameters {GB,244155576} cannot be found.


                                   

                                  • 14. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                    BKBK Adobe Community Professional & MVP

                                    fede_ctfd wrote:

                                     

                                    it is listed with full weburl of wsdl, as automated listing, I didn't change.

                                    What I meant was, change the name of the service in the Coldfusion Administrator to something other than checkvat. Suppose you rename the webservice in the Administrator to xyz. Then you could test with the code,

                                     

                                    <cfscript>

                                        ws = CreateObject("webservice", "xyz");

                                      response = ws.checkVat("GB","244155576");

                                      nm = response.getName();

                                      addr = response.getAddress();

                                    </cfscript>

                                    <cfoutput>

                                    Name: #nm#<br>

                                    Address: #addr#<br>

                                    </cfoutput>

                                     

                                    Assuming this test fails, you should also test by deleting the web service entry in the Administrator.

                                    • 15. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                      BKBK Adobe Community Professional & MVP

                                      Quite a curious problem. I am trying to reproduce it. If you get a breakthrough, let us know.

                                      • 16. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                        BKBK Adobe Community Professional & MVP

                                        fede_ctfd wrote:

                                         

                                        Copy-pasted your code again, and got:

                                         

                                        Web service operation checkVat with parameters {vatNumber={244155576},countryCode={GB}} cannot be found.

                                        This suggests a conversion - perhaps AJAX? perhaps to JSON? - somewhere.

                                        • 17. Re: can't get webservice to work - VIES checkVat WSDL
                                          BKBK Adobe Community Professional & MVP

                                          Now a test to rule out any influence from your Application file. Create a new directory, for testing, and place the above test file in it. Save the following code as the file Application.cfm within the same directory.

                                           

                                          <cfapplication name="ws_test"

                                              sessionmanagement="Yes"

                                              setclientcookies="Yes"

                                              sessiontimeout="#createTimeSpan(0,0,20,0)#"

                                              applicationtimeout="#createTimeSpan(1,0,0,0)#">

                                           

                                          Run the CFM file.

                                          • 18. Re: can't get webservice to work - VIES checkVat WSDL
                                            fede_ctfd Level 1

                                            BKBK ha scritto:

                                             

                                            Now a test to rule out any influence from your Application file. Create a new directory, for testing, and place the above test file in it. Save the following code as the file Application.cfm within the same directory.

                                            .....

                                            Run the CFM file.

                                             

                                            I'm back, just tried your suggestion, to be sure I understood well:

                                             

                                            -I created new directory

                                            -placed test_vat.cfm in that directory

                                            -placed above code in an empty application.cfm file on the same directory

                                            -run test_vat.cfm file

                                             

                                            ...and got the same ol' error:

                                            Web service operation checkVat with parameters {GB,244155576} cannot be found.

                                            • 19. Re: can't get webservice to work - VIES checkVat WSDL
                                              fede_ctfd Level 1

                                              As for this:

                                              BKBK ha scritto:

                                               

                                              fede_ctfd wrote:

                                               

                                              it is listed with full weburl of wsdl, as automated listing, I didn't change.

                                              What I meant was, change the name of the service in the Coldfusion Administrator to something other than checkvat. Suppose you rename the webservice in the Administrator to xyz. Then you could test with the code,

                                               

                                               

                                              I meant that the full name was the weburl, as from automated cf naming system, and not checkVat, like this:


                                              Actions Web Service Name WSDL URL
                                              http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

                                               

                                              however, I now changed the name to VIES_vat for testing, and updated the call from the script...

                                              ....and still get the same error

                                              • 20. Re: can't get webservice to work - VIES checkVat WSDL
                                                BKBK Adobe Community Professional & MVP

                                                That's right, with one exception. For exact comparison of our tests, name the file Application.cfm, with capital A.

                                                • 21. Re: can't get webservice to work - VIES checkVat WSDL
                                                  fede_ctfd Level 1

                                                  OK renamed to Application.cfm -

                                                  but still got the same error.

                                                   

                                                  Tried the refreshwsdl thing again too, just to be sure, but nope.

                                                   

                                                  (meanwhile, thank you for the continuative support)

                                                  • 22. Re: can't get webservice to work - VIES checkVat WSDL
                                                    BKBK Adobe Community Professional & MVP

                                                    OK. At least, we've got that out of the way.

                                                    • 23. Re: can't get webservice to work - VIES checkVat WSDL
                                                      BKBK Adobe Community Professional & MVP

                                                      1) Now, what if we take a lesson from the error message, and try this:

                                                       

                                                      <cfset arg.countryCode="GB">

                                                      <cfset arg.vatNumber="244155576">

                                                      <cfinvoke

                                                          webservice="http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"

                                                          method="checkVat"

                                                          refreshwsdl="yes"

                                                          returnvariable="ws_response" argumentcollection="#arg#">

                                                      </cfinvoke>

                                                       

                                                      <cfset nm = ws_response.getName()>

                                                      <cfset addr = ws_response.getAddress()>

                                                       

                                                      <cfoutput>

                                                      Name: #nm#<br>

                                                      Address: #addr#<br>

                                                      </cfoutput>

                                                       

                                                      2) Do the error logs provide any more information besides the error message we already know?

                                                      • 24. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                                        fede_ctfd Level 1

                                                        1) Tried last code, and this is the complete resulting error:

                                                         

                                                         

                                                        Web service operation checkVat with parameters {VATNUMBER={244155576},COUNTRYCODE={GB}} cannot be found.

                                                         

                                                        The error occurred in C:\xxxxxxxxxxxx\cfm_test\14_piva_test.cfm: line 22

                                                         

                                                        20 :    refreshwsdl="yes"

                                                        21 :

                                                        22 :    returnvariable="ws_response" argumentcollection="#arg#">

                                                        23 :

                                                        24 : </cfinvoke>

                                                         

                                                         

                                                        Resources: •Check the ColdFusion documentation to verify that you are using the correct syntax.

                                                        •Search the Knowledge Base to find a solution to your problem.

                                                         

                                                         

                                                        Browser  Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

                                                        Referrer  

                                                        Date/Time  29-Sep-14 05:20 PM

                                                         

                                                         

                                                        Stack Trace

                                                        at cf14_piva_test2ecfm1274206001.runPage(C:\xxxxxxxxxx\cfm_test\14_piva_test.cfm:22)

                                                         

                                                        coldfusion.xml.rpc.ServiceProxy$ServiceMethodNotFoundException: Web service operation checkVat with parameters {VATNUMBER={244155576},COUNTRYCODE={GB}} cannot be found.

                                                            at coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:147)

                                                            at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2210)

                                                            at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:417)

                                                            at cf14_piva_test2ecfm1274206001.runPage(C:\xxxxxxxxxxxxxxx\cfm_test\14_piva_test.cfm:22)

                                                            at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)

                                                            at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)

                                                            at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

                                                            at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)

                                                            at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)

                                                            at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

                                                            at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)

                                                            at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)

                                                            at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)

                                                            at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

                                                            at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

                                                            at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

                                                            at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

                                                            at coldfusion.CfmServlet.service(CfmServlet.java:175)

                                                            at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

                                                            at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)

                                                            at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )

                                                            at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

                                                            at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

                                                            at jrun.servlet.FilterChain.service(FilterChain.java:101)

                                                            at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

                                                            at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

                                                            at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)

                                                            at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

                                                            at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

                                                            at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

                                                            at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

                                                            at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

                                                            at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


                                                        2) in log files i've only found this:


                                                        Web service operation checkVat with parameters {VATNUMBER={244155576},COUNTRYCODE={GB}} cannot be found. The specific sequence of files included or processed is: C:\xxxxxxxxxx\cfm_test\14_piva_test.cfm, line: 22

                                                        • 25. Re: can't get webservice to work - VIES checkVat WSDL
                                                          BKBK Adobe Community Professional & MVP

                                                          Looking very much like a Coldfusion 8 bug. But we shall soldier on.

                                                           

                                                          The error message suggests that Coldfusion might be expecting less than 2 or more than 2 arguments for the checkVat function. This gives me the idea of experimenting with parameter numbers and with the omit attribute.

                                                           

                                                          Test: What about toggling the values of omit between true and false in

                                                           

                                                          <cfinvoke

                                                              webservice="http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"

                                                              method="checkVat"

                                                              refreshwsdl="yes"

                                                              returnvariable="ws_response">

                                                              <cfinvokeargument name="countryCode" value="GB" omit="true">

                                                              <cfinvokeargument name="vatNumber" value="244155576" omit="false">

                                                          </cfinvoke>

                                                           

                                                          <cfset nm = ws_response.getName()>

                                                          <cfset addr = ws_response.getAddress()>

                                                           

                                                          <cfoutput>

                                                          Name: #nm#<br>

                                                          Address: #addr#<br>

                                                          </cfoutput>

                                                           

                                                           

                                                          <!--- Uncomment the following line, to see the various methods you can invoke to obtain information the response contains --->

                                                          <!--- <cfdump var="#ws_response#"> --->

                                                          • 26. Re: can't get webservice to work - VIES checkVat WSDL
                                                            fede_ctfd Level 1

                                                            ....and we got:

                                                             

                                                            Web service operation checkVat with parameters {vatNumber={244155576},countryCode={GB}} cannot be found.

                                                             

                                                            I've had the chance to try the same experimentation on another server running CF8 from the same network,

                                                            and surprisingly (or maybe unsurprisingly) I got the same error.

                                                            Those hellish words will resound in my nightmares tonight.

                                                             

                                                            Three days spent trying now, I think I should consider dropping this feature (I probably would have spent less time by checking customer's vat manually as per request!)

                                                             

                                                            Just to know: wich version of CF are you running?

                                                            I was already considering an upgrade for other features (but too bad CF8 is no longer considered for upgrading) this could be the final drop...

                                                            • 27. Re: can't get webservice to work - VIES checkVat WSDL
                                                              BKBK Adobe Community Professional & MVP

                                                              OK. And now this invocation with just one parameter:

                                                               

                                                              <cfset checkVat.countryCode="GB">

                                                              <cfset checkVat.vatNumber="244155576">

                                                              <cfinvoke

                                                                  webservice="http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"

                                                                  method="checkVat"

                                                                  refreshwsdl="yes"

                                                                  returnvariable="ws_response" >

                                                                  <cfinvokeargument name="checkVat" value="#checkVat#">

                                                              </cfinvoke>

                                                               

                                                              <cfset nm = ws_response.getName()>

                                                              <cfset addr = ws_response.getAddress()>

                                                              <cfoutput>

                                                              Name: #nm#<br>

                                                              Address: #addr#<br>

                                                              </cfoutput>

                                                              • 28. Re: can't get webservice to work - VIES checkVat WSDL
                                                                BKBK Adobe Community Professional & MVP

                                                                fede_ctfd wrote:

                                                                 

                                                                Just to know: wich version of CF are you running?

                                                                I was already considering an upgrade for other features (but too bad CF8 is no longer considered for upgrading) this could be the final drop...

                                                                I am on version 11. One thing you could do is to implement all the ColdFusion 8 updates and hot fixes.

                                                                • 29. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                                                  fede_ctfd Level 1

                                                                  BKBK ha scritto:

                                                                   

                                                                  OK. And now this invocation with just one parameter:

                                                                   

                                                                  [.....]

                                                                   

                                                                  I get this error:

                                                                   

                                                                  Web service operation checkVat with parameters {checkVat={{VATNUMBER={244155576},COUNTRYCODE={GB}}}} cannot be found.

                                                                   

                                                                  Now I'm on the ride for hotfixes and updates, that's definitely something I should have checked before.

                                                                  • 30. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                                                    fede_ctfd Level 1

                                                                    BKBK ha scritto:

                                                                     

                                                                    fede_ctfd wrote:

                                                                     

                                                                    Just to know: wich version of CF are you running?

                                                                    I was already considering an upgrade for other features (but too bad CF8 is no longer considered for upgrading) this could be the final drop...

                                                                    I am on version 11. One thing you could do is to implement all the ColdFusion 8 updates and hot fixes.

                                                                     

                                                                    I've installed cumulative Hotfix3 (others where only minor fixes for specific issues, not related to this problem)

                                                                    but no luck.

                                                                     

                                                                    Just discovered that there was an update to 8.01 version but it is now not downloadable from Adobe website (tried to search in every corner, just linking to other spaces, that link to other spaces, that link to the starting point...) only updates for the latest versions are still available. Seems like a lack of not-so-retro-support, that should have taken small amount of disk space to have a complete service (and CF9 is still considered for purchasing upgrades too).

                                                                     

                                                                    Not sure if I want to find the 8.01 update from other sources, considering the risk that could be harmful software and that could not fix my problem.

                                                                    My fault not checking updates before, just like... five or six years ago (I remember buying CF8 when it was brand new)

                                                                    • 31. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                                                      BKBK Adobe Community Professional & MVP

                                                                      fede_ctfd wrote:

                                                                      Not sure if I want to find the 8.01 update from other sources, considering the risk that could be harmful software and that could not fix my problem.

                                                                      Wise. Contact Adobe Support. They might be able to help.

                                                                      • 32. Re: Re: can't get webservice to work - VIES checkVat WSDL
                                                                        BKBK Adobe Community Professional & MVP

                                                                        fede_ctfd wrote:

                                                                         

                                                                        BKBK ha scritto:

                                                                         

                                                                        OK. And now this invocation with just one parameter:

                                                                         

                                                                        [.....]

                                                                         

                                                                        I get this error:

                                                                         

                                                                        Web service operation checkVat with parameters {checkVat={{VATNUMBER={244155576},COUNTRYCODE={GB}}}} cannot be found.

                                                                         

                                                                        Now I'm on the ride for hotfixes and updates, that's definitely something I should have checked before.

                                                                        OK. Let's then get back to basics, and find out what kind of methods the service expects.

                                                                         

                                                                        <cfset   ws = CreateObject("webservice", "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl")>

                                                                        <cfdump var="#ws#">

                                                                         

                                                                        What does it say?

                                                                        • 33. Re: can't get webservice to work - VIES checkVat WSDL
                                                                          fede_ctfd Level 1

                                                                          REALLY interesting approach!
                                                                          Here comes the first blink of light in days:

                                                                          object of checkVat.services.vies.taxud.eu.europa.ec.CheckVatBindingStub
                                                                           
                                                                          Class NamecheckVat.services.vies.taxud.eu.europa.ec.CheckVatBindingStub
                                                                          Methods
                                                                          Method Return Type
                                                                          checkVat(javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, org.apache.axis.holders.DateHolder, javax.xml.rpc.holders.BooleanHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder)void
                                                                          checkVatApprox(javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, java.lang.String, java.lang.String, org.apache.axis.holders.DateHolder, javax.xml.rpc.holders.BooleanHolder, javax.xml.rpc.holders.StringHolder, types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder, types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder, types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder, types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder, types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder, javax.xml.rpc.holders.StringHolder)void
                                                                          Fields
                                                                          Field Value
                                                                          java.lang.String ENDPOINT_ADDRESS_PROPERTY  javax.xml.rpc.service.endpoint.address 
                                                                          java.lang.String PASSWORD_PROPERTY  javax.xml.rpc.security.auth.password 
                                                                          java.lang.String SESSION_MAINTAIN_PROPERTY  javax.xml.rpc.session.maintain 
                                                                          java.lang.String USERNAME_PROPERTY  javax.xml.rpc.security.auth.username 
                                                                          Parent Class

                                                                           

                                                                           

                                                                          I'll have to admit I'm not so confident with java definitions...

                                                                          what about that authentication fields i.e.?

                                                                          • 34. Re: can't get webservice to work - VIES checkVat WSDL
                                                                            fede_ctfd Level 1

                                                                            Is it expecting 6 different variables?

                                                                             

                                                                            checkVat(javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder, org.apache.axis.holders.DateHolder, javax.xml.rpc.holders.BooleanHolder, javax.xml.rpc.holders.StringHolder, javax.xml.rpc.holders.StringHolder)

                                                                            -string

                                                                            -string

                                                                            -date

                                                                            -boolean

                                                                            -string

                                                                            -string

                                                                             

                                                                            Searching on other forums I've already tried a similar aproach with no success (but I remember gotting an error on date argument, even passing a "now()" or a createdate(xx,xx,xx) and createdatetime(xx,xx,xx,xx:xx:xx) )


                                                                            The fields should be:


                                                                            country code

                                                                            vat number

                                                                            request date

                                                                            valid (yes/not)

                                                                            company name

                                                                            company address

                                                                            • 35. Re: can't get webservice to work - VIES checkVat WSDL
                                                                              fede_ctfd Level 1

                                                                              Don't know if this is meaningful, but with this code:

                                                                               

                                                                                 response = ws.checkVat("GB","244155576","2014-09-29", 1, "name", "addrs");

                                                                               

                                                                              I get a different error:

                                                                               

                                                                              Cannot perform web service invocation checkVat.

                                                                              The fault returned when invoking the web service operation is:

                                                                               

                                                                              AxisFault

                                                                              faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server

                                                                              faultSubcode:

                                                                              faultString: INVALID_INPUT

                                                                              faultActor:

                                                                              faultNode:

                                                                              faultDetail:

                                                                                  {http://xml.apache.org/axis/}stackTrace:INVALID_INPUT

                                                                                  at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)

                                                                                  at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)

                                                                                  at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:10 87)

                                                                                  at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

                                                                                  at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

                                                                                  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch( Unknown Source)

                                                                                  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

                                                                                  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

                                                                                  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

                                                                                  at org.apache.xerces.parsers.XMLP... ''

                                                                              • 36. Re: can't get webservice to work - VIES checkVat WSDL
                                                                                BKBK Adobe Community Professional & MVP

                                                                                I think the ColdFusion 8 engine is making quite a dog's dinner of the web service. ColdFusion 11 defines the method as just checkVat(java.lang.String, java.lang.String).


                                                                                You could do something like this for the date:

                                                                                 

                                                                                <cfset requestDate= createobject("java", "java.util.Date").init()>

                                                                                • 37. Re: can't get webservice to work - VIES checkVat WSDL
                                                                                  BKBK Adobe Community Professional & MVP

                                                                                  fede_ctfd wrote:

                                                                                   

                                                                                  Don't know if this is meaningful, but with this code:

                                                                                   

                                                                                     response = ws.checkVat("GB","244155576","2014-09-29", 1, "name", "addrs");

                                                                                  With requestDate as defined above,

                                                                                   

                                                                                  response = ws.checkVat("GB","244155576",requestDate, True, "name", "addrs");

                                                                                  • 38. Re: can't get webservice to work - VIES checkVat WSDL
                                                                                    fede_ctfd Level 1

                                                                                    Still the same (new) error:

                                                                                     

                                                                                    Cannot perform web service invocation checkVat.

                                                                                    The fault returned when invoking the web service operation is:

                                                                                     

                                                                                    AxisFault

                                                                                    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server

                                                                                    ..../etc.

                                                                                     

                                                                                    I too think it has to do with Java date format, and I've alredy tried several conversion methods without luck.

                                                                                    Too bad there's not a javacast for datetime format in CF.


                                                                                    I'm making my mind on all the question:

                                                                                    could it be that CF8 uses an old SOAP protocol, and checkVat WSDL interacts with by dealing with 6 variables,

                                                                                    while the current protocol only makes the same job with two?

                                                                                     

                                                                                    Maybe there's a magical datetime format that would do the trick, but it's like throwing stones in water and expecting them to bounce back.

                                                                                     

                                                                                    I really would consider upgrading to CF10 if that was still available as an option...

                                                                                    • 39. Re: can't get webservice to work - VIES checkVat WSDL
                                                                                      BKBK Adobe Community Professional & MVP

                                                                                      I think the error is deeper than just type conversion. For some reason, Coldfusion 8 is messing up the web service definition.

                                                                                       

                                                                                      response = ws.checkVat("GB","244155576",requestDate, True, "name", "addrs");

                                                                                      This is unlikely to be correct. In fact, when I run it on Coldfusion 11, where the two-argument function works, I get the error message,

                                                                                       

                                                                                      " Web service operation checkVat with parameters {GB,244155576,Tue Sep 30 09:15:45 CEST 2014,True,name,addrs} cannot be found. "


                                                                                      However, looking back with fresh eyes this morning, I found the definitive reason why the 6-argument function won't work anyway. From your result, it returns void.

                                                                                      1 2 Previous Next