Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    May 2003
    Location
    Caldwell, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pulling a Web Service (.NET & Excel vba)

    Does any one at Woody's have any articles on pulling and pushing to a web service located on a "localhost". I am developing a program and want to click a submit button on an Excel form and have it retreive an xml file and parse it using a Domdocument.

    I have built the web service, the service is active on local host, but I would like to look at some of other people's code and maybe some articles on debugging such an application.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Pulling a Web Service (.NET & Excel vba)

    I've mostly been ignoring web services. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> There's no conceptual difference between talking to a web service running on localhost and on www.OtherSideOfTheWorld.com. I imagine there are a number of articles on how to consume a web service, particularly in relation to "public" ones.

    A while ago someone posted about Google's Web API. Perhaps that would be a good demo app to experiment with.

    By the way, regarding the DOM stuff, IE 6 seems to break some of the functionality of my IE 5-based VBA code (was reading HTML, not XML). If you are in a mixed environment, make sure to test with IE 6 and the latest patched components.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pulling a Web Service (.NET & Excel vba)

    Could you use the API URLDownloadToFile?

    Here's the function:

    Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
    (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
    ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

    It is in the MSDN.

  4. #4
    New Lounger
    Join Date
    May 2003
    Location
    Caldwell, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pulling a Web Service (.NET & Excel vba)

    <img src=/S/blackteeth.gif border=0 alt=blackteeth width=20 height=20> cw,

    Thanks for your helpful suggestions. I will search for any upgrades to IE and visit the demo site as you suggest.

    I have came across some textbook material on consuming web services and using the XML parser. I believe some of my problem may lie in the xml documents referenced schema, but am going to do further research and reading on the XML technology theory before testing anymore code.

    I do not really have a formal background with programming per se, as my background is chiefly that of a CPA and financial analyst. But I partnered with several techno wizards on several occasions (regrettably it didn't work out) and ended up deciding to write the program myself. I have spent the last year studying the .NET technologies and am doing the code myself. I spent over 2 years developing the business rules (which are complete and only require an XML input file to deliver), have 85% of the UI developed, am am now working on the application plumbing.

    I feel that "Excel" will be the business browser of the future. A lot of financial analytical funtionality and data will be available via "web services", etc, and I see the future as putting this info in the end-user's hand so the may massage, manipulate, and analyze it they require. A tool like EXCEL seems to pack the power that IE and HTML lack.

    Thanks again <img src=/S/blackteeth.gif border=0 alt=blackteeth width=20 height=20>

  5. #5
    New Lounger
    Join Date
    May 2003
    Location
    Caldwell, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pulling a Web Service (.NET & Excel vba)

    Drew,

    Thanks for the suggetion on the function to use. I have to admit that I am a little bit (quite a bit) fussy on web technologies with VB 6.0. I did read quite a litle bit about OO theory in 6.0 and a little about ASP but abandoned it in favor of .NET. (I didn't want to learn them both). Probably if I had the necessary experience in 6.0 I would not have so much struggle on the client side.

    I think I am going to do a little more research in to XML technologies and the XML parser before branching out into alternative solutions. I am slightly overwhelmed by all the technologies and alternative ways of delivering my product (in the end that's what it is about) so I think I will just focus on XML and the Client parser for now.
    Thanks













    Thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •