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 15:00:05 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">
Right. And that &lt;import&gt; needs to reside inside the schema:<br>
<br>
&lt;schema ...&gt;<br>
&nbsp; &lt;import
namespace=<a class="moz-txt-link-rfc2396E"
 href="http://some.other.schema.namespace.inside.the.wsdl">"http://some.other.schema.namespace.inside.the.wsdl"</a>/&gt;<br>
...<br>
&lt;/schema&gt;<br>
<br>
So we'll need equivalent logic for this in both the JAXB &amp; Aegis
modules.<br>
<br>
- Dan<br>
<br>
(Forgot to hit reply all the first time, so sending to the list for
google's sake)<br>
<br>
Benson Margulies wrote:
<blockquote
 cite="mid:E95FD77F0171D14DA1EEE0A785E92B430241A8E0@mail3.basistech.net"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@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";
	color:black;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
pre
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
p.Arial, li.Arial, div.Arial
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:22.0pt;
	font-family:Arial;
	color:black;}
p.arial0, li.arial0, div.arial0
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:22.0pt;
	font-family:Arial;
	color:black;}
span.EmailStyle19
	{mso-style-type:personal;
	font-family:"Times New Roman";
	color:windowtext;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
span.EmailStyle21
	{mso-style-type:personal-reply;
	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 color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt; color: windowtext;">I think
we&#8217;re on the wrong
subject. The issue is some extra element in the WSDL itself that says,
&#8216;import&#8217;
this schema even though it&#8217;s sitting right here. Apparently, we get
this
wrong for both Aegis and JAXB. <o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt; color: windowtext;"><o:p>&nbsp;</o:p></span></font></p>
  <div
 style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color
-moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">
  <div>
  <div class="MsoNormal" style="text-align: center;" align="center"><font
 color="black" face="Times New Roman" size="3"><span
 style="font-size: 12pt; color: windowtext;">
  <hr tabindex="-1" align="center" size="3" width="100%"></span></font></div>
  <p class="MsoNormal"><b><font color="black" face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext; font-weight: bold;">From:</span></font></b><font
 color="black" face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext;"> Dan
Diephouse [<a class="moz-txt-link-freetext" href="mailto:dan.diephouse@mulesource.com">mailto:dan.diephouse@mulesource.com</a>]
<br>
  <b><span style="font-weight: bold;">Sent:</span></b> Wednesday,
October 24, 2007
10:36 AM<br>
  <b><span style="font-weight: bold;">To:</span></b> Benson Margulies<br>
  <b><span style="font-weight: bold;">Cc:</span></b>
<a class="moz-txt-link-abbreviated" href="mailto:cxf-dev@incubator.apache.org">cxf-dev@incubator.apache.org</a><br>
  <b><span style="font-weight: bold;">Subject:</span></b> Re: those
pesky missing
wsdl schema imports</span></font><font color="black"><span
 style="color: windowtext;"><o:p></o:p></span></font></p>
  </div>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;">Benson Margulies wrote: <o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><!--[if gte mso 9]><xml>
 <u1:shapedefaults u2:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <u3:shapelayout u4:ext="edit">
  <u3:idmap u4:ext="edit" data="1"/>
 </u3:shapelayout>
</xml><![endif]-->Dan,
  <u5:p></u5:p><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><u5:p>&nbsp;</u5:p><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" 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.<u5:p></u5:p><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><u5:p>&nbsp;</u5:p><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;">--benson<u5:p></u5:p><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><u5:p>&nbsp;</u5:p><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;">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>
  <br>
  <o:p></o:p></span></font></p>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">-- <o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Dan Diephouse<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">MuleSource<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a moz-do-not-send="true"
 href="http://mulesource.com">http://mulesource.com</a> | <a
 moz-do-not-send="true" href="http://netzooid.com/blog">http://netzooid.com/blog</a><o:p></o:p></span></font></pre>
  </div>
  </div>
</blockquote>
<br>
<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