Matthew-

It has been my experience that
its because you have non-whitespace characeters before the opening <xml tag
Parser doesnt know how to interpret characters before the opening <xml tag

Martin Gainty

______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.





From: "Matthew Brown" <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: <axis-user@ws.apache.org>
Subject: RE: Content is not allowed in prolog
Date: Wed, 5 Jul 2006 10:00:04 -0400
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by bay0-mc1-f17.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Wed, 5 Jul 2006 06:59:48 -0700
Received: (qmail 41080 invoked by uid 500); 5 Jul 2006 13:59:38 -0000
Received: (qmail 41063 invoked by uid 99); 5 Jul 2006 13:59:38 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2006 06:59:38 -0700
Received: pass (asf.osuosl.org: local policy)
Received: from [12.109.187.23] (HELO outbound1.viecore.com) (12.109.187.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2006 06:59:37 -0700 Received: from prod-vimail-01.private.viecore.com (unknown [10.20.150.24])by outbound1.viecore.com (Spam Firewall) with SMTP id 98B91B852for <axis-user@ws.apache.org>; Wed, 5 Jul 2006 09:59:15 -0400 (EDT)
X-Message-Info: LsUYwwHHNt36YSLS0qGxnzgIsvGWLtXMD2Kln5rIK14=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: <mailto:[EMAIL PROTECTED]>
list-unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:axis-user@ws.apache.org>
List-Id: <axis-user.ws.apache.org>
Delivered-To: mailing list axis-user@ws.apache.org
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
X-Spam-Check-By: apache.org
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Content is not allowed in prolog
Thread-Index: AcaeOeDbMdRSY3UVSfiKBlOEA3n4FgCASBXw
X-Virus-Scanned: by Barracuda Spam Firewall at viecore.com
X-Virus-Checked: Checked by ClamAV on apache.org
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 05 Jul 2006 13:59:48.0973 (UTC) FILETIME=[478019D0:01C6A03B]

Dies,

Thanks for the suggestion, but with Xerces-J 2.8.0 I still seem to be having similiar problems.

The response starts with a FF FE, and here is the stacktrace:

09:58:15,352 [http-8080-Processor24] DEBUG org.apache.axis.utils.NSStack - NSPop (empty)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
faultString: org.xml.sax.SAXParseException: Content is not allowed in prolog.
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.viecore.ipl.ws.generated.IVRWebServicesSoapStub.getAccountInformation(Unknown Source)
        at com.viecore.ipl.rules.ValidateAccount.callWebService(Unknown Source)
        at com.viecore.ipl.ws.AbstractWebServiceRule.executeRule(Unknown Source)
at com.viecore.vxml.service.rules.RulesServiceServlet.executeRule(Unknown Source) at com.viecore.vxml.service.rules.RulesServiceServlet.doPost(Unknown Source) at com.viecore.vxml.service.rules.RulesServiceServlet.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)

        {http://xml.apache.org/axis/}hostname:91007926pu

org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.viecore.ipl.ws.generated.IVRWebServicesSoapStub.getAccountInformation(Unknown Source)
        at com.viecore.ipl.rules.ValidateAccount.callWebService(Unknown Source)
        at com.viecore.ipl.ws.AbstractWebServiceRule.executeRule(Unknown Source)
at com.viecore.vxml.service.rules.RulesServiceServlet.executeRule(Unknown Source) at com.viecore.vxml.service.rules.RulesServiceServlet.doPost(Unknown Source) at com.viecore.vxml.service.rules.RulesServiceServlet.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        ... 40 more




-----Original Message-----
From: Dies Koper [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 02, 2006 8:45 PM
To: axis-user@ws.apache.org
Cc: [EMAIL PROTECTED]
Subject: Re: Content is not allowed in prolog


Hello Derek,

I used Xerces-J 2.7.1 and had no problems with a Unicode Byte Order Mark
(BOM) in my UTF-8 and UTF-16 messages using Axis 1.3.

Can you try reproducing the error message with this parser?

Regards,
Dies


Matthew Brown wrote:
> Thanks Derek. I've etherpeak to capture the raw packets coming across
> and using it's hex editor, have found that they appear to be hex FF
> FE.
>
> I understand from searching and from old posts on this list that
> Xerces will have trouble that starts with this byte-order-mark. Is
> this still the case? If so, can anyone provide the known workaround
> for this?
>
> Thanks again Matt
> -----Original Message----- From: Matthew Brown
> [mailto:[EMAIL PROTECTED] Sent: Friday, June 30, 2006 7:16
> AM To: axis-user@ws.apache.org Subject: RE: Content is not allowed in
> prolog
>
>
> Some followup information..
>
> I've tested using .NET and their wsdl.exe tool to create a client to
> use the customer's web service. The response still looks the same,
> but .NET has zero issues parsing. Could this just be an XML parser
> issue? Can someone point me in the direction of how to
> change/configure the parser, or find out if parsing a message such as
> the one below (with all those extra spaces) is possible?
> -----Original Message----- From: Matthew Brown
> [mailto:[EMAIL PROTECTED] Sent: Friday, June 30, 2006 9:23
> AM To: axis-user@ws.apache.org Subject: RE: Content is not allowed in
> prolog
>
>
> I happen to be having a similar error, although it isn't an endpoint
> issue.
>
> The response we are getting back from the server looks like this:
>
> ??< ? x m l   v e r s i o n = " 1 . 0 "   e n c o d i n g = " u t f -
> 8 " ? > < s o a p : E n v e l o p e   x m l n s : s o a p = " h t t p
> : / / s c h e m a s . x m l s o a p . o r g / s o a p / e n v e l o p
> e / "   x m l n s : x s i = " h t t p : / / w w w . w 3 . o r g / 2 0
> 0 1 / X M L S c h e m a - i n s t a n c e "   x m l n s : x s d = " h
> t t p : / / w w w . w 3 . o r g / 2 0 0 1 / X M L S c h e m a " > < s
> o a p : H e a d e r > < R e s p o n s e H e a d e r   x m l n s = " h
> t t p : / / b l a h . c o m / C A S / " > < H e a d e r s > < / H e a
> d e r s > < / R e s p o n s e H e a d e r > < / s o a p : H e a d e r
> > < s o a p : B o d y > < G e t A c c o u n t I n f o r m a t i o n R
> e s p o n s e   x m l n s = " h t t p : / / b l a h . c o m / C A S /
> " > < A c c o u n t I n f o r m a t i o n R e s p o n s e   x m l n s
> : x s d = " h t t p : / / w w w . w 3 . o r g / 2 0 0 1 / X M L S c h
> e m a "   x m l n s : x s i = " h t t p : / / w w w . w 3 . o r g / 2
> 0 0 1 / X M L S c h e m a - i n s t a n c e "   x m l n s = " h t t p
> : / / b l a h . c o m / C A S / I V R . M e s s a g e D e f i n i t i
> o n s . x s d " >
>
> < N u m b e r O f M a t c h e s > 0 < / N u m b e r O f M a t c h e s
> >
>
> < M o n t h l y E x t e n s i o n A m o u n t > 0 < / M o n t h l y E
> x t e n s i o n A m o u n t >
>
> ....
>
>
> with garbage characters inserted between each legit XML character
> (and two before the prolog).
>
> Is it possible to add a handler to modify the raw response XML before
> Axis passes it off to the XML parser? Does anyone know? Is there some
> other simple setting I might be overlooking that might be causing
> this?
>
> Thanks in advance.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to