As part of the promotion of the Axis project to a top level project, we have decided to create separate mailing lists for Axis 1 and Axis2. For all Axis 1 related questions please subscribe and post to [email protected]. Thanks!
Andreas On Thu, Sep 23, 2010 at 10:05, ebret <[email protected]> wrote: > > Hi, > > In my project we use a custom AxisLogHandler (extends BasicHandler) that > logs request and response. > > Sometime a WebService call from a client throws a exception (No deserializer > ). This exception is catched by a RemoteException catch clause on the > client. I think the exception is thrown by the loghandler. > > BUT > I dont understand why the AxisFault (that is a IOException) is not catch by > the catch(IOException) clause of my LogHandler > > > > Here the stacktrace > 20100922-13:52:55 3 ITRDIA pcyy7aql > com.edf.sis.services.facade.ServiceFacadeCMDE.getConseilsMDE(ServiceFacadeCMDE.java:240) > 1.5.20 Impossible d'appeler le Conseil MDE : > AxisFault > faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException > faultSubcode: > faultString: org.xml.sax.SAXException: No deserializer for > {types.client_mde}Information_client > faultActor: > faultNode: > faultDetail: > {http://xml.apache.org/axis/}hostname:pcyy7aql > > org.xml.sax.SAXException: No deserializer for > {types.client_mde}Information_client > at > org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) > at > org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) > at > org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) > at > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) > at > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) > at > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) > at > weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133) > at > weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:153) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) > at > org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) > at org.apache.axis.SOAPPart.getEnvelope(SOAPPart.java:1003) > at org.apache.axis.Message.getSOAPBody(Message.java:555) > at > com.edf.sis.facade.handlers.AxisLogHandler.log(AxisLogHandler.java:63) > at > com.edf.sis.facade.handlers.AxisLogHandler.invoke(AxisLogHandler.java:42) > at > org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) > at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) > at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) > at org.apache.axis.client.AxisClient.invoke(AxisClient.java:190) > 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.edf.sis.webservices.cmde.Ws_client_mdeSoapBindingStub.getConseilsMDE(Ws_client_mdeSoapBindingStub.java:477) > at > com.edf.sis.facade.control.ClientMDEServiceControl.getConseilsMDE(ClientMDEServiceControl.java:104) > at > com.edf.sis.services.facade.ServiceFacadeCMDE.getConseilsMDE(ServiceFacadeCMDE.java:237) > at > com.edf.sis.ws.facade.cmde.impl.WebserviceFacadeCMDEImpl.getConseils(WebserviceFacadeCMDEImpl.java:325) > at sun.reflect.GeneratedMethodAccessor424.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at weblogic.wsee.jaxws.WLSInvoker.invoke(WLSInvoker.java:50) > at weblogic.wsee.jaxws.WLSInvoker.invoke(WLSInvoker.java:42) > at > com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:247) > at > com.sun.xml.ws.server.sei.SEIInvokerPipe.process(SEIInvokerPipe.java:97) > at weblogic.wsee.jaxws.MonitoringPipe.process(MonitoringPipe.java:98) > at > com.sun.xml.ws.protocol.soap.ServerMUPipe.process(ServerMUPipe.java:62) > at > com.sun.xml.ws.server.WSEndpointImpl$1.process(WSEndpointImpl.java:139) > at > com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:153) > at > com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:235) > at > com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97) > at > weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:36) > at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:218) > 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:226) > at > weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) > at > weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) > at > weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) > at > weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(Unknown > Source) > at > weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) > at weblogic.security.service.SecurityManager.runAs(Unknown Source) > at > weblogic.servlet.internal.WebAppServletContext.securedExecute(Unknown > Source) > at weblogic.servlet.internal.WebAppServletContext.execute(Unknown > Source) > at > weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) > at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) > at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) > > > > The catch clause: > try { > // Appel de getConseilsMDE > vRetour = facadeCMDE.getConseilsMDE(pNbConseils, vInfoClientTab, > pDateLivraison, pConseils); > } catch (RemoteException eRemoteException) { > // Si le conseiller MDE ne répond pas, on log le flux en KO et on rethrow > l'exception > mLogger.error("Impossible d'appeler le Conseil MDE : " , > eRemoteException); > mServiceTracabilite.saveFlux(new > FluxDTO(Constantes.CD_FLUX_WS_CMDE_GET_CONSEIL, > 0, new > Date(), Constantes.KO, 1, > "Impossible > d'appeler le Conseil > MDE.")); > throw eRemoteException; > } > > Here the code of the AxisLogHandler > public void invoke(MessageContext pMessageContext) throws AxisFault { > this.log(pMessageContext); > } > > /** > * Gestion des logs. > * > * @param pMessageContext > * Message entrant ou sortant > */ > private void log(MessageContext pMessageContext) { > boolean vSens = > !Message.RESPONSE.equals(pMessageContext.getCurrentMessage().getMessageType()); > StringBuilder vStringBuffer = null; > ByteArrayOutputStream vBaos = null; > try { > vBaos = new ByteArrayOutputStream(); > pMessageContext.getMessage().writeTo(vBaos); > // Formatage du message XML > vStringBuffer = new StringBuilder(vBaos.toString().length()); > > vStringBuffer.append(XMLUtils.getInstance().format(vBaos.toString().trim())); > > // Récupération du namespace > SOAPBody vBody = pMessageContext.getMessage().getSOAPBody(); > //<= Here we get EXCEPTION > String vNameSpace = vBody.getFirstChild().getNamespaceURI(); > > // Déduction du logger > String vCategory = vNameSpace; > vCategory = > vCategory.replace("urn:uSimFastServiceIntf-ISimFastService", > "com.edf.axis.CDC"); > vCategory = > vCategory.replace("http://services.conseils_mde.edf_retd.com", > "com.edf.axis.CMDE"); > Logger vLogger = LoggerFactory.getLogger(vCategory); > // Log du message XML formaté > if (vLogger.isInfoEnabled()) { > vLogger.info(getLogMessage(vSens, vStringBuffer, null)); > } > > } catch (SOAPException pSOAPException) { > LOGGER.error("Soap LogHandler : Echec de lecture du message !", > pSOAPException); > LOGGER_ERROR.info(getLogMessage(vSens, vStringBuffer, "Echec de > lecture du message ")); > > } catch (IOException pIOException) { > LOGGER.error("Soap LogHandler : Echec de lecture du message !", > pIOException); > LOGGER_ERROR.info(getLogMessage(vSens, vStringBuffer, "Echec de > lecture du message ")); > } finally { > if (vBaos != null) { > try { > vBaos.close(); > } catch (IOException pIOException) { > LOGGER.error("Soap LogHandler : Echec lors de la > fermeture du ByteArrayOutputStream", pIOException); > } > } > } > } > > Thanks for you help... > -- > View this message in context: > http://old.nabble.com/Weird-SAXException---AxisFault-stacktrace-tp29786925p29786925.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]
