On 10/1/07, Raymond Feng <[EMAIL PROTECTED]> wrote: > > Hi, > > I was about to send a note to explain the changes. :-) > > It's actually one step to fix the problem reported in TUSCANY-1814. One of > the findings is that WSDL4J agressively load inline schemas and follow the > import/include directives into DOM and Schema extension. As a consequence, > it consumes a lot memory is the XSDs are big. No code consumes the WSDL4J > Schema and we'll load the schema again using Apache XmlSchema. In the > changes, I disable the WSDL Schema extension deserialization by replacing > the Schema extension deserializer with UnknowExtensibilityElement > deserializer. > > I don't know why the full build doesn't catch the ?wsdl issue. Let me take > a > look and I think the fix might be as simple as disabling the Schema > extension serializer. > > Thanks, > Raymond > > ----- Original Message ----- > From: "Simon Laws" <[EMAIL PROTECTED]> > To: "tuscany-dev" <[email protected]> > Sent: Monday, October 01, 2007 1:49 AM > Subject: Re: WS Binding ?WSDL problem > > > > On 10/1/07, Simon Laws <[EMAIL PROTECTED]> wrote: > >> > >> With the latest trunk I'm getting the following from > >> > \binding-ws-axis2\src\test\java\org\apache\tuscany\sca\binding\ws\axis2\itests\QuestionMarkWSDLTestCase.java > >> > >> HTTP ERROR: 500 > >> > >> javax.wsdl.extensions.UnknownExtensibilityElement > >> > >> incompatible with javax.wsdl.extensions.schema.Schema > >> > >> RequestURI=/services/HelloWorldWebService > >> Caused by: > >> > >> java.lang.ClassCastException: > >> javax.wsdl.extensions.UnknownExtensibilityElement incompatible with > >> javax.wsdl.extensions.schema.Schema > >> at com.ibm.wsdl.extensions.schema.SchemaSerializer.marshall > >> > >> (Unknown Source) > >> at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown > >> Source) > >> at com.ibm.wsdl.xml.WSDLWriterImpl.printTypes(Unknown Source) > >> at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition > >> (Unknown Source) > >> > >> at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source) > >> at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source) > >> at org.apache.axis2.description.AxisService.printDefinitionObject( > >> AxisService.java:920) > >> > >> at > >> org.apache.axis2.description.AxisService.printUserWSDL(AxisService.java > :934) > >> at > >> org.apache.axis2.description.AxisService.printWSDL(AxisService.java > :1056) > >> at > >> > org.apache.tuscany.sca.binding.ws.axis2.TuscanyListingAgent.processListService > >> > >> (TuscanyListingAgent.java:140) > >> at > >> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.doGet( > Axis2ServiceServlet.java:255) > >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) > >> at javax.servlet.http.HttpServlet.service > >> > >> (HttpServlet.java:820) > >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java > :487) > >> at > >> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java > :367) > >> at org.mortbay.jetty.servlet.SessionHandler.handle > >> > >> (SessionHandler.java:181) > >> at > >> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java > :712) > >> at > >> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java > :139) > >> at org.mortbay.jetty.Server.handle > >> > >> (Server.java:285) > >> at > >> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) > >> at > >> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete( > HttpConnection.java:821) > >> at org.mortbay.jetty.HttpParser.parseNext > >> > >> (HttpParser.java:513) > >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208) > >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378) > >> at org.mortbay.io.nio.SelectChannelEndPoint.run > >> (SelectChannelEndPoint.java > >> :368) > >> at org.apache.tuscany.sca.core.work.Jsr237Work.run(Jsr237Work.java:61) > >> at > >> > org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.run( > ThreadPoolWorkManager.java:205) > >> > >> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask > >> (ThreadPoolExecutor.java:665) > >> at > >> java.util.concurrent.ThreadPoolExecutor$Worker.run( > ThreadPoolExecutor.java:690) > >> at java.lang.Thread.run(Thread.java > >> :801) > >> > >> *Powered by Jetty:// <http://jetty.mortbay.org/>* > >> > >> I've made some changes locally in binding-ws-axis2 although nothing to > do > >> with reading wsdl so am trying to work out if this is to do with my > >> changes > >> or not. Anyone else seeing it? > >> > >> Simon > >> > > > > It seems to be related to the memory optimization changes that went in > > with > > r580611. If I re-enable the schema extension for WSDL4J then the problem > > goes away. > > > > public WSDLModelResolver(Contribution contribution, > > ModelFactoryExtensionPoint modelFactories) { > > this.contribution = contribution; > > > > this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class); > > this.wsdl4jFactory = modelFactories.getFactory( > > javax.wsdl.factory.WSDLFactory.class); > > this.contributionFactory = modelFactories.getFactory ( > > ContributionFactory.class); > > > > wsdlExtensionRegistry = > > this.wsdl4jFactory.newPopulatedExtensionRegistry(); > > // REVIEW: [rfeng] Disable the schema extension for WSDL4J to > avoid > > aggressive loading > > /* > > ExtensionDeserializer deserializer = new > > UnknownExtensionDeserializer(); > > for (QName schema : XSD_QNAME_LIST) { > > wsdlExtensionRegistry.registerDeserializer(Types.class, > schema, > > deserializer); > > } > > */ > > } > > > > There seems to be quite a lot of changes for this fix. Raymond, could > you > > give us a quick run through of what the changes do? > > > > Regards > > > > Simon > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Raymond
Thanks for the explanation and thanks for the 1821 fix. Simon
