Hi Andreas,
Thanks for your response. Below is the complete stack trace. It's a very strange behavior. The SOAP message has the correctly escaped entities. <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Head er xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"></SOAP-ENV:He ader><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode>< faultstring>ParseError at [row,col]:[1,3137] Message: The entity name must immediately follow the '&' in the entity reference.</faultstring><detail><Exception>org.apache.axis2.AxisFault: ParseError at [row,col]:[1,3137] Message: The entity name must immediately follow the '&' in the entity reference. at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage Formatter.java:83) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutp utStream(CommonsHTTPTransportSender.java:330) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTTPTransportSender.java:213) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLo gic(AbstractInOutMessageReceiver.java:43) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessa geReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(St ubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityH elper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2 92) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java: 42) at com.ams.core.webservices.filters.AuthenticationFilter.doFilter(Authentic ationFilter.java:111) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java: 42) at com.ams.core.ui.filters.ClientIPAddressFilter.doFilter(ClientIPAddressFi lter.java:80) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java: 42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r un(WebAppServletContext.java:3496) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu bject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServ letContext.java:2180) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletCont ext.java:2086) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java :1406) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: com.sun.xml.stream.XMLStreamException2: ParseError at [row,col]:[1,3137] Message: The entity name must immediately follow the '&' in the entity reference. at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:574) at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:981) at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S treamingOMSerializer.java:100) at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea mingOMSerializer.java:68) at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea mingOMSerializer.java:57) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS erializerUtil.java:548) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE nvelopeImpl.java:232) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume( OMElementImpl.java:947) at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl. java:471) at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage Formatter.java:79) ... 27 more </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> Thanks Sumit -----Original Message----- From: Andreas Veithen [mailto:andreas.veit...@gmail.com] Sent: Saturday, July 25, 2009 11:27 AM To: axis-dev@ws.apache.org Subject: Re: The entity name must immediately follow the '&' in the entity reference Can you please check the server logs to get the complete stack trace (including the root cause of the exception)? Andreas On Sat, Jul 25, 2009 at 05:52, Sumit Shah<sumit.s...@cgifederal.com> wrote: > Basically this is the stack trace. It seems like the error is thrown by the > Axis2 SOAPMessageFormatter. I do not know if this is a bug in Axis2 or > Xerces? I would appreciate if someone could please confirm it and let me > know if you have any suggestions for a fix. > > FYI..This is in Axis2 1.4 > > Thanks > Sumit > > <soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>ParseEr ror > at [row,col]:[1,3137] > > Message: The entity name must immediately follow the '&' in the entity > reference.</faultstring><detail><Exception>org.apache.axis2.AxisFault: > ParseError at [row,col]:[1,3137] > > Message: The entity name must immediately follow the '&' in the entity > reference. > > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) > > at > org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage Formatter.java:83) > > at > org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutp utStream(CommonsHTTPTransportSender.java:330) > > at > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTTPTransportSender.java:213) > > at > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) > > at > org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLo gic(AbstractInOutMessageReceiver.java:43) > > at > org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessa geReceiver.java:100) > > at > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) > > at > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques t(HTTPTransportUtils.java:275) > > at > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131) > > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > > > -----Original Message----- > From: Sumit Shah [mailto:sumit.s...@cgifederal.com] > Sent: Fri 7/24/2009 7:41 PM > To: axis-dev@ws.apache.org; axis-u...@ws.apache.org > Subject: The entity name must immediately follow the '&' in the entity > reference > > All, > > > > My SOAP envelope generated using AXIS2 contains escaped entities but the > client tools like (SOAP UI, Eclipse, etc.) still fail with the entity error > message: > > > > Message: The entity name must immediately follow the '&' in the entity > reference > > > > Here is a SOAP response snippet where I have the escaped entities: > > > > <ns2:typeOfAgencyTransfer xsi:nil="true"/> > > > <ns2:uniqueIdentity>&3426&3427&1609&SV&MKH177902& ;&0&1</ns2:uniqueIdentity> > > > <ns2:updateAtHigherLevel>false</ns2:updateAtHigherLevel> > > > <ns2:updateExchangeFlag>true</ns2:updateExchangeFlag> > > > > > > I have no clue why this should fail. Does it need to be wrapped in CDATA? > > > > Thanks > > Sumit > > > > > > >