03-19-2015 03:53 PM
I am sending the following xml message to https://mywebsite.webex.com/WBXService/XMLService
<?xml version="1.0" encoding="UTF-8"?>
<serv:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header>
<securityContext>
<webExID>myuserid</webExID>
<password>mypassword</password>
<siteID>mysite</siteID>
<partnerID>mypartnerid</partnerID>
<email>myemail</email>
</securityContext>
</header>
<body>
<bodyContent xsi:type="java:com.webex.service.binding.meeting.LstsummaryMeeting">
<listControl>
<startFrom>1</startFrom>
<maximumNum>10</maximumNum>
<listMethod>OR</listMethod>
</listControl>
<order>
<orderBy>CONFNAME</orderBy>
<orderAD>ASC</orderAD>
<orderBy>STARTTIME</orderBy>
<orderAD>ASC</orderAD>
</order>
</bodyContent>
</body>
</serv:message>
I get the following response.
<serv:message xmlns:serv=http://www.webex.com/schemas/2002/06/service xmlns:com=http://www.webex.com/schemas/2002/06/common><serv:header><serv:response><serv:result>FAILURE</serv:result>
<serv:reason>validation: Parsing Error : Content is not allowed in prolog.
Line : 1
Column : 1
</serv:reason>
<serv:gsbStatus>PRIMARY</serv:gsbStatus>
<serv:exceptionID>999999</serv:exceptionID>
</serv:response>
</serv:header>
<serv:body><serv:bodyContent></serv:body>
</serv:message>
This must be a rookie mistake. Can you help?
Thanks
03-23-2015 08:58 AM
That error is almost always due to whitespace or otherwise 'invisible' characters at the very top of the XML document, i.e. prior to the 'prologue' <?xml version="1.0" encoding="UTF-8"?>
If there is not an obvious space or blank line before the prologue, then the other common problem can be due to an invisible 'byte order mark' (BOM) Byte order mark - Wikipedia, the free encyclopedia
at the beginning of the XML portion. This can occur if you've saved the XML in a windows app like Notepad.
java - How to make notepad to save text in utf-8 without bom? - Stack Overflow
03-24-2015 10:53 AM
Thanks much. I had read that before but did not believe it applied to me
since I was not using Notepad to generate the string.
I was building the xml string in the code. Anyway I finally replace that
method with the proper XmlTextWriter class and that solved my issue.
Thanks again for your help.
Jean Laforest
Pronex, Inc.
jeanlaforest@pronexinc.com
(972) 375-1941
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide