Index: plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TesterWSDLUtils.java
--- plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TesterWSDLUtils.java Base (BASE)
+++ plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TesterWSDLUtils.java Locally Modified (Based On LOCAL)
@@ -51,6 +51,7 @@
 import org.eclipse.core.runtime.Status;
 import org.jboss.tools.ws.core.utils.StatusUtils;
 import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+import org.jdom.Element;
 import org.jdom.Namespace;
 import org.jdom.input.DOMBuilder;
 
@@ -103,6 +104,8 @@
 	public final static String SOAP12_PREFIX = "soap12"; //$NON-NLS-1$
 	public final static String SOAP_PREFIX = "soap"; //$NON-NLS-1$
 
+	private static final String NS_PREFIX = "ns1";
+
 	public static Definition readWSDLURL(URL contextURL, String wsdlLoc) throws WSDLException {
 		Properties props = System.getProperties();
 		String oldPropValue = props.getProperty(DEF_FACTORY_PROPERTY_NAME);
@@ -234,8 +237,8 @@
 								Collection<?> parts = inputMsg.getParts().values();
 								StringBuffer buf = new StringBuffer();
 								if (parts.size() > 1) {
-									buf.append('<' + operation.getName());
-									buf.append(" xmlns = \"" + ns + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+									buf.append('<' + NS_PREFIX + ":" + operation.getName());
+									buf.append(" xmlns:" + NS_PREFIX + " = \"" + ns + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 									buf.append(">\n"); //$NON-NLS-1$
 								}
 								for( Iterator<?> it4 = parts.iterator(); it4.hasNext(); ) {
@@ -497,8 +500,8 @@
 									
 									if (rootName != null && rootName.equalsIgnoreCase(messageName)) {
 										StringBuffer buf = new StringBuffer();
-										buf.append('<' + rootName);
-										buf.append(" xmlns = \"" + namespace + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+										buf.append('<' + NS_PREFIX + ":" + rootName);
+										buf.append(" xmlns:" + NS_PREFIX + " = \"" + namespace + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 										buf.append(">\n"); //$NON-NLS-1$
 										if (!temp.getChildren().isEmpty()){
 											org.jdom.Element temp2 = (org.jdom.Element)temp.getChildren().get(0);
@@ -513,7 +516,7 @@
 												buf.append(elementStr);
 											}
 										}
-										buf.append("</" + rootName + ">\n");//$NON-NLS-1$//$NON-NLS-2$
+										buf.append("</" + NS_PREFIX + ":" + rootName + ">\n");//$NON-NLS-1$//$NON-NLS-2$
 										return buf.toString();
 									}
 								}
@@ -548,8 +551,10 @@
 								buf.append(partName);
 							}
 							else {
+								buf.append(NS_PREFIX);
+								buf.append(":");
 								buf.append(rootName);
-								buf.append(" xmlns = \"" + namespace + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+								buf.append(" xmlns:" + NS_PREFIX + " = \"" + namespace + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 							}
 							buf.append(">\n"); //$NON-NLS-1$
 							if (temp.getChildren().isEmpty()) {
@@ -576,8 +581,11 @@
 							buf.append("</");//$NON-NLS-1$
 							if (partName != null)
 								buf.append(partName);
-							else
+							else {
+								buf.append(NS_PREFIX);
+								buf.append(":");
 								buf.append(rootName);
+							}
 							buf.append(">\n");//$NON-NLS-1$
 							return buf.toString();
 						} else {
@@ -727,9 +735,14 @@
 			innerMinOccursNum = Integer.decode(innerMinOccurs);
 		}
 		if (innerChildName != null && !childEl.getName().contains(SIMPLE_TYPE_NAME)){
-			buf.append('<' + innerChildName);
-			buf.append(">"); //$NON-NLS-1$
+			buf.append('<');
+			if (isQualified(childEl)) {
+				buf.append(NS_PREFIX);
+				buf.append(':');
 		}
+			buf.append(innerChildName);
+			buf.append('>'); //$NON-NLS-1$
+		}
 		
 		if (childEl.getChildren().size() > 0) {
 			if (childEl.getName().contains(SIMPLE_TYPE_NAME)) {
@@ -754,11 +767,28 @@
 			String elementStr = processType(wsdlDefinition, childEl, innerChildType, false);
 			buf.append(elementStr);
 		}
-		if (innerChildName != null && !childEl.getName().contains(SIMPLE_TYPE_NAME))
-			buf.append("</" + innerChildName + ">\n");  //$NON-NLS-1$//$NON-NLS-2$
+		if (innerChildName != null && !childEl.getName().contains(SIMPLE_TYPE_NAME)) {			
+			buf.append("</");
+			if (isQualified(childEl)) {
+				buf.append(NS_PREFIX);
+				buf.append(':');
+			}
+			buf.append(innerChildName);
+			buf.append(">\n"); //$NON-NLS-1$
+		}
 		return buf.toString();
 	}
 
+	private static boolean isQualified(Element el) {
+		Element e = el;
+		while (e.getParentElement() != null) {
+			e = e.getParentElement();
+		}
+		String x = e.getAttributeValue("elementFormDefault", "http://www.w3.org/2001/XMLSchema");
+		return x != null && "qualified".equalsIgnoreCase(x);
+	}
+	
+	
 	public static String createMessageForSchemaElement ( Definition wsdlDefinition, String partName, String messageName, String namespace ) {
 		Types types = wsdlDefinition.getTypes();
 		if (types == null || wsdlDefinition.getImports().size() > 0) {
Index: tests/org.jboss.tools.ws.ui.test/resources/jbds1602/ConverterPortType.wsdl
--- tests/org.jboss.tools.ws.ui.test/resources/jbds1602/ConverterPortType.wsdl Locally New
+++ tests/org.jboss.tools.ws.ui.test/resources/jbds1602/ConverterPortType.wsdl Locally New
@@ -0,0 +1,57 @@
+<definitions name="Converter" targetNamespace="http://test.jboss.org/ns" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://test.jboss.org/ns" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+  <xs:schema elementFormDefault="qualified" targetNamespace="http://test.jboss.org/ns" version="1.0" xmlns:tns="http://test.jboss.org/ns" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+   <xs:element name="ChangeUnit">
+    <xs:complexType>
+     <xs:sequence>
+      <xs:element name="value" type="xs:double"/>
+      <xs:element name="fromUnit" type="tns:Units"/>
+      <xs:element name="toUnit" type="tns:Units"/>
+     </xs:sequence>
+    </xs:complexType>
+   </xs:element>
+   <xs:element name="ChangeUnitResponse">
+    <xs:complexType>
+     <xs:sequence>
+      <xs:element name="ChangeUnitResult" type="xs:double"/>
+     </xs:sequence>
+    </xs:complexType>
+   </xs:element>
+   <xs:simpleType name="Units">
+    <xs:restriction base="xs:string">
+     <xs:enumeration value="kilometer"/>
+     <xs:enumeration value="meter"/>
+    </xs:restriction>
+   </xs:simpleType>
+  </xs:schema>
+ </types>
+ <message name="ConverterPortType_convertResponse">
+  <part element="tns:ChangeUnitResponse" name="parameters"/>
+ </message>
+ <message name="ConverterPortType_convert">
+  <part element="tns:ChangeUnit" name="parameters"/>
+ </message>
+ <portType name="ConverterPortType">
+  <operation name="convert" parameterOrder="parameters">
+   <input message="tns:ConverterPortType_convert"/>
+   <output message="tns:ConverterPortType_convertResponse"/>
+  </operation>
+ </portType>
+ <binding name="ConverterPortTypeBinding" type="tns:ConverterPortType">
+  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+  <operation name="convert">
+   <soap:operation soapAction=""/>
+   <input>
+    <soap:body use="literal"/>
+   </input>
+   <output>
+    <soap:body use="literal"/>
+   </output>
+  </operation>
+ </binding>
+ <service name="Converter">
+  <port binding="tns:ConverterPortTypeBinding" name="ConverterPortTypeImplPort">
+   <soap:address location="http://localhost:8080/SimpleWSWAR/ConverterPortType"/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file
Index: tests/org.jboss.tools.ws.ui.test/resources/jbds1602/StockQuoteService.wsdl
--- tests/org.jboss.tools.ws.ui.test/resources/jbds1602/StockQuoteService.wsdl Locally New
+++ tests/org.jboss.tools.ws.ui.test/resources/jbds1602/StockQuoteService.wsdl Locally New
@@ -0,0 +1,47 @@
+<definitions name="StockQuoteService" targetNamespace="http://www.jboss.com/webservices/StockQuoteService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.jboss.com/webservices/StockQuoteService" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+  <xs:schema targetNamespace="http://www.jboss.com/webservices/StockQuoteService" version="1.0" xmlns:tns="http://www.jboss.com/webservices/StockQuoteService" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+   <xs:element name="getStockQuoteBySymbol" type="tns:getStockQuoteBySymbol"/>
+   <xs:element name="getStockQuoteBySymbolResponse" type="tns:getStockQuoteBySymbolResponse"/>
+   <xs:complexType name="getStockQuoteBySymbol">
+    <xs:sequence>
+     <xs:element minOccurs="0" name="arg0" type="xs:string"/>
+    </xs:sequence>
+   </xs:complexType>
+   <xs:complexType name="getStockQuoteBySymbolResponse">
+    <xs:sequence>
+     <xs:element name="return" type="xs:float"/>
+    </xs:sequence>
+   </xs:complexType>
+  </xs:schema>
+ </types>
+ <message name="StockQuoteService_getStockQuoteBySymbol">
+  <part element="tns:getStockQuoteBySymbol" name="getStockQuoteBySymbol"/>
+ </message>
+ <message name="StockQuoteService_getStockQuoteBySymbolResponse">
+  <part element="tns:getStockQuoteBySymbolResponse" name="getStockQuoteBySymbolResponse"/>
+ </message>
+ <portType name="StockQuoteService">
+  <operation name="getStockQuoteBySymbol" parameterOrder="getStockQuoteBySymbol">
+   <input message="tns:StockQuoteService_getStockQuoteBySymbol"/>
+   <output message="tns:StockQuoteService_getStockQuoteBySymbolResponse"/>
+  </operation>
+ </portType>
+ <binding name="StockQuoteServiceBinding" type="tns:StockQuoteService">
+  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+  <operation name="getStockQuoteBySymbol">
+   <soap:operation soapAction=""/>
+   <input>
+    <soap:body use="literal"/>
+   </input>
+   <output>
+    <soap:body use="literal"/>
+   </output>
+  </operation>
+ </binding>
+ <service name="StockQuoteService">
+  <port binding="tns:StockQuoteServiceBinding" name="StockQuoteServicePort">
+   <soap:address location="http://localhost:8080/SimpleWSWAR/StockQuoteService"/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file
Index: tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/utils/TesterWSDLUtilsTest.java
--- tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/utils/TesterWSDLUtilsTest.java Base (BASE)
+++ tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/utils/TesterWSDLUtilsTest.java Locally Modified (Based On LOCAL)
@@ -70,20 +70,20 @@
 	@Test
 	public void testJBIDE6497() {
 		String s1 = getSampleMessage("/jbide6497/original.wsdl", "gsearch_rss", "gsearch_rssSoap", "gsearch_rssSoap", "GetSearchResults");
-		Assert.assertTrue("was: '" + s1, s1.contains("<GetSearchResults xmlns = \"http://www.ecubicle.net/webservices\">"));
-		Assert.assertTrue("was: '" + s1, s1.contains("<gQuery>?</gQuery>"));
+		Assert.assertTrue("was: '" + s1, s1.contains("<ns1:GetSearchResults xmlns:ns1 = \"http://www.ecubicle.net/webservices\">"));
+		Assert.assertTrue("was: '" + s1, s1.contains("<ns1:gQuery>?</ns1:gQuery>"));
 
 		s1 = getSampleMessage("/jbide6593/original.wsdl", "EchoService", "EchoPort", "EchoPortBinding", "echo");
-		Assert.assertTrue("was: '" + s1, s1.contains("<p><age>?</age>"));
-		Assert.assertTrue("was: '" + s1, s1.contains("<male>?</male>"));
-		Assert.assertTrue("was: '" + s1, s1.contains("<tax>?</tax>"));
-		Assert.assertTrue("was: '" + s1, s1.contains("<echo xmlns = \"http://test.jboss.org/ns\">"));
+		Assert.assertTrue("was: '" + s1, s1.contains("<ns1:p><ns1:age>?</ns1:age>"));
+		Assert.assertTrue("was: '" + s1, s1.contains("<ns1:male>?</ns1:male>"));
+		Assert.assertTrue("was: '" + s1, s1.contains("<ns1:tax>?</ns1:tax>"));
+		Assert.assertTrue("was: '" + s1, s1.contains("<ns1:echo xmlns:ns1 = \"http://test.jboss.org/ns\">"));
 	}
 
 	@Test
 	public void testJBIDE6558() {
 		String s1 = getSampleMessage("/jbide6558/x.wsdl", "HelloWorldService", "HelloWorldPort", "HelloWorldBinding", "sayHello");
-		Assert.assertTrue(s1.contains("xmlns = \"http://webservices.samples.jboss.org/\""));
+		Assert.assertTrue(s1.contains("xmlns:ns1 = \"http://webservices.samples.jboss.org/\""));
 		Assert.assertTrue(s1.contains("<arg0>?</arg0>"));
 		String s2 = getSampleMessage("/jbide6558/y.wsdl", "HelloWorldService", "HelloWorldPort", "HelloWorldBinding", "sayHello");
 		Assert.assertEquals(s1, s2);
@@ -92,8 +92,8 @@
 	@Test
 	public void testJBIDE6593() {
 		String s1 = getSampleMessage("/jbide6497/original.wsdl", "gsearch_rss", "gsearch_rssSoap", "gsearch_rssSoap", "GetSearchResults");
-		Assert.assertTrue(s1.contains("<GetSearchResults xmlns = \"http://www.ecubicle.net/webservices\">"));
-		Assert.assertTrue(s1.contains("<gQuery>?</gQuery>"));
+		Assert.assertTrue(s1.contains("<ns1:GetSearchResults xmlns:ns1 = \"http://www.ecubicle.net/webservices\">"));
+		Assert.assertTrue(s1.contains("<ns1:gQuery>?</ns1:gQuery>"));
 
 		String s2 = getSampleMessage("/jbide6593/original.wsdl", "gsearch_rss", "gsearch_rssSoap", "gsearch_rssSoap", "GetSearchResults");
 		Assert.assertEquals(s1, s2);
@@ -102,16 +102,16 @@
 	@Test
 	public void testJBIDE6694() {
 		String s1 = getSampleMessage("/jbide6694/ConverterPortType.wsdl", "ConverterPortType", "ConverterPortTypeImplPort", "ConverterPortTypeBinding", "convert");
-		Assert.assertTrue(s1.contains("<ChangeUnit xmlns = \"http://test.jboss.org/ns\">"));
-		Assert.assertTrue(s1.contains("<value>?</value>"));
-		Assert.assertTrue(s1.contains("<fromUnit>?</fromUnit>"));
-		Assert.assertTrue(s1.contains("<toUnit>?</toUnit>"));
+		Assert.assertTrue(s1.contains("<ns1:ChangeUnit xmlns:ns1 = \"http://test.jboss.org/ns\">"));
+		Assert.assertTrue(s1.contains("<ns1:value>?</ns1:value>"));
+		Assert.assertTrue(s1.contains("<ns1:fromUnit>?</ns1:fromUnit>"));
+		Assert.assertTrue(s1.contains("<ns1:toUnit>?</ns1:toUnit>"));
 
 		String s2 = getSampleMessage("/jbide6694/jbide6694.wsdl", "Converter", "ConverterPort", "ConverterBinding", "convert");
-		Assert.assertTrue(s2.contains("<ChangeUnit xmlns = \"http://test.jboss.org/ns\">"));
-		Assert.assertTrue(s2.contains("<value>?</value>"));
-		Assert.assertTrue(s2.contains("<fromUnit>?</fromUnit>"));
-		Assert.assertTrue(s2.contains("<toUnit>?</toUnit>"));
+		Assert.assertTrue(s2.contains("<ns1:ChangeUnit xmlns:ns1 = \"http://test.jboss.org/ns\">"));
+		Assert.assertTrue(s2.contains("<ns1:value>?</ns1:value>"));
+		Assert.assertTrue(s2.contains("<ns1:fromUnit>?</ns1:fromUnit>"));
+		Assert.assertTrue(s2.contains("<ns1:toUnit>?</ns1:toUnit>"));
 	}
 
 	@Test
@@ -120,6 +120,19 @@
 		Assert.assertTrue(s1.contains("<airportCode>?</airportCode>"));
 	}
 
+	@Test
+	public void testJBDS1602() {
+		String s1 = getSampleMessage("/jbds1602/StockQuoteService.wsdl", "StockQuoteService", "StockQuoteServicePort", "StockQuoteServiceBinding", "getStockQuoteBySymbol");
+		Assert.assertTrue(s1.contains("<ns1:getStockQuoteBySymbol xmlns:ns1 = \"http://www.jboss.com/webservices/StockQuoteService\">"));
+		Assert.assertTrue(s1.contains("<arg0>?</arg0>"));
+
+		s1 = getSampleMessage("/jbds1602/ConverterPortType.wsdl", "Converter", "ConverterPortTypeImplPort", "ConverterPortTypeBinding", "convert");
+		Assert.assertTrue(s1.contains("<ns1:ChangeUnit xmlns:ns1 = \"http://test.jboss.org/ns\">"));
+		Assert.assertTrue(s1.contains("<ns1:value>?</ns1:value>"));
+		Assert.assertTrue(s1.contains("<ns1:fromUnit>?</ns1:fromUnit>"));
+		Assert.assertTrue(s1.contains("<ns1:toUnit>?</ns1:toUnit>"));
+	}
+
 	private String getSampleMessage(String res, String service, String port, String binding, String operation) {
 		Definition def = readWSDL(res);
 		return TesterWSDLUtils.getSampleSOAPInputMessage(def, service, port, binding, operation);
