locked
Problem importing WSDL file into Access 2003 using Web Services Toolkit RRS feed

  • Question

  • Hi

    I am using WinXP with Access 2003 with the SOAP toolkit V3 and the Office 2003 toolkit installed. I have previously imported a WSDL file and accessed a web service using the code generated by the Web Service Reference Tool, however since the service has been updated I get the following error when trying to import the updated WSDL file:

    'The Web Service Rerferences Tool could not generate the requested code. Any changes that were made to your project have been rolled back.'

    I can successfully import the same WSDL file into Visual Studio 10.

    Any suggestions as to why the error is occuring or better yet how to resolve it?

    Thanks

    Lewis

    Wednesday, August 25, 2010 8:40 AM

Answers

  • I think I may have a solution now. As I can import the WSDL into VB.net I am writing a console ap that I can call using Access. So far it can access the service, pass data, accept the return values and write them into a table.

    Fingers crossed!

    Lewis

    • Marked as answer by Ji.Zhou Tuesday, August 31, 2010 10:25 AM
    Friday, August 27, 2010 8:58 AM

All replies

  • the only relevant info on that error message I found was this:

    http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/661c73d7-6d81-4696-9621-43528a7ddc0b

     

    Wednesday, August 25, 2010 11:58 AM
  • Thanks for that - I found that link as well.

    In my case the service is just using http.

    As per the suggestion in the link I did wonder about trying to take the code created by the WSDL import into Visual Studio and create a dll that I can use in vba, but I don't really know where to start. :/

    Regards

    Lewis

    Wednesday, August 25, 2010 12:52 PM
  • Have you considered using a standard xml library? For the most part you’ll find that the code is a lot more lightweight, more flexible, and as new web services are added to the site, you don’t have to try and regenerate an existing mess which is quite problematic and difficult to do with each method and property of the web service having to be recreated in access code as a class object.

     

    In place of all those properties and methods and class objects that soap add in generates, try something like the following:

     

    Public Sub GetQuote2()

     

       Dim objXML           As Object

       Dim strSymbol        As String

       Dim strURL           As String

       Dim strWFormat       As String

     

       Set objXML = CreateObject("MSXML2.XMLHTTP")

               

       strURL = "http://ca.finance.yahoo.com/d/quotes.csv?s="

       strWFormat = "&f=sl1d1t1c1ohgv&e=.csv"

      

       strSymbol = "MSFT"

      

       objXML.Open "GET", strURL & strSymbol & strWFormat, False

       objXML.Send

      

       Debug.Print "Symbol = " & Split(objXML.ResponseText, ",")(0)

       Debug.Print "Trade  = " & Split(objXML.ResponseText, ",")(1)

       Debug.Print "Date   = " & Split(objXML.ResponseText, ",")(2)

     

    End Sub

     

    Not only as the above a lot more lightweight, you can also use the xml library to parse and iterate through the document object model (dom).  So, you could consider using the above approach in place of that soap add in.  I suspect some of the ease of use in the above approach will come down to what kind of documentation you have for that existing web service.

     

    Albert D. Kallal

    Edmonton, Alberta Canada

    Wednesday, August 25, 2010 1:24 PM
  • Hi Albert,

    hmm, what you suggest sounds good, but I am not experienced enough to apply that to the web service. The code generated by the SOAP add in enables my to supply it with the relevant info and then it does all the hard work, or more importantly, it does the thinking for me.

    Whilst I would like to try your approach, I don't know where to begin.

    (I do have good docs for the web service describing each of the methods and parameters)

    Regards

    Lewis

    Wednesday, August 25, 2010 2:38 PM
  • My other option is to redo the database in VB10 - I have got the basic web services to work, which is one half, but now I have to re-implement the forms and other existing vba functionality in VB10.

    Any advice anyone?

    Thanks

    Lewis

    Thursday, August 26, 2010 6:49 AM
  • I think I may have a solution now. As I can import the WSDL into VB.net I am writing a console ap that I can call using Access. So far it can access the service, pass data, accept the return values and write them into a table.

    Fingers crossed!

    Lewis

    • Marked as answer by Ji.Zhou Tuesday, August 31, 2010 10:25 AM
    Friday, August 27, 2010 8:58 AM