cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: those pesky missing wsdl schema imports
Date Wed, 24 Oct 2007 14:39:49 GMT
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:dan.diephouse@mulesource.com] 
Sent: Wednesday, October 24, 2007 10:36 AM
To: Benson Margulies
Cc: cxf-dev@incubator.apache.org
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message