cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r556834 - in /incubator/cxf/trunk: systests/ tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/ tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/ tools/javato/test/src/test/java/o...
Date Tue, 17 Jul 2007 07:40:57 GMT
Author: mmao
Date: Tue Jul 17 00:40:54 2007
New Revision: 556834

URL: http://svn.apache.org/viewvc?view=rev&rev=556834
Log:
* Set the defalut value of the -exsh flag to false
* Add tests for the DataTypeAdapter
* Add tests for the out of band headers in wrapper style


Modified:
    incubator/cxf/trunk/systests/pom.xml
    incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust.vm
    incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust_embed.vm
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGeneratorTest.java
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar.xjb
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar_embed.xml
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date.xjb
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date_embed.xml
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_calendar.xjb
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_date.xjb
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    incubator/cxf/trunk/tools/wsdlto/test/pom.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Tue Jul 17 00:40:54 2007
@@ -59,13 +59,11 @@
                             <wsdlOptions>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/test/resources/wsdl/pizza_service.wsdl</wsdl>
-                                    <!--
                                     <extraargs>
                                       <extraarg>-exsh</extraarg>
                                       <extraarg>true</extraarg>
                                       <extraarg>-V</extraarg>
                                     </extraargs>
-                                    -->
                                 </wsdlOption>
                             </wsdlOptions>
                         </configuration>
@@ -374,9 +372,9 @@
             <version>4.3.1</version>
         </dependency>
         <dependency>
-	    <groupId>org.codehaus.jettison</groupId>
-	    <artifactId>jettison</artifactId>
-	    <version>1.0-RC1</version>
+            <groupId>org.codehaus.jettison</groupId>
+            <artifactId>jettison</artifactId>
+            <version>1.0-RC1</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -384,7 +382,7 @@
             <artifactId>commons-httpclient</artifactId>
             <version>3.1-rc1</version>
             <scope>test</scope>
-        </dependency>       
+        </dependency>
 
     </dependencies>
     <properties>

Modified: incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust.vm?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust.vm
(original)
+++ incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust.vm
Tue Jul 17 00:40:54 2007
@@ -33,7 +33,7 @@
               xmlns:xs="http://www.w3.org/2001/XMLSchema">
 #foreach ($schemaFile in $schemaFiles)
   <jxb:bindings schemaLocation="$schemaFile" node="/xs:schema">
-    <jxb:globalBindings>
+    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <jxb:javaType name="$datetype" xmlType="xs:dateTime" parseMethod="$parseMethod"
printMethod="$printMethod"/>
     </jxb:globalBindings>
   </jxb:bindings>

Modified: incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust_embed.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust_embed.vm?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust_embed.vm
(original)
+++ incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/date_type_cust_embed.vm
Tue Jul 17 00:40:54 2007
@@ -35,7 +35,7 @@
           xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
 #foreach ($targetNamespace in $targetNamespaces)
   <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='$targetNamespace']">
-      <jxb:globalBindings>
+      <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <jxb:javaType name="$datetype" xmlType="xs:dateTime"
                       parseMethod="$parseMethod"
                       printMethod="$printMethod"/>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGeneratorTest.java?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGeneratorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/DateTypeCustomGeneratorTest.java
Tue Jul 17 00:40:54 2007
@@ -46,7 +46,7 @@
 
     @After
     public void tearDown() {
-        super.tearDown();
+        //super.tearDown();
     }
 
     @Test

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar.xjb?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar.xjb
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar.xjb
Tue Jul 17 00:40:54 2007
@@ -20,12 +20,12 @@
               xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
               xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <jxb:bindings schemaLocation="hello_schema1.xsd" node="/xs:schema">
-    <jxb:globalBindings>
+    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime" parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
     </jxb:globalBindings>
   </jxb:bindings>
   <jxb:bindings schemaLocation="hello_schema2.xsd" node="/xs:schema">
