cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r439231 - in /incubator/cxf/trunk/api/src: main/resources/schemas/wsdl/wsdl4jext.xsd test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
Date Fri, 01 Sep 2006 08:23:16 GMT
Author: tli
Date: Fri Sep  1 01:23:16 2006
New Revision: 439231

URL: http://svn.apache.org/viewvc?rev=439231&view=rev
Log:
fix bug in wsdl4jext.xsd

Modified:
    incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/wsdl4jext.xsd
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java

Modified: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/wsdl4jext.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/wsdl4jext.xsd?rev=439231&r1=439230&r2=439231&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/wsdl4jext.xsd (original)
+++ incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/wsdl4jext.xsd Fri Sep  1 01:23:16
2006
@@ -23,8 +23,8 @@
 		<xs:complexContent>
 			<xs:extension base="tns:tExtensibilityElement">
 				<xs:sequence />
-				<xs:attribute name="rootNode" type="xs:string"
-					use="required" />
+				<xs:attribute name="rootNode" type="xs:QName"
+					use="optional" />
 			</xs:extension>
 		</xs:complexContent>
 	</xs:complexType>

Modified: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java?rev=439231&r1=439230&r2=439231&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
(original)
+++ incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
Fri Sep  1 01:23:16 2006
@@ -33,7 +33,8 @@
 
 import junit.framework.TestCase;
 
-public class JAXBExtensionHelperTest extends TestCase {
+public class JAXBExtensionHelperTest
+                extends TestCase {
 
     private WSDLFactory wsdlFactory;
 
@@ -64,32 +65,32 @@
     public void testAddExtension() throws Exception {
 
         Class extClass = Class.forName("org.apache.cxf.bindings.xformat.XMLBindingMessageFormat");
-        
+
         String file = this.getClass().getResource("/wsdl/hello_world_xml_bare.wsdl").getFile();
-        
+
         wsdlReader.setExtensionRegistry(registry);
-                
+
         wsdlDefinition = wsdlReader.readWSDL(file);
 
         Binding b = wsdlDefinition.getBinding(new QName("http://objectweb.org/hello_world_xml_http/bare",
                         "Greeter_XMLBinding"));
         BindingOperation bo = b.getBindingOperation("sayHi", null, null);
-        BindingInput bi = bo.getBindingInput(); 
+        BindingInput bi = bo.getBindingInput();
         List extList = bi.getExtensibilityElements();
         Object extIns = null;
         for (Object ext : extList) {
             extIns = extClass.cast(ext);
         }
         assertEquals("can't found ext element XMLBindingMessageFormat", true, extIns != null);
-        String rootNode = getRootNode(extIns);
-        assertEquals("get rootNode value back from extension element", "sayHi", rootNode);
+        QName rootNode = getRootNode(extIns);
+        assertEquals("get rootNode value back from extension element", "sayHi", rootNode.getLocalPart());
     }
 
-    private String getRootNode(Object ext) throws Exception {
+    private QName getRootNode(Object ext) throws Exception {
         for (int i = 0; i < ext.getClass().getMethods().length; i++) {
             Method method = ext.getClass().getMethods()[i];
             if (method.getName().equals("getRootNode")) {
-                return (String) method.invoke(ext, new Object[] {});
+                return (QName) method.invoke(ext, new Object[] {});
             }
         }
         return null;



Mime
View raw message