We help IT Professionals succeed at work.

New podcast episode! Our very own Community Manager, Rob Jurd, gives his insight on the value of an online community. Listen Now!

x

ASP AND XML

Overthere
Overthere asked
on
175 Views
Last Modified: 2017-03-30
I have a block of coding that is killing me. I am sending an XML document to a website.  From the error message I receive, it is because my xml is not well-formed when validated at w3. I can not spot the coding error. And what really gets me is that in line 1  there isn't a character at position 152 ? I have displayed the offending line, all of the coding and a snapshot of what I receive using IE Developers tool.
I have coded it exactly as specified from the receiving site documentation.
It appears the xml version is not formed correctly - I don't know what it is...any help appreciated. I have messed with this for hours - LOL


<?xml version=" & vdblqoutes & "1.0" & vdblqoutes &  " encoding=" & vdblqoutes & "utf-8" & vdblqoutes & "?>"

Open in new window

And the entire coding:
vdblqoutes = chr(34)
  
   '// URL to which to send XML data
    url = "http://ws.mysite.com/test/myGateway.asmx"


	xmlmsg = ""
    xmlmsg = "<?xml version=" & vdblqoutes & "1.0" & vdblqoutes &  " encoding=" & vdblqoutes & "utf-8" & vdblqoutes & "?>" & VbCrLf_
    xmlmsg = xmlmsg & "<soap:Envelope xmlns:xsi=" & vdblqoutes & "http://www.w3.org/2001/XMLSchema-instance" & vdblqoutes & " xmlns:xsd=" & vdblqoutes &                  "http://www.w3.org/2001/XMLSchema" & vdblqoutes & VbCrLf_ 
    xmlmsg = xmlmsg & "<soap:Header>" & VbCrLf_ 
    xmlmsg = xmlmsg & "<GatewaySoapAuthentication xmlns=" & vdblqoutes & "http://ws.mysite.com/" & vdblqoutes & ">" & VbCrLf_ 
    xmlmsg = xmlmsg & "<Username>MARTHA</Username>" & VbCrLf_
    xmlmsg =  xmlmsg & "<Password>DOGS</Password>" & VbCrLf_ 
    xmlmsg = xmlmsg & "</GatewaySoapAuthentication>" & VbCrLf_
    xmlmsg = xmlmsg & "</soap:Header>" & VbCrLf_ 
    xmlmsg = xmlmsg & "<soap:Body>" & VbCrLf_ 
    xmlmsg = xmlmsg & "<GetBookingDetails xmlns=" & vdblqoutes & "http://ws.mysite.com/" & vdblqoutes & ">" & VbCrLf_ 
    xmlmsg = xmlmsg & "<BookingDetailsRequest>" & VbCrLf_ 
    xmlmsg = xmlmsg & "<BookingNumber>2134</BookingNumber>" & VbCrLf_ 
    xmlmsg = xmlmsg & "</BookingDetailsRequest>" & VbCrLf_ 
    xmlmsg = xmlmsg & "</GetBookingDetails>" & VbCrLf_ 
    xmlmsg = xmlmsg & "</soap:Body>" & VbCrLf_
    xmlmsg = xmlmsg & "</soap:Envelope>"

Open in new window

XML-ERROR.JPG
Comment
Watch Question

Patrick BogersDatacenter platform engineer Lindows
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thank you both for responding - I must have stared a 100 times looking for what I missed in the construction of the xml document...thank you ever so much...
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.