Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The viewer will learn how to count occurrences of each item in an array.

920 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

16 Experts available now in Live!

Get 1:1 Help Now