cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: those pesky missing wsdl schema imports
Date Wed, 24 Oct 2007 14:36:27 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Benson Margulies wrote:
<blockquote
 cite="mid:E95FD77F0171D14DA1EEE0A785E92B430241A8AE@mail3.basistech.net"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
  <style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@SimSun";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.Arial, li.Arial, div.Arial
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:22.0pt;
	font-family:Arial;}
span.EmailStyle18
	{mso-style-type:personal-compose;
	font-family:"Times New Roman";
	color:windowtext;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
  </style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">Dan, <o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">I&#8217;d look at this today if you can give me any
sort of running
start about where they go and what they look like.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;">--benson<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  </div>
</blockquote>
Hi Benson,<br>
<br>
The place I think you want to focus on is
AegisDatabinding.createSchemas. Thats where we create the schema
element:<br>
<br>
Element e = new Element("schema", xsdPrefix, XmlConstants.XSD);<br>
<br>
There is a Set&lt;Type&gt; objects which are in that schema namespace.
You should theoretically be able to loop through their dependencies and
add namespaces:<br>
<br>
for (Type schemaType : entry.getValue()) {<br>
&nbsp; for (Type importedType : schemaType.getDependencies()) {<br>
&nbsp;&nbsp; String ns = importedType.getSchemaType().getNamespaceURI();<br>
&nbsp;&nbsp; if (ns != XSD_NS &amp;&amp; ns != entry.getKey() &amp;&amp;
importHasNotAlreadyBeenAdded) {<br>
&nbsp;&nbsp;&nbsp;&nbsp; Element importEl = new Element("import", xsdPrefix,
XmlConstants.XSD);<br>
&nbsp;&nbsp;&nbsp;&nbsp; importEl.setAttribute(new Attribute("namespace",
ns);<br>
&nbsp;&nbsp;&nbsp;&nbsp; e.addContent(importEl);<br>
&nbsp;&nbsp; }<br>
}<br>
<br>
Hope that helps,<br>
<br>
- Dan<br>
<pre class="moz-signature" cols="72">-- 
Dan Diephouse
MuleSource
<a class="moz-txt-link-freetext" href="http://mulesource.com">http://mulesource.com</a>
| <a class="moz-txt-link-freetext" href="http://netzooid.com/blog">http://netzooid.com/blog</a></pre>
</body>
</html>

Mime
View raw message