Also, looking at the stack trace do you think its trying to escape the '&' in
the '&' again?
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(StreamingOMSerializer.java:100)
Thanks
Sumit
-----Original Message-----
From: Sumit Shah [mailto:[email protected]]
Sent: Saturday, July 25, 2009 4:31 PM
To: [email protected]
Subject: RE: The entity name must immediately follow the '&' in the entity
reference
Hi Andreas,
The SOAP Message I sent you earlier is the same message that gets to the
SOAPMessageFormatter. I would appreciate if you could take a look at it and let
me know if you think there is some issue with the message itself. I am
guessing that the message is somehow getting altered between the
SOAPMessageFormatter and the org.apache.axiom.om.impl.llom.OMStAXWrapper.next()
call.
I don't know why it's complaining when the SOAP message looks correct when it
gets to the SOAPMessageFormatter.
Thanks
Sumit
-----Original Message-----
From: Andreas Veithen [mailto:[email protected]]
Sent: Saturday, July 25, 2009 3:40 PM
To: [email protected]
Subject: Re: The entity name must immediately follow the '&' in the entity
reference
The exception that you get indicates that Axiom is doing deferred
parsing. This means that even if the exception is thrown inside
SOAPMessageFormatter, it is not a problem inside Axis2 or Axiom, but
most probably in the layer that you have built on top of it. You will
have to debug that code to determine where the character entities are
lost.
Andreas
On Sat, Jul 25, 2009 at 18:58, Sumit Shah<[email protected]> wrote:
>
>
> For brevity:
>
>
>
> We have our own JAXBMessageReceiver that extends the
> org.apache.axis2.rpc.receivers.RPCMessageReceiver. In the
> invokeBusinessLogic() method we invoke the integrating system that sends us
> an XML response that gets converted into a JAVA object for further
> processing. Once the processing is complete we serialize the JAVA object
> using the Code snippet I sent earlier.
>
>
>
> Then the result of the builder.getDocumentElement() gets set on the envelope
>
> where:
>
>
>
> bodyContent = builder.getDocumentElement();
>
>
>
> envelope.getBody().addChild(bodyContent);
>
>
>
> After that we set the envelope on the outMessage in the JAXBMessageReceiver.
>
>
>
> outMessage.setEnvelope(envelope);
>
>
>
> Then I think it would just follow Axis2 message processing.
>
>
>
> Thanks
>
> Sumit
>
>
>
>
>
> Here is the code snippet for that message receiver:
>
>
>
> public class JAXBMessageReceiver extends RPCMessageReceiver {
>
> private static Log log = LogFactory.getLog(JAXBMessageReceiver.class);
>
>
>
>
>
> public void invokeBusinessLogic(MessageContext inMessage, MessageContext
> outMessage) throws AxisFault {
>
> Method method = null;
>
>
>
> try {
>
> // get the implementation class for the Web Service
>
> Object obj = getTheImplementationObject(inMessage);
>
>
>
> Class ImplClass = obj.getClass();
>
>
>
> AxisOperation op =
> inMessage.getOperationContext().getAxisOperation();
>
> method = (Method)(op.getParameterValue("myMethod"));
>
>
>
> AxisService service = inMessage.getAxisService();
>
> OMElement methodElement =
> inMessage.getEnvelope().getBody().getFirstElement();
>
> AxisMessage inAxisMessage =
> op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
>
> String messageNameSpace = null;
>
>
>
> if (method == null) {
>
> String methodName = op.getName().getLocalPart();
>
> Method[] methods = ImplClass.getMethods();
>
>
>
> for (int i = 0; i < methods.length; i++) {
>
> if (methods[i].getName().equals(methodName)) {
>
> method = methods[i];
>
> op.addParameter("myMethod", method);
>
>
>
> break;
>
> }
>
> }
>
>
>
> if (method == null) {
>
> throw new AxisFault("No such method '" + methodName + "'
> in class " + ImplClass.getName());
>
> }
>
> }
>
>
>
> Object resObject = null;
>
>
>
> if (inAxisMessage != null) {
>
> resObject =
> JAXBMessageUtil.invokeServiceClass(inAxisMessage, method, obj,
> messageNameSpace, methodElement, inMessage);
>
> }
>
>
>
> SOAPFactory fac = getSOAPFactory(inMessage);
>
>
>
> // Handling the response
>
> AxisMessage outaxisMessage =
> op.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
>
>
>
> if (outaxisMessage != null && outaxisMessage.getElementQName()
> != null) {
>
> messageNameSpace =
> outaxisMessage.getElementQName().getNamespaceURI();
>
> }
>
> else {
>
> messageNameSpace = service.getTargetNamespace();
>
> }
>
>
>
> OMNamespace ns = fac.createOMNamespace(messageNameSpace,
> service.getSchemaTargetNamespacePrefix());
>
> SOAPEnvelope envelope = fac.getDefaultEnvelope();
>
>
> envelope.declareNamespace(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, new
> NamespaceContext().getPrefix(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI));
>
>
>
> OMElement bodyContent = null;
>
>
>
> if
> (WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(op.getMessageExchangePattern()))
> {
>
> OMElement bodyChild =
> fac.createOMElement(outMessage.getAxisMessage().getName(), ns);
>
> envelope.getBody().addChild(bodyChild);
>
> outMessage.setEnvelope(envelope);
>
>
>
> return;
>
> }
>
>
>
> Parameter generateBare =
> service.getParameter(Java2WSDLConstants.DOC_LIT_BARE_PARAMETER);
>
>
>
> if (generateBare != null &&
> "true".equals(generateBare.getValue())) {
>
> JAXBMessageUtil.processResonseAsDocLitBare(resObject,
> service, method, envelope, fac, ns, bodyContent, outMessage);
>
> }
>
> else {
>
> JAXBMessageUtil.processResponseAsDocLitWrapped(resObject,
> service, method, envelope, fac, ns, bodyContent, outMessage);
>
> }
>
>
>
> outMessage.setEnvelope(envelope);
>
> }
>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Andreas Veithen [mailto:[email protected]]
> Sent: Saturday, July 25, 2009 12:31 PM
> To: [email protected]
> Subject: Re: The entity name must immediately follow the '&' in the entity
> reference
>
>
>
> Can you explain that in more detail? What do you do exactly with the
>
> result of builder.getDocumentElement()?
>
>
>
> Andreas
>
>
>
> On Sat, Jul 25, 2009 at 18:15, Sumit Shah<[email protected]> wrote:
>
>> I forgot to add that this is on the SOAP response. After we create the
>
>> envelope we just hand it over to our message receiver that just relays it
>> to
>
>> Axis2 processing as seen in the stack trace.
>
>>
>
>>
>
>>
>
>> Sumit
>
>>
>
>>
>
>>
>
>> ________________________________
>
>>
>
>> From: Sumit Shah [mailto:[email protected]]
>
>> Sent: Saturday, July 25, 2009 12:04 PM
>
>>
>
>> To: [email protected]
>
>> Subject: RE: The entity name must immediately follow the '&' in the entity
>
>> reference
>
>>
>
>>
>
>>
>
>> We basically construct a JAVA object from this response and then do some
>
>> processing and then serialize it using the following code:
>
>>
>
>>
>
>>
>
>> JAXBContext jaxbContext = ContextFactory.createContext(new Class<?>[]
>
>> {response.getClass()}, properties);
>
>>
>
>> Marshaller m = jaxbContext.createMarshaller();
>
>>
>
>> m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
>
>>
>
>> m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new
>
>> NamespacePrefixMapper());
>
>>
>
>>
>
>>
>
>> ByteArrayOutputStream os = new ByteArrayOutputStream();
>
>>
>
>> XMLStreamWriterWithOS writer = new XMLStreamWriterWithOS(os,
>
>> "utf-8");
>
>>
>
>> writer.setNamespaceContext(new NamespaceContext());
>
>>
>
>> m.marshal(response, writer);
>
>>
>
>>
>
>>
>
>> ByteArrayInputStream bais = new
>
>> ByteArrayInputStream(os.toByteArray());
>
>>
>
>> XMLStreamReader reader = StAXUtils.createXMLStreamReader(bais,
>
>> "utf-8");
>
>>
>
>> StAXOMBuilder builder = new StAXOMBuilder(reader);
>
>>
>
>>
>
>>
>
>> return builder.getDocumentElement();
>
>>
>
>>
>
>>
>
>> We then just set the 'builder.getDocumentElement()' as the envelope's body
>
>> using : envelope.getBody().addChild(bodyContent); where bodyContent is the
>
>> returned 'builder.getDocumentElement()'.
>
>>
>
>>
>
>>
>
>> Is there something wrong in the way are serializing it?
>
>>
>
>>
>
>>
>
>> Sumit
>
>>
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Sumit Shah [mailto:[email protected]]
>
>> Sent: Saturday, July 25, 2009 11:58 AM
>
>> To: [email protected]
>
>> Subject: RE: The entity name must immediately follow the '&' in the entity
>
>> reference
>
>>
>
>>
>
>>
>
>> I get it as an XML response from another integrating system. The response
>
>> from that system looks something like this:
>
>>
>
>>
>
>>
>
>> <select editMode="Select" withChildren="TRUE">
>
>>
>
>> <identity class="AcctgStripTemplate">
>
>>
>
>> <aspect name="uniqueIdentity"><![CDATA[&1280&CP_1]]></aspect>
>
>>
>
>> </identity>
>
>>
>
>> </select>
>
>>
>
>>
>
>>
>
>> Do you know what might be causing this failure?
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> Thanks
>
>>
>
>> Sumit
>
>>
>
>>
>
>>
>
>> -----Original Message-----
>
>>
>
>> From: Andreas Veithen [mailto:[email protected]]
>
>>
>
>> Sent: Saturday, July 25, 2009 11:53 AM
>
>>
>
>> To: [email protected]
>
>>
>
>> Subject: Re: The entity name must immediately follow the '&' in the entity
>
>> reference
>
>>
>
>>
>
>>
>
>> How do you build the uniqueIdentity element?
>
>>
>
>>
>
>>
>
>> Andreas
>
>>
>
>>
>
>>
>
>> On Sat, Jul 25, 2009 at 17:48, Sumit Shah<[email protected]>
>> wrote:
>
>>
>
>>> 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:Header
>
>>
>
>>>
>
>>>
>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"></SOAP-ENV:Header><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(SOAPMessageFormatter.java:83)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:330)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:213)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(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(StubSecurityHelper.java:227)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
>
>>
>
>>>
>
>>
>
>>> 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(AuthenticationFilter.java:111)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> com.ams.core.ui.filters.ClientIPAddressFilter.doFilter(ClientIPAddressFilter.java:80)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>
>>
>
>>>
>
>>
>
>>> at
>>> weblogic.security.service.SecurityManager.runAs(Unknown
>
>>
>
>>> Source)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.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(StreamingOMSerializer.java:100)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:68)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:57)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:548)
>
>>
>
>>>
>
>>
>
>>> at
>
>>
>
>>>
>
>>>
>>> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.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(SOAPMessageFormatter.java:79)
>
>>
>
>>>
>
>>
>
>>> ... 27 more
>
>>
>
>>>
>
>>
>
>>> </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Thanks
>
>>
>
>>>
>
>>
>
>>> Sumit
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> -----Original Message-----
>
>>
>
>>> From: Andreas Veithen [mailto:[email protected]]
>
>>
>
>>> Sent: Saturday, July 25, 2009 11:27 AM
>
>>
>
>>> To: [email protected]
>
>>
>
>>> 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<[email protected]>
>
>>> 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>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(SOAPMessageFormatter.java:83)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>>
>
>>>>
>>>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:330)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>>
>
>>>>
>>>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:213)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>>
>
>>>>
>>>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>>
>
>>>>
>>>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> at
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>>
>
>>>>
>>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(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:[email protected]]
>
>>
>
>>>
>
>>
>
>>>> Sent: Fri 7/24/2009 7:41 PM
>
>>
>
>>>
>
>>
>
>>>> To: [email protected]; [email protected]
>
>>
>
>>>
>
>>
>
>>>> 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
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>