Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 30033 invoked from network); 8 Jun 2009 14:32:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jun 2009 14:32:48 -0000 Received: (qmail 54567 invoked by uid 500); 8 Jun 2009 14:32:59 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 54482 invoked by uid 500); 8 Jun 2009 14:32:59 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 54472 invoked by uid 99); 8 Jun 2009 14:32:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2009 14:32:59 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [66.207.172.168] (HELO server.dankulp.com) (66.207.172.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2009 14:32:49 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id A6ADC50704DE; Mon, 8 Jun 2009 10:32:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.1-gr1 (2007-05-02) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter.o8VWgQCHUH Received: from dilbert.localnet (c-24-91-141-225.hsd1.ma.comcast.net [24.91.141.225]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 73B3D50704D9; Mon, 8 Jun 2009 10:32:26 -0400 (EDT) From: Daniel Kulp To: dev@cxf.apache.org Subject: Re: Aegis schema validation design challenge Date: Mon, 8 Jun 2009 10:32:26 -0400 User-Agent: KMail/1.11.4 (Linux/2.6.29-gentoo; KDE/4.2.4; x86_64; ; ) Cc: Benson Margulies , Tatu Saloranta References: <61b5d9410906011844v12093b06vd5b4b51e4d2babf9@mail.gmail.com> <200906042105.27093.dkulp@apache.org> <61b5d9410906051814wd458979y62b125caf4adf057@mail.gmail.com> In-Reply-To: <61b5d9410906051814wd458979y62b125caf4adf057@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906081032.26622.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-3.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=unavailable version=3.2.1-gr1 There are really two ways to handle it: 1) When you set the schema into the wstx StreamReader, then wrapper it with a new stream reader delegate that would override the "next" method to catch it and map it to a fault. 2) Add an interceptor to the FaultOut chain that would check the class of the exception and if it's the wstx validation exception, do whatever mapping is needed. Dan On Fri June 5 2009 9:14:53 pm Benson Margulies wrote: > Next question: Exception mapping. Woodstox throws what it throws, in > the middle of StaxUtils, when this goes off. > > I'm trying to figure out how to turn this into a fault. > > SchemaValidationTest [JUnit] > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at localhost:52320 > Thread [main] (Running) > Thread [ReaderThread] (Running) > Thread [Thread-1] (Suspended (exception WstxValidationException)) > ValidatingStreamReader(StreamScanner).reportValidationProblem(XMLValidat >ionProblem) line: 540 > NsInputElementStack(InputElementStack).reportProblem(XMLValidationProble >m) line: 380 > GenericMsvValidator.reportError(String, Location) line: 521 > GenericMsvValidator.reportError(String) line: 513 > GenericMsvValidator.reportError(StringRef) line: 507 > GenericMsvValidator.validateElementStart(String, String, String) line: > 261 NsInputElementStack.resolveAndValidateElement() line: 370 > ValidatingStreamReader(BasicStreamReader).handleStartElem(char) line: > 2926 ValidatingStreamReader(BasicStreamReader).nextFromTree() line: 2786 > ValidatingStreamReader(BasicStreamReader).next() line: 1054 > DepthXMLStreamReader.next() line: 220 > StaxUtils.toNextElement(DepthXMLStreamReader) line: 302 > DocLiteralInInterceptor.getPara(DepthXMLStreamReader, > DataReader, MessageContentsList, > Iterator, Message) line: 217 > DocLiteralInInterceptor.handleMessage(Message) line: 117 > PhaseInterceptorChain.doIntercept(Message) line: 236 > ChainInitiationObserver.onMessage(Message) line: 89 > LocalConduit$1$1.run() line: 132 > Thread.run() line: 613 > /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java > (Jun 5, 2009 9:13:03 PM) -- Daniel Kulp dkulp@apache.org http://www.dankulp.com/blog