I think we're on the wrong subject. The issue is some extra element in the WSDL itself that says, 'import' this schema even though it's sitting right here. Apparently, we get this wrong for both Aegis and JAXB.
________________________________ From: Dan Diephouse [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 24, 2007 10:36 AM To: Benson Margulies Cc: [email protected] Subject: Re: those pesky missing wsdl schema imports Benson Margulies wrote: Dan, I'd look at this today if you can give me any sort of running start about where they go and what they look like. --benson Hi Benson, The place I think you want to focus on is AegisDatabinding.createSchemas. Thats where we create the schema element: Element e = new Element("schema", xsdPrefix, XmlConstants.XSD); There is a Set<Type> objects which are in that schema namespace. You should theoretically be able to loop through their dependencies and add namespaces: for (Type schemaType : entry.getValue()) { for (Type importedType : schemaType.getDependencies()) { String ns = importedType.getSchemaType().getNamespaceURI(); if (ns != XSD_NS && ns != entry.getKey() && importHasNotAlreadyBeenAdded) { Element importEl = new Element("import", xsdPrefix, XmlConstants.XSD); importEl.setAttribute(new Attribute("namespace", ns); e.addContent(importEl); } } Hope that helps, - Dan -- Dan Diephouse MuleSource http://mulesource.com | http://netzooid.com/blog
