Solved

Using Access VBA with M/S XML 3.0 Object Reference???

Posted on 2008-06-18
4
345 Views
Last Modified: 2013-11-18
I have a pretty basic function that sends a text message (Button Click Event) to vehicle using an XML Gateway.  I am using the M/S XML v3.0 VBA Object Reference to do this.  I can build the message and create the XML Document as shown below.  When I post it the response text shows the following error ...

"Server was unable to process request. ---> Data at the root level is invalid. Line 1, position 1."

Here is a sample of the XML Document.

xmlMsg = "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf & _
         "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""" & vbCrLf & _
         "xmlns: xsd = ""http://www.w3.org/2001/XMLSchema""" & vbCrLf & _
         "xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & vbCrLf & _
         "  <soap:Body>" & vbCrLf & _
         "    <SendOutboundMessage xmlns=""https://???????.net/"">" & vbCrLf & _
         "      <AccountID>" & "?????" & "</AccountID>" & vbCrLf & _
         "      <Username>" & "?????" & "</Username>" & vbCrLf & _
         "      <Password>" & "?????" & "</Password>" & vbCrLf & _
         "      <MessageType>" & "??????" & "</MessageType>" & vbCrLf & _
         "      <VehicleName>" & "???????" & "</VehicleName>" & vbCrLf & _
         "      <MessageData>" & strMsgData & "</MessageData>" & vbCrLf & _
         "    </SendOutboundMessage>" & vbCrLf & _
         "  </soap:Body>" & vbCrLf & _
         "</soap:Envelope>"

Thanks,

ET
0
Comment
Question by:Eric Sherman
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
MikeToole earned 500 total points
ID: 21820708
<   "xmlns: xsd = ""http://www.w3.org/2001/XMLSchema""" & vbCrLf & _>

Is the space after the colon legal syntax?
0
 
LVL 30

Expert Comment

by:hnasr
ID: 21820952
Not yet in this field!
0
 
LVL 19

Author Comment

by:Eric Sherman
ID: 21825073
Thanks for the reply Mike ...

Actually there should not be a space there and I corrected that but still got the same error message.  I can write the XML out to a file an open it in IE for which is shows as a properly structured XML file.

Still looking ...

ET
0
 
LVL 27

Expert Comment

by:MikeToole
ID: 21826920
OK, that was my only idea.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question