<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: How do I upgrade web service using WSDL with multiple schema namespaces?
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/kdolan1">Kelly Dolan</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/737499#737499">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Ok, I found some help elsewhere, got something to work so I'm posting my solution for anyone else who might run into the same issue and confusion.</p><p>&#160; </p><p>My solution was not to split the WSDL but to split THE SCHEMA defined in the WSDL.&#160; So instead of having...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>&lt;definitions targetNamespace="</span><a class="jive-link-external-small" href="http://my.company.com" target="_blank">http://my.company.com</a><span>" ...&gt;</span></p><p>&lt;types&gt;</p><p><span>&#160;&#160;&#160; &lt;schema targetNamespace="</span><a class="jive-link-external-small" href="http://my.company.com/types" target="_blank">http://my.company.com/types</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; elementFormDefault="qualified"&gt;</p><p>&#160;&#160;&#160; ...</p><p>&#160;&#160;&#160; // define some simple and complex types in here</p><p>&#160;&#160;&#160; ...</p><p>&#160;&#160;&#160; &lt;/schema&gt;</p><p><span>&#160;&#160;&#160; &lt;schema targetNamespace="</span><a class="jive-link-external-small" href="http://my.company.com/operations" target="_blank">http://my.company.com/operations</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; elementFormDefault="qualified"&gt;</p><p>&#160;&#160;&#160; ...</p><p>&#160;&#160;&#160; // define some simple and complex types in here</p><p>&#160;&#160;&#160; ...</p><p>&#160;&#160;&#160; &lt;/schema&gt;</p><p>&lt;/types&gt;</p><p>...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>...I now have...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>// my wsdl file</p><p><span>&lt;definitions targetNamespace="</span><a class="jive-link-external-small" href="http://my.company.com" target="_blank">http://my.company.com</a><span>" ...&gt;</span></p><p>&lt;types&gt;</p><p><span>&#160;&#160;&#160; &lt;schema targetNamespace="</span><a class="jive-link-external-small" href="http://my.company.com" target="_blank">http://my.company.com</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; elementFormDefault="qualified"&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;import namespace="</span><a class="jive-link-external-small" href="http://my.company.com/types" target="_blank">http://my.company.com/types</a><span>" schemaLocation="types.xsd"&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;import namespace="</span><a class="jive-link-external-small" href="http://my.company.com/operations" target="_blank">http://my.company.com/operations</a><span>" schemaLocation="operations.xsd"&gt;</span></p><p>&#160;&#160;&#160; &lt;/schema&gt;</p><p>&lt;/types&gt;</p><p>...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>// operations.xsd (whose types are dependent on types.xsd)</p><p><span>&lt;schema targetNamespace="</span><a class="jive-link-external-small" href="http://my.company.com/operations" target="_blank">http://my.company.com/operations</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:operations="</span><a class="jive-link-external-small" href="http://my.company.com/operations" target="_blank">http://my.company.com/operations</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:types="</span><a class="jive-link-external-small" href="http://my.company.com/types" target="_blank">http://my.company.com/types</a><span>"</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; elementFormDefault="qualified"&gt;</p><p>&#160; </p><p><span>&#160; &lt;import namespace="</span><a class="jive-link-external-small" href="http://my.company.com/types" target="_blank">http://my.company.com/types</a><span>" schemaLocation="types.xsd"/&gt;</span></p><p>&#160; </p><p>&#160; // define some simple and complex types in here&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160; </p><p>&lt;/schema&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Steps for creating the XSD files:</p><p>1. For each schema in the WSDL, create an XSD file</p><p>2. The root &lt;schema&gt; element target namespace is the unique namespace for the simple/complex types it defines</p><p>3. Copied &lt;schema&gt; children as-is from WSDL to XSD file</p><p>4. If the new XSD file referenced one of the other namespaces, add a namespace declaration in &lt;schema&gt; for it and added an &lt;import&gt;</p><p>5. For each &lt;import&gt;, the namespace is the unique namespace for the simple/complex types the imported file defines</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> Steps for modifying the WSDL file:</p><p>1. Remove all but one &lt;schema&gt; element</p><p>2. Change the &lt;schema&gt; target namespace to the same target namespace for &lt;definitions&gt;</p><p>3. Add an &lt;import&gt; for each XSD file (i.e., original &lt;schema&gt; element)</p><p>4. For each &lt;import&gt;, the namespace is the unique namespace for the simple/complex types the imported file defines</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/737499#737499">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>