-    <jxb:globalBindings>
+    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime" parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
     </jxb:globalBindings>
   </jxb:bindings>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar_embed.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar_embed.xml?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar_embed.xml
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/calendar_embed.xml
Tue Jul 17 00:40:54 2007
@@ -22,7 +22,7 @@
           xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
           xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://date.fortest.tools.cxf.apache.org/']">
-      <jxb:globalBindings>
+      <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
                       parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
                       printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date.xjb?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date.xjb
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date.xjb
Tue Jul 17 00:40:54 2007
@@ -20,12 +20,12 @@
               xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
               xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <jxb:bindings schemaLocation="hello_schema1.xsd" node="/xs:schema">
-    <jxb:globalBindings>
+    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <jxb:javaType name="java.util.Date" xmlType="xs:dateTime" parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
     </jxb:globalBindings>
   </jxb:bindings>
   <jxb:bindings schemaLocation="hello_schema2.xsd" node="/xs:schema">
-    <jxb:globalBindings>
+    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <jxb:javaType name="java.util.Date" xmlType="xs:dateTime" parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
     </jxb:globalBindings>
   </jxb:bindings>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date_embed.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date_embed.xml?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date_embed.xml
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/date_embed.xml
Tue Jul 17 00:40:54 2007
@@ -22,7 +22,7 @@
           xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
           xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://date.fortest.tools.cxf.apache.org/']">
-      <jxb:globalBindings>
+      <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <jxb:javaType name="java.util.Date" xmlType="xs:dateTime"
                       parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
                       printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Tue Jul 17 00:40:54 2007
@@ -393,7 +393,7 @@
         String expectedFile = getClass().getResource("expected/echo_calendar.xjb").getFile();
         assertFileEquals(new File(expectedFile), bindingFile);
     }
-    
+
     @Test
     //Test for cxf774
     public void testList() throws Exception {
@@ -408,7 +408,7 @@
         }
         File wsdlFile = new File(output, "list_test.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
-        
+
         String expectedFile = getClass().getResource("expected/list_expected.wsdl").getFile();
         assertFileEquals(new File(expectedFile), new File(output, "/list_test.wsdl"));
     }

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_calendar.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_calendar.xjb?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_calendar.xjb
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_calendar.xjb
Tue Jul 17 00:40:54 2007
@@ -23,7 +23,7 @@
           xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
           xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://date.fortest.tools.cxf.apache.org/']">
-      <jxb:globalBindings>
+      <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
                       parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
                       printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>

Modified: incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_date.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_date.xjb?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_date.xjb
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/echo_date.xjb
Tue Jul 17 00:40:54 2007
@@ -22,7 +22,7 @@
           xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
           xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://date.fortest.tools.cxf.apache.org/']">
-      <jxb:globalBindings>
+      <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <jxb:javaType name="java.util.Date" xmlType="xs:dateTime"
                       parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
                       printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Tue Jul 17 00:40:54 2007
