Solved

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

Posted on 2008-06-18
4
342 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
Comment Utility
<   "xmlns: xsd = ""http://www.w3.org/2001/XMLSchema""" & vbCrLf & _>

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

Expert Comment

by:hnasr
Comment Utility
Not yet in this field!
0
 
LVL 19

Author Comment

by:Eric Sherman
Comment Utility
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
Comment Utility
OK, that was my only idea.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now