<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
 /* 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;}
span.EmailStyle17
        {font-family:"Trebuchet MS";
        color:navy;
        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>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>Hello,</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>I use SAXBuilder
to parse and add an extra element to an existing WSDL file. I am facing problem
for WSDLs which have &amp;amp; in their namespace declaration. When I use XMLOutputter
to write back the changed WSDL &#8220;&amp;amp;&#8221; gets replaced with &#8220;&amp;&#8221;.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>This happens
only with extra namespaces. That is &#8220;&amp;amp;&#8221; in targetNameSpace
and in rest of the WSDL document remain same, however &#8220;&amp;amp;&#8221;
in other namespace declarations change.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>Here is a simple
code snippet that I use:</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>SAXBuilder builder = new SAX&#8230;;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>Document doc = Builder.build(InputStream);</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>// Add some elements to doc</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>XMLOutputter out = new XMLOut&#8230;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>Out.output(doc, OutputStream);</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>&#8220;tns&#8221;
namespce in &lt;wsdl:definitions&gt; has value <a
href="http://abc.com/?a=b&amp;amp;c=d"><font size=3 color=navy
face="Times New Roman"><span style='font-size:12.0pt;font-family:"Times New Roman";
color:navy;text-decoration:none'>http://abc.com?a=b&amp;amp;c=d</span></font></a>
which gets converted to <a href="http://abc.com/?a=b&amp;c=d"><font size=3
color=navy face="Times New Roman"><span style='font-size:12.0pt;font-family:
"Times New Roman";color:navy;text-decoration:none'>http://abc.com?a=b&amp;c=d</span></font></a>.
This results in invalid WSDL document as &#8220;&amp;&#8221; is a preserved
entity.</span></font></p>

<p class=MsoNormal><font size=2 color="#000040" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:#000040'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color="#000040" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:#000040'>With Regards,</span></font></p>

<p class=MsoNormal><font size=2 color="#000040" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:#000040'>Aniruddha
Deshpande</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>