Eric Sherman
asked on
Using Access VBA with M/S XML 3.0 Object Reference???
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
"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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not yet in this field!
ASKER
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
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
OK, that was my only idea.