axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yunxi Zhang <zhangyx...@hotmail.com>
Subject RE: org.apache.axis2.AxisFault: org.apache.axiom.om.impl.llom.OMTextImpl cannot be cast to org.apache.axiom.om.OMElement
Date Fri, 22 Jul 2011 13:44:14 GMT

Hi, Andreas,
How can provide you the server side stack trace?
In my service implementation, i used Exception.printStackTrace to catch the exception to print
out error messages, and these error messages are actually printed out from the server side.
Regards,
Yunxi

> From: andreas.veithen@gmail.com
> Date: Fri, 22 Jul 2011 09:55:03 +0200
> Subject: Re: org.apache.axis2.AxisFault: org.apache.axiom.om.impl.llom.OMTextImpl cannot
be cast to org.apache.axiom.om.OMElement
> To: java-dev@axis.apache.org
> 
> The exception is from the client side but indicates that the actual
> error is occurring on the server side. We would need the server side
> stack trace to see what is going on here.
> 
> Andreas
> 
> On Thu, Jul 21, 2011 at 19:13, Yunxi Zhang <zhangyx395@hotmail.com> wrote:
> > Hi, guys,
> > I've tried parsing an XML file to OMElement structure to be embedded into
> > other OMElement element. The codes I used to do the parse  are listed below:
> > public OMElement parseXMLToOMElement(String sourceFile) throws
> > FileNotFoundException,XMLStreamException{
> > File file=new File(sourceFile);
> > OMElement element=null;
> > FileInputStream fis=new FileInputStream(file);
> > XMLInputFactory xif=XMLInputFactory.newInstance();
> > XMLStreamReader reader=xif.createXMLStreamReader(fis);
> > StAXOMBuilder builder=new StAXOMBuilder(reader);
> > element=builder.getDocumentElement();
> > return element;
> >
> > }
> > However, When sending the parsed messages to the target service, I got the
> > error messages there as follows:
> > org.apache.axis2.AxisFault: org.apache.axiom.om.impl.llom.OMTextImpl cannot
> > be cast to org.apache.axiom.om.OMElement
> > at
> > org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
> > at
> > org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOutOnlyOperationClient.handleResponse(RobustOutOnlyAxisOperation.java:91)
> > at
> > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
> > at
> > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> > at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> > at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:475)
> > at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:456)
> > at
> > portalB.ReceivingRequestForSharedResources.decisionMaking(ReceivingRequestForSharedResources.java:442)
> > at
> > portalB.ReceivingRequestForSharedResources.receivingSOAPMessage(ReceivingRequestForSharedResources.java:359)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> > org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLogic(RawXMLINOnlyMessageReceiver.java:90)
> > at
> > org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
> > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
> > at
> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> > at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> > at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550)
> > at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
> > at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
> > at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
> > at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
> > at
> > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:680)
> >
> > Has anyone got any idea about it? Thank you!
> > Best regards,
> > Yunxi
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
> 
 		 	   		  
Mime
View raw message