Solved

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

Posted on 2008-06-18
4
346 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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