We help IT Professionals succeed at work.
Get Started
Troubleshooting Question

reading a xml file and sending to web service call and read response

Fordraiders
Fordraiders asked
on
45 Views
Last Modified: 2020-09-15
Access 365 vba
I have a xml file i need to send to a service call and get a response back.
Dim myHTTP As New MSXML2.XMLHTTP30
Set myHTTP = CreateObject("msxml2.xmlhttp")
'create dom document variable
'stores the xml to send
Dim myDom As New MSXML2.DOMDocument30
'Create the DomDocument Object
Set myDom = CreateObject("MSXML2.DOMDocument")
'Load entire Document before moving on
myDom.async = False
'xml string variable
'replace with location if sending from file or URL
myDom.Load ("C:\Users\br1d\OneDriveinc\Desktop\RedBook Escalation\Skusubmission.xml")
 
'loads the xml
'change to .Load for file or url
myDom.Load (myDom.XML)
'open the connection
myHTTP.Open "POST", "https://xxxx01.dev-sap.gr.com:41111/sap/commerce/esrprice?sap-client=220", False, "xxxxx", "xxxxx"", False"
'send the XML
myHTTP.Send (myDom.XML)
'Display the response
MsgBox myHTTP.responseText

cant seem to get the xml document to load correctly.
Thanks
fordraiders
Comment
Watch Question
Consulting
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE