How do you transform this response and how do you add it to the SOAP
response sent by Axis2?

Andreas

On Sat, Jul 25, 2009 at 17:58, Sumit Shah<[email protected]> wrote:
> 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[&amp;1280&amp;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 '&amp;' 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 '&amp;' 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 '&amp;' 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 '&amp;' 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 '&amp;' 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>&amp;3426&amp;3427&amp;1609&amp;SV&amp;MKH177902&amp;&amp;0&amp;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
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>

Reply via email to