• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

exception from OLB Service:org.xml.sax.SAXParseException: Content is not allowed in prolog.

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Am trying to hit the service which has been generated using apache cxf 3.0, I have generated the client using axis2 wsdl2java and whenever I tried to hit the service am getting as "exception from OLB Service:org.xml.sax.SAXParseException: Content is not allowed in prolog."

Not sure about the cause of the issue. We have made interceptors on the server side to verify whether there is any special characters associated, but there are no such characters from provider.

I would be glad if I get a help.

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That normally means there are characters before the start of the XML document. Even whitespace is illegal there (and that's the most likely thing for you to generate accidentally). Your document should start with a < character; whether that's the first character of the prolog or the first character of the root element's start tag, it doesn't matter.
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have parsed my response in local and tested (please note I have done the server part too). I didn't receive any exception.

Response XML is fine in the server end. But in the client side they are receiving the exception
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exactly how are you transmitting the XML document from the server to the client?

As Paul said it is very likely you are accidentally creating leading characters.

Bill
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Huh, might be, but not sure, as we have developed and deployed the service in play framework, the request flows in through a play server and routes file is the one acts as an interface between all the request and response, am not sure whether it get transformed over there, as am new to play network.

Also for your information I have the logged the request and response which flows in and did a parser too, where I didn't face any issue.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea what "play framework" is or does so my only other suggestion is that instead of the expected XML document, your client is getting an error message formatted in HTML from the server because of addressing problems. This happened to me once - very confusing.

Are you confirming that the request is getting to the right place in the server every time?

Bill
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it is confirmed, all the request are getting flowed into server, which is my local desktop and we don't have any other place where the code has been deployed.

It is weird for me too.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic