Solved

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

Posted on 2008-06-18
4
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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 the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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