@@ -136,7 +136,10 @@
 
     private boolean requireOutOfBandHeader() {
         String value = (String)context.get(ToolConstants.CFG_EXTRA_SOAPHEADER);
-        return StringUtils.isEmpty(value) || Boolean.valueOf(value).booleanValue();
+        if (StringUtils.isEmpty(value)) {
+            return false;
+        }
+        return Boolean.valueOf(value).booleanValue();
     }
 
     private int countOutOfBandHeader(MessageInfo message) {
@@ -404,7 +407,7 @@
         JavaParameter parameter = new JavaParameter(jpname, fullJavaName, targetNamespace);
         parameter.setStyle(style);
         parameter.setQName(item);
-        
+
         parameter.setDefaultValueWriter(ProcessorUtil.getDefaultValueWriterForWrappedElement(part,
                                                                                         
    context,
                                                                                         
    item));
@@ -445,7 +448,7 @@
 
         String jpname = ProcessorUtil.mangleNameToVariableName(simpleJavaName);
         JavaReturn returnType = new JavaReturn(jpname, fullJavaName , targetNamespace);
-        
+
         returnType.setDefaultValueWriter(
             ProcessorUtil.getDefaultValueWriterForWrappedElement(part, context, element));
 

Modified: incubator/cxf/trunk/tools/wsdlto/test/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/pom.xml?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/pom.xml (original)
+++ incubator/cxf/trunk/tools/wsdlto/test/pom.xml Tue Jul 17 00:40:54 2007
@@ -6,9 +6,9 @@
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License. You may obtain a copy of the License at
-    
+
     http://www.apache.org/licenses/LICENSE-2.0
-    
+
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -61,33 +61,39 @@
             <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
             <version>${project.version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-bindings-soap</artifactId>
             <version>${project.version}</version>
-	    <scope>test</scope>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
-	     <groupId>org.mortbay.jetty</groupId>
-	     <artifactId>jetty</artifactId>
-	     <version>${jetty.version}</version>
-	     <scope>test</scope>
-	</dependency>
+             <groupId>org.mortbay.jetty</groupId>
+             <artifactId>jetty</artifactId>
+             <version>${jetty.version}</version>
+             <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-jms</artifactId>
             <version>${project.version}</version>
-	    <scope>test</scope>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-bindings-xml</artifactId>
             <version>${project.version}</version>
-	    <scope>test</scope>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <scope>test</scope>
         </dependency>
 
     </dependencies>

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?view=diff&rev=556834&r1=556833&r2=556834
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
Tue Jul 17 00:40:54 2007
@@ -153,8 +153,8 @@
         for (Method m : meths) {
             if ("orderPizzaBroken".equals(m.getName())) {
                 Annotation annotations[][] = m.getParameterAnnotations();
-                assertEquals(2, annotations.length);
-                for (int i = 0; i < 2; i++) {
+                assertEquals(1, annotations.length);
+                for (int i = 0; i < 1; i++) {
                     assertTrue(annotations[i][0] instanceof WebParam);
                     WebParam parm = (WebParam)annotations[i][0];
                     if ("OrderPizza".equals(parm.name())) {
@@ -162,10 +162,7 @@
                         assertEquals("OrderPizza", parm.name());
                         assertTrue(!parm.header());
                     } else if ("CallerIDHeader".equals(parm.name())) {
-                        assertEquals("http://mypizzaco.com/pizza/types", parm.targetNamespace());
-                        assertEquals("callerID", parm.partName());
-                        assertEquals("CallerIDHeader", parm.name());
-                        assertTrue(parm.header());
+                        fail("If the exsh turned off, should not generate this parameter");
                     } else {
                         fail("No WebParam found!");
                     }
@@ -199,6 +196,40 @@
                         assertTrue(!parm.header());
                     } else if ("CallerIDHeader".equals(parm.name())) {
                         fail("If the exsh turned off, should not generate this parameter");
+                    } else {
+                        fail("No WebParam found!");
+                    }
+                }
+            }
+        }
+    }
+
+
+    @Test
+    public void testHeaderFromAnotherMessage4() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/pizza_wrapped.wsdl"));
+        env.put(ToolConstants.CFG_EXTRA_SOAPHEADER, "TRUE");
+        processor.setContext(env);
+        processor.execute();
+
+        assertNotNull(output);
+
+        Class clz = classLoader.loadClass("org.apache.cxf.pizza_wrapped.Pizza");
+
+        Method meths[] = clz.getMethods();
+        for (Method m : meths) {
+            if ("orderPizza".equals(m.getName())) {
+                Annotation annotations[][] = m.getParameterAnnotations();
+                assertEquals(2, annotations.length);
+                for (int i = 0; i < 2; i++) {
+                    assertTrue(annotations[i][0] instanceof WebParam);
+                    WebParam parm = (WebParam)annotations[i][0];
+                    if ("Toppings".equals(parm.name())) {
+                        assertEquals("http://cxf.apache.org/pizza_wrapped/types", parm.targetNamespace());
+                        assertTrue(!parm.header());
+                    } else if ("CallerIDHeader".equals(parm.name())) {
+                        assertEquals("http://cxf.apache.org/pizza_wrapped/types", parm.targetNamespace());
+                        assertTrue(parm.header());
                     } else {
                         fail("No WebParam found!");
                     }



Mime
View raw message