cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1050156 - in /cxf/trunk: rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl
Date Thu, 16 Dec 2010 20:57:37 GMT
Author: dkulp
Date: Thu Dec 16 20:57:37 2010
New Revision: 1050156

URL: http://svn.apache.org/viewvc?rev=1050156&view=rev
Log:
[CXF-3197] Fix NPE in wsdl2java when unwrapping elements that have
anonymous types.

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
    cxf/trunk/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=1050156&r1=1050155&r2=1050156&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Thu Dec
16 20:57:37 2010
@@ -754,8 +754,8 @@ public class WSDLServiceBuilder {
                     MessagePartInfo mpi = wrapper.addMessagePart(new QName(namespaceURI,
el.getName()));
                     mpi.setTypeQName(el.getSchemaTypeName());
                     mpi.setElement(true);
-                    mpi.setConcreteName(el.getWireName());
                     mpi.setElementQName(el.getWireName());
+                    mpi.setConcreteName(el.getWireName());
                     mpi.setXmlSchema(el);
                 } else if (el.getRef().getTargetQName() != null) {
                     MessagePartInfo mpi = wrapper.addMessagePart(el.getRef().getTargetQName());
@@ -771,8 +771,8 @@ public class WSDLServiceBuilder {
                 } else {
                     // anonymous type
                     MessagePartInfo mpi = wrapper.addMessagePart(new QName(namespaceURI,
el.getName()));
-                    mpi.setConcreteName(el.getWireName());
                     mpi.setElementQName(mpi.getName());
+                    mpi.setConcreteName(el.getWireName());
                     mpi.setElement(true);
                     mpi.setXmlSchema(el);
                 }

Modified: cxf/trunk/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl?rev=1050156&r1=1050155&r2=1050156&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl (original)
+++ cxf/trunk/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl Thu Dec
16 20:57:37 2010
@@ -25,7 +25,13 @@
 			<xsd:element name="DoubleIt">
 				<xsd:complexType>
 					<xsd:sequence>
-						<xsd:element name="numberToDouble" type="xsd:integer" />
+						<xsd:element name="numberToDouble">
+                            <xsd:simpleType>
+								<xsd:restriction base="xsd:integer">
+									<xsd:minInclusive value="0"/>
+								</xsd:restriction>
+							</xsd:simpleType>
+                        </xsd:element>
 					</xsd:sequence>
 				</xsd:complexType>
 			</xsd:element>



Mime
View raw message