Author: darran.lofthouse(a)jboss.com
Date: 2008-11-11 09:08:59 -0500 (Tue, 11 Nov 2008)
New Revision: 8700
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/Lookup.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupDetails.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupName.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponse.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseDetails.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseNumber.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/PhoneBook_PortType.java
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/jaxrpc-mapping.xml
Modified:
stack/native/branches/dlofthouse/JBWS-2389/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
Log:
Complete test case and implement fix.
Modified:
stack/native/branches/dlofthouse/JBWS-2389/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2008-11-11
12:56:57 UTC (rev 8699)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -100,7 +100,7 @@
private String typeNamespace;
private String serviceName = null;
private String packageName = null;
- private Map<String, String> namespacePackageMap = new
HashMap<String,String>();
+ private Map<String, String> namespacePackageMap = new HashMap<String,
String>();
private Set<String> registeredTypes = new HashSet<String>();
private Set<String> registeredExceptions = new HashSet<String>();
@@ -718,10 +718,11 @@
XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xt;
XSTypeDefinition baseType = xc.getBaseType();
short der = xc.getDerivationMethod();
+ String typeQName = "";
if ((baseType != null) && !utils.isBaseTypeIgnorable(baseType, xc))
{
- addJavaXMLTypeMap(baseType, baseType.getName(), "",
"", jwm, skipWrapperArray); //Recurse for base types
+ addJavaXMLTypeMap(baseType, baseType.getName(), "", "",
jwm, skipWrapperArray); //Recurse for base types
}
// handleContentTypeElementsWithDerivationNone
@@ -749,15 +750,17 @@
javaType = getJavaTypeAsString(null, new QName(tempName),
xt.getNamespace(), false, true);
StringBuilder temp = new StringBuilder();
if (containingType != null && containingType.length() > 0)
- temp.append(">").append(containingType);
+ temp.append(containingType);
temp.append(">").append(name);
localName = temp.toString();
jxtm.setAnonymousTypeQName(new QName(xt.getNamespace(), localName,
"typeNS"));
+ typeQName = localName;
}
else
{
javaType = getJavaTypeAsString(null, new QName(localName),
xt.getNamespace(), false, true);
jxtm.setRootTypeQName(new QName(xt.getNamespace(), xt.getName(),
"typeNS"));
+ typeQName = xc.getName();
}
if (typeNamespace == null)
@@ -794,7 +797,15 @@
}
if (xm != null)
- addGroup(xm, name, xc.getName(), jwm);
+ {
+ String container = containingElement;
+ if (container == null || container.length() == 0)
+ {
+ container = name;
+ }
+
+ addGroup(xm, container, typeQName, jwm);
+ }
}
// Add enum simpleType support
@@ -816,7 +827,7 @@
XSElementDeclaration xe = (XSElementDeclaration)xsterm;
VariableMapping vm = new VariableMapping(jxtm);
String name = xe.getName();
-
+
// JBWS-1170 Convert characters which are illegal in Java identifiers
vm.setJavaVariableName(ToolsUtils.convertInvalidCharacters(Introspector.decapitalize(name)));
vm.setXmlElementName(name);
@@ -924,7 +935,8 @@
{
jtype = JavaUtils.getSourceName(javaType);
}
- else jtype = javaType.getName();
+ else
+ jtype = javaType.getName();
}
return jtype + arraySuffix;
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/Lookup.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/Lookup.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/Lookup.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws2389;
+
+
+public class Lookup
+{
+
+protected org.jboss.test.ws.jbws2389.LookupDetails details;
+public Lookup(){}
+
+public Lookup(org.jboss.test.ws.jbws2389.LookupDetails details){
+this.details=details;
+}
+public org.jboss.test.ws.jbws2389.LookupDetails getDetails() { return details ;}
+
+public void setDetails(org.jboss.test.ws.jbws2389.LookupDetails details){
this.details=details; }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/Lookup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupDetails.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupDetails.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupDetails.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws2389;
+
+
+public class LookupDetails
+{
+
+protected org.jboss.test.ws.jbws2389.LookupName name;
+public LookupDetails(){}
+
+public LookupDetails(org.jboss.test.ws.jbws2389.LookupName name){
+this.name=name;
+}
+public org.jboss.test.ws.jbws2389.LookupName getName() { return name ;}
+
+public void setName(org.jboss.test.ws.jbws2389.LookupName name){ this.name=name; }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupDetails.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupName.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupName.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupName.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,34 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws2389;
+
+
+public class LookupName
+{
+
+protected java.lang.String firstName;
+
+protected java.lang.String surname;
+public LookupName(){}
+
+public LookupName(java.lang.String firstName, java.lang.String surname){
+this.firstName=firstName;
+this.surname=surname;
+}
+public java.lang.String getFirstName() { return firstName ;}
+
+public void setFirstName(java.lang.String firstName){ this.firstName=firstName; }
+
+public java.lang.String getSurname() { return surname ;}
+
+public void setSurname(java.lang.String surname){ this.surname=surname; }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupName.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponse.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponse.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponse.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws2389;
+
+
+public class LookupResponse
+{
+
+protected org.jboss.test.ws.jbws2389.LookupResponseDetails details;
+public LookupResponse(){}
+
+public LookupResponse(org.jboss.test.ws.jbws2389.LookupResponseDetails details){
+this.details=details;
+}
+public org.jboss.test.ws.jbws2389.LookupResponseDetails getDetails() { return details ;}
+
+public void setDetails(org.jboss.test.ws.jbws2389.LookupResponseDetails details){
this.details=details; }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseDetails.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseDetails.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseDetails.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws2389;
+
+
+public class LookupResponseDetails
+{
+
+protected org.jboss.test.ws.jbws2389.LookupResponseNumber number;
+public LookupResponseDetails(){}
+
+public LookupResponseDetails(org.jboss.test.ws.jbws2389.LookupResponseNumber number){
+this.number=number;
+}
+public org.jboss.test.ws.jbws2389.LookupResponseNumber getNumber() { return number ;}
+
+public void setNumber(org.jboss.test.ws.jbws2389.LookupResponseNumber number){
this.number=number; }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseDetails.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseNumber.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseNumber.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseNumber.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,34 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws2389;
+
+
+public class LookupResponseNumber
+{
+
+protected java.lang.String areaCode;
+
+protected java.lang.String number;
+public LookupResponseNumber(){}
+
+public LookupResponseNumber(java.lang.String areaCode, java.lang.String number){
+this.areaCode=areaCode;
+this.number=number;
+}
+public java.lang.String getAreaCode() { return areaCode ;}
+
+public void setAreaCode(java.lang.String areaCode){ this.areaCode=areaCode; }
+
+public java.lang.String getNumber() { return number ;}
+
+public void setNumber(java.lang.String number){ this.number=number; }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/LookupResponseNumber.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/PhoneBook_PortType.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/PhoneBook_PortType.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/PhoneBook_PortType.java 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Nov 11 13:48:53 GMT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jbws2389;
+public interface PhoneBook_PortType extends java.rmi.Remote
+{
+
+ public org.jboss.test.ws.jbws2389.LookupResponse
lookup(org.jboss.test.ws.jbws2389.Lookup lookup) throws java.rmi.RemoteException;
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/PhoneBook_PortType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/jaxrpc-mapping.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/jaxrpc-mapping.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/jaxrpc-mapping.xml 2008-11-11
14:08:59 UTC (rev 8700)
@@ -0,0 +1,103 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws2389</package-type>
+ <
namespaceURI>http://test.jboss.org/ws/jbws2389/types</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws2389</package-type>
+ <
namespaceURI>http://test.jboss.org/ws/jbws2389</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2389.Lookup</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws2389/types'>typeNS:...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>details</java-variable-name>
+ <xml-element-name>Details</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2389.LookupDetails</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws2389/types'>typeNS:...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-element-name>Name</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2389.LookupName</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws2389/types'>typeNS:...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>firstName</java-variable-name>
+ <xml-element-name>firstName</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>surname</java-variable-name>
+ <xml-element-name>surname</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2389.LookupResponse</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws2389/types'>typeNS:...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>details</java-variable-name>
+ <xml-element-name>Details</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2389.LookupResponseDetails</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws2389/types'>typeNS:...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>number</java-variable-name>
+ <xml-element-name>Number</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2389.LookupResponseNumber</java-type>
+ <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws2389/types'>typeNS:...
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>areaCode</java-variable-name>
+ <xml-element-name>areaCode</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>number</java-variable-name>
+ <xml-element-name>number</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jbws2389.PhoneBook_Service</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://test.jboss.org/ws/jbws2389'>serviceNS:...
+ <port-mapping>
+ <port-name>PhoneBookPort</port-name>
+ <java-port-name>PhoneBookPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jbws2389.PhoneBook_PortType</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://test.jboss.org/ws/jbws2389'>portTypeN...
+ <wsdl-binding
xmlns:bindingNS='http://test.jboss.org/ws/jbws2389'>bindingNS:...
+ <service-endpoint-method-mapping>
+ <java-method-name>lookup</java-method-name>
+ <wsdl-operation>lookup</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.test.ws.jbws2389.Lookup</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws2389'>wsdlMsgNS:...
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.jbws2389.LookupResponse</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws2389'>wsdlMsgNS:...
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on:
stack/native/branches/dlofthouse/JBWS-2389/modules/testsuite/native-tests/src/test/resources/tools/jbws2389/doclit/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF