Susan Stevenson
asked on
MS Access VBA to import data from Webservice
Presently my webservice returns data in the browser like this "1 462539 100000 100036 requested SSVP Vehicle Package ...."
Only when I view source do I get access to the underlying xml which I can import with no issues once saved locally.
I am trying to automate the import from access, how do I do this?
Can I get Access to View source and save the xml file for me?
Only when I view source do I get access to the underlying xml which I can import with no issues once saved locally.
I am trying to automate the import from access, how do I do this?
Can I get Access to View source and save the xml file for me?
ASKER
thanks ste5an.. I'm having an issue accessing the source code from vba which is the main issue i think. in chrome, when i add "view-source" to the front of the url it brings me to the source xml directly. I tried sneaking this in front of my application. import xml url in vba but of course this is not leveraging off chrome so will not work. im wondering now if i can use vba to:
open chrome (but hide from the user)
navigate to the view source url (which also contains login and id parameters - i believe this too causes an issue)
save page as .xml file
from there, i could get everything else to work i think.
any help would be appreciated, thanks
open chrome (but hide from the user)
navigate to the view source url (which also contains login and id parameters - i believe this too causes an issue)
save page as .xml file
from there, i could get everything else to work i think.
any help would be appreciated, thanks
ASKER
oh i believe it is REST webservice
Have you took a look at the linked thread?
By using MSXML2 you can either query the web service and parse the XML on the fly. Or you use the XMLHTTP60 class to download it and save it.
For the rest: Try to rephrase your question. It's not clear to me, what your actual problem is.
By using MSXML2 you can either query the web service and parse the XML on the fly. Or you use the XMLHTTP60 class to download it and save it.
For the rest: Try to rephrase your question. It's not clear to me, what your actual problem is.
ASKER
my apologies! i did not see the database on the thread.. will look in more detail now. thank you
ASKER
Hi Ste5an,
I have attached a copy of the data I see when I go to the web service via IE. As you can see, it is not in a structured format. I notice that the example in the previous threads directs you straight to structured xml data.
I am trying to download the source structured xml data which is only visible to me when I right click and 'View source' in the browser.... unless I use chrome which I can navigate directly to using the 'view-source' clause at the beginning of the url. Hence, I wanted to reproduce this behaviour using vba.
Forgive me if I am missing something obvious, I'm self taught with vba and certainly never even considered any kind of integration with web services before.
'
Thanks in advance..
Susan
web-services-response.png
I have attached a copy of the data I see when I go to the web service via IE. As you can see, it is not in a structured format. I notice that the example in the previous threads directs you straight to structured xml data.
I am trying to download the source structured xml data which is only visible to me when I right click and 'View source' in the browser.... unless I use chrome which I can navigate directly to using the 'view-source' clause at the beginning of the url. Hence, I wanted to reproduce this behaviour using vba.
Forgive me if I am missing something obvious, I'm self taught with vba and certainly never even considered any kind of integration with web services before.
'
Thanks in advance..
Susan
web-services-response.png
ASKER
Hi Ste5an,
I have also tried the URL from your example against my own import xml code. It imports for the most part although there are some data truncations.
I believe the issue lies in me not getting direct access to the xml code :-(
Susan
I have also tried the URL from your example against my own import xml code. It imports for the most part although there are some data truncations.
I believe the issue lies in me not getting direct access to the xml code :-(
Susan
For concrete help, I'd need the web service's URL, when possible. Otherwise it's hard to talk about unseen data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
resolved using alternative method
Yup, e.g. see this thread: Retrieving RSS Feed via XML url to Access table.