cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r520372 - in /incubator/cxf/trunk: testutils/ testutils/src/main/resources/wsdl/ tools/common/src/main/java/org/apache/cxf/tools/common/ tools/javato/ tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ tools...
Date Tue, 20 Mar 2007 12:14:32 GMT
Author: mmao
Date: Tue Mar 20 05:14:29 2007
New Revision: 520372

URL: http://svn.apache.org/viewvc?view=rev&rev=520372
Log:
[cxf-227]WSDL Generation for SOAP headers and faults
* this is no long a bug, however, we add the unit test to convince it was fixed

Added:
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/soap_header.wsdl
Modified:
    incubator/cxf/trunk/testutils/pom.xml
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ExtensionInvocationHandler.java
    incubator/cxf/trunk/tools/javato/pom.xml
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/DocBareMethodProcessor.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=520372&r1=520371&r2=520372
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Tue Mar 20 05:14:29 2007
@@ -170,188 +170,191 @@
 		<version>${project.version}</version>
 		<executions>
 		    <execution>
-		                            <id>generate-sources</id>
-		                            <phase>generate-sources</phase>
-		                            <configuration>
-		                                <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
-		                                <!--xsdOptions>
-		                                    <xsdOption>
-		                                        <xsd>${basedir}/src/main/resources/wsdl/jaxb/misc_test.xsd</xsd>
-		                                    </xsdOption>
-		                                </xsdOptions-->
-		                                <wsdlOptions>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
-		                                        <extraargs>
-		                                            <extraarg>-b</extraarg>
-		                                            <extraarg>
-		                                                ${basedir}/src/main/resources/wsdl/async_binding.xml
-		                                            </extraarg>
-		                                        </extraargs>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_soap12.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_secure.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/greeter_control.wsdl</wsdl>
-		                                        <extraargs>
-		                                            <extraarg>-b</extraarg>
-		                                            <extraarg>
-		                                                ${basedir}/src/main/resources/wsdl/greeter_control.xjb
-		                                            </extraarg>
-		                                        </extraargs>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/mtom_xop.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/swa-mime.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_mixed.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_bare.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>
-		                                            ${basedir}/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
-		                                        </wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_rpc_lit.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_mixedstyle.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_doc_lit.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/doc_lit_bare.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/jms_test.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/handler_test.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/soapheader.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/soapheader2.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/soapheader_rpc.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/locator.wsdl</wsdl>
-		                                        <!--extraargs>
-		                                            <extraarg>-p</extraarg>
-		                                            <extraarg>org.apache.cxf.testutils.locator</extraarg>
-		                                        </extraargs-->
-		                                    </wsdlOption>
-		    
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/schema_validation.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>
-		                                            ${basedir}/src/main/resources/wsdl/anonymous_complex_type.wsdl
-		                                        </wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/basic_callback_test.wsdl</wsdl>
-		                                    </wsdlOption>
-		    
-		                                    <wsdlOption>
-		                                        <wsdl>
-		                                            ${basedir}/src/main/resources/wsdl/hello_world_underscore.wsdl
-		                                        </wsdl>
-		                                    </wsdlOption>
-		    
-		                                    <wsdlOption>
-		                                        <wsdl>
-		                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml.wsdl
-		                                        </wsdl>
-		                                        <dependencies>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml_inc.wsdl
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
-		                                            </dependency>
-		                                        </dependencies>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>
-		                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit_soap.wsdl
-		                                        </wsdl>
-		                                        <dependencies>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit.wsdl
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
-		                                            </dependency>
-		                                        </dependencies>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>
-		                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit_soap.wsdl
-		                                        </wsdl>
-		                                        <dependencies>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit.wsdl
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
-		                                            </dependency>
-		                                            <dependency>
-		                                                ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
-		                                            </dependency>
-		                                        </dependencies>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/calculator.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/jaxb_element_test.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/ordered_param_holder.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                    <wsdlOption>
-		                                        <wsdl>${basedir}/src/main/resources/wsdl/hello_world_services.wsdl</wsdl>
-		                                    </wsdlOption>
-		                                </wsdlOptions>
-		                            </configuration>
-		                            <goals>
-		                                <goal>wsdl2java</goal>
-		                            </goals>
-                    </execution>
+			<id>generate-sources</id>
+			<phase>generate-sources</phase>
+			<configuration>
+			    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+			    <!--xsdOptions>
+				<xsdOption>
+				<xsd>${basedir}/src/main/resources/wsdl/jaxb/misc_test.xsd</xsd>
+				</xsdOption>
+				</xsdOptions-->
+			    <wsdlOptions>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
+				    <extraargs>
+					<extraarg>-b</extraarg>
+					<extraarg>
+					    ${basedir}/src/main/resources/wsdl/async_binding.xml
+					</extraarg>
+				    </extraargs>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_soap12.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_secure.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/greeter_control.wsdl</wsdl>
+				    <extraargs>
+					<extraarg>-b</extraarg>
+					<extraarg>
+					    ${basedir}/src/main/resources/wsdl/greeter_control.xjb
+					</extraarg>
+				    </extraargs>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/mtom_xop.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/swa-mime.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_mixed.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_bare.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>
+					${basedir}/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
+				    </wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_rpc_lit.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_mixedstyle.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_doc_lit.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/doc_lit_bare.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/jms_test.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/handler_test.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/soap_header.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/soapheader.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/soapheader2.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/soapheader_rpc.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/locator.wsdl</wsdl>
+				    <!--extraargs>
+					<extraarg>-p</extraarg>
+					<extraarg>org.apache.cxf.testutils.locator</extraarg>
+					</extraargs-->
+				</wsdlOption>
+				
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/schema_validation.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>
+					${basedir}/src/main/resources/wsdl/anonymous_complex_type.wsdl
+				    </wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/basic_callback_test.wsdl</wsdl>
+				</wsdlOption>
+				
+				<wsdlOption>
+				    <wsdl>
+					${basedir}/src/main/resources/wsdl/hello_world_underscore.wsdl
+				    </wsdl>
+				</wsdlOption>
+				
+				<wsdlOption>
+				    <wsdl>
+					${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml.wsdl
+				    </wsdl>
+				    <dependencies>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml_inc.wsdl
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
+					</dependency>
+				    </dependencies>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>
+					${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit_soap.wsdl
+				    </wsdl>
+				    <dependencies>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit.wsdl
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
+					</dependency>
+				    </dependencies>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>
+					${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit_soap.wsdl
+				    </wsdl>
+				    <dependencies>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit.wsdl
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
+					</dependency>
+					<dependency>
+					    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
+					</dependency>
+				    </dependencies>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/calculator.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/jaxb_element_test.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/ordered_param_holder.wsdl</wsdl>
+				</wsdlOption>
+				<wsdlOption>
+				    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_services.wsdl</wsdl>
+				</wsdlOption>
+			    </wsdlOptions>
+			</configuration>
+			<goals>
+			    <goal>wsdl2java</goal>
+			</goals>
+		    </execution>
 		</executions>
 	    </plugin>
 	</plugins>

Added: incubator/cxf/trunk/testutils/src/main/resources/wsdl/soap_header.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/soap_header.wsdl?view=auto&rev=520372
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/soap_header.wsdl (added)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/soap_header.wsdl Tue Mar 20 05:14:29
2007
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+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
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<definitions name="soap_header" targetNamespace="http://apache.org/samples/headers" 
+	     xmlns="http://schemas.xmlsoap.org/wsdl/" 
+	     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
+	     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+	     xmlns:tns="http://apache.org/samples/headers" 
+	     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+	     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <types>
+	<schema targetNamespace="http://apache.org/samples/headers" 
+		xmlns="http://www.w3.org/2001/XMLSchema" 
+		xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+	    <complexType name="SOAPHeaderData">
+		<sequence>
+		    <element maxOccurs="1" minOccurs="1" name="originator" type="string"/>
+		    <element maxOccurs="1" minOccurs="1" name="message" type="string"/>
+		</sequence>
+	    </complexType>
+	    <element name="SOAPHeaderInfo" type="tns:SOAPHeaderData"/>
+
+	    <element name="inHeader">
+		<complexType>
+		    <sequence>
+			<element name="requestType" type="xsd:string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+	    <element name="inHeaderResponse">
+		<complexType>
+		    <sequence>
+			<element name="responseType" type="xsd:string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+
+	    <element name="outHeader">
+		<complexType>
+		    <sequence>
+			<element name="requestType" type="xsd:string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+	    <element name="outHeaderResponse">
+		<complexType>
+		    <sequence>
+			<element name="responseType" type="xsd:string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+
+	    <element name="inoutHeader">
+		<complexType>
+		    <sequence>
+			<element name="requestType" type="xsd:string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+	    <element name="inoutHeaderResponse">
+		<complexType>
+		    <sequence>
+			<element name="responseType" type="xsd:string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+
+	</schema>
+    </types>
+
+    <message name="inHeaderRequest">
+	<part element="tns:inHeader" name="me"/>
+	<part element="tns:SOAPHeaderInfo" name="header_info"/>
+    </message>
+    <message name="inHeaderResponse">
+	<part element="tns:inHeaderResponse" name="the_response"/>
+    </message>
+    <message name="outHeaderRequest">
+	<part element="tns:outHeader" name="me"/>
+    </message>
+    <message name="outHeaderResponse">
+	<part element="tns:outHeaderResponse" name="the_response"/>
+	<part element="tns:SOAPHeaderInfo" name="header_info"/>
+    </message>
+    <message name="inoutHeaderRequest">
+	<part element="tns:inoutHeader" name="me"/>
+	<part element="tns:SOAPHeaderInfo" name="header_info"/>
+    </message>
+    <message name="inoutHeaderResponse">
+	<part element="tns:inoutHeaderResponse" name="the_response"/>
+	<part element="tns:SOAPHeaderInfo" name="header_info"/>
+    </message>
+
+    <portType name="headerTester">
+	<operation name="inHeader">
+	    <input message="tns:inHeaderRequest" name="inHeaderRequest"/>
+	    <output message="tns:inHeaderResponse" name="inHeaderResponse"/>
+	</operation>
+	<operation name="outHeader">
+	    <input message="tns:outHeaderRequest" name="outHeaderRequest"/>
+	    <output message="tns:outHeaderResponse" name="outHeaderResponse"/>
+	</operation>
+	<operation name="inoutHeader">
+	    <input message="tns:inoutHeaderRequest" name="inoutHeaderRequest"/>
+	    <output message="tns:inoutHeaderResponse" name="inoutHeaderResponse"/>
+	</operation>
+    </portType>
+
+    <binding name="headerTesterSOAPBinding" type="tns:headerTester">
+	<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+	<operation name="inHeader">
+	    <soap:operation soapAction="" style="document"/>
+	    <input name="inHeaderRequest">
+		<soap:body parts="me" use="literal"/>
+		<soap:header message="tns:inHeaderRequest" part="header_info" 
+			     use="literal"/>
+	    </input>
+	    <output name="inHeaderResponse">
+		<soap:body use="literal"/>
+	    </output>
+	</operation>
+	<operation name="outHeader">
+	    <soap:operation soapAction="" style="document"/>
+	    <input name="outHeaderRequest">
+		<soap:body use="literal"/>
+	    </input>
+	    <output name="outHeaderResponse">
+		<soap:body parts="the_response" use="literal"/>
+		<soap:header message="tns:outHeaderResponse" part="header_info" 
+			     use="literal"/>
+	    </output>
+	</operation>
+	<operation name="inoutHeader">
+	    <soap:operation soapAction="" style="document"/>
+	    <input name="inoutHeaderRequest">
+		<soap:body parts="me" use="literal"/>
+		<soap:header message="tns:inoutHeaderRequest" part="header_info" 
+			     use="literal"/>
+	    </input>
+	    <output name="inoutHeaderResponse">
+		<soap:body parts="the_response" use="literal"/>
+		<soap:header message="tns:inoutHeaderResponse" part="header_info" 
+			     use="literal"/>
+	    </output>
+	</operation>
+    </binding>
+
+    <service name="HeaderService">
+	<port binding="tns:headerTesterSOAPBinding" name="SoapPort">
+	    <soap:address location="http://localhost:9000/headers"/>
+	</port>
+    </service>
+</definitions>

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ExtensionInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ExtensionInvocationHandler.java?view=diff&rev=520372&r1=520371&r2=520372
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ExtensionInvocationHandler.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ExtensionInvocationHandler.java
Tue Mar 20 05:14:29 2007
@@ -38,7 +38,7 @@
             }
         }
         
-        Method m = obj.getClass().getDeclaredMethod(method.getName(), clzs);
+        Method m = obj.getClass().getDeclaredMethod(method.getName(), method.getParameterTypes());
         return m.invoke(obj, args);
     }
 }

Modified: incubator/cxf/trunk/tools/javato/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/pom.xml?view=diff&rev=520372&r1=520371&r2=520372
==============================================================================
--- incubator/cxf/trunk/tools/javato/pom.xml (original)
+++ incubator/cxf/trunk/tools/javato/pom.xml Tue Mar 20 05:14:29 2007
@@ -111,6 +111,13 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-testutils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <scm>

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/DocBareMethodProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/DocBareMethodProcessor.java?view=diff&rev=520372&r1=520371&r2=520372
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/DocBareMethodProcessor.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/DocBareMethodProcessor.java
Tue Mar 20 05:14:29 2007
@@ -228,14 +228,14 @@
             }   
             
             if (!criteria1) {
-                throw new ToolException(new Message("DOC_BARE_METHOD_CRITERIA1", LOG));
+                throw new ToolException(new Message("DOC_BARE_METHOD_CRITERIA1", LOG, method.getName()));
             }
             if (!criteria2) {
-                throw new ToolException(new Message("DOC_BARE_METHOD_CRITERIA2", LOG));
+                throw new ToolException(new Message("DOC_BARE_METHOD_CRITERIA2", LOG, method.getName()));
             }
             criteria3 = nonHeaderParamCount <= 1 ? true : false;
             if (!criteria3) {
-                throw new ToolException(new Message("DOC_BARE_METHOD_CRITERIA3", LOG));
+                throw new ToolException(new Message("DOC_BARE_METHOD_CRITERIA3", LOG, method.getName()));
             }
             paras.add(jp);
             i++;

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java?view=diff&rev=520372&r1=520371&r2=520372
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
Tue Mar 20 05:14:29 2007
@@ -372,6 +372,47 @@
         }
     }
 
+    public void testSoapHeader() throws Exception {
+        Map<String, String> ns = new HashMap<String, String>();
+        ns.put("wsdl", "http://schemas.xmlsoap.org/wsdl/");
+        ns.put("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
+        ns.put("tns", "http://apache.org/samples/headers");
+        
+        env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/soap_header.wsdl");
+        env.put(ToolConstants.CFG_CLASSNAME,
+                "org.apache.samples.headers.HeaderTester");
+        env.put(ToolConstants.CFG_SERVICENAME, serviceName);
+        j2wProcessor.setEnvironment(env);
+        try {        
+            j2wProcessor.process();
+            File file = new File(output, "soap_header.wsdl");
+            assertTrue(file.exists());
+            Document root = XMLUtils.parse(new BufferedInputStream(new FileInputStream(file)));
+            XPathUtils xpather = new XPathUtils(ns);
+            assertNotNull(xpather.getValue("//wsdl:input[@name='inHeader']//soap:header[@message='inHeader']",
+                                        root,
+                                        XPathConstants.NODE));
+
+            assertNotNull(xpather.getValue("//wsdl:input[@name='inoutHeader']"
+                                           + "//soap:header[@message='inoutHeader']",
+                                        root,
+                                        XPathConstants.NODE));
+
+            assertNotNull(xpather.getValue("//wsdl:output[@name='inoutHeaderResponse']"
+                                           + "//soap:header[@message='tns:inoutHeaderResponse']",
+                                        root,
+                                        XPathConstants.NODE));
+            assertNotNull(xpather.getValue("//wsdl:output[@name='outHeaderResponse']"
+                                           + "//soap:header[@message='tns:outHeaderResponse']",
+                                        root,
+                                        XPathConstants.NODE));
+            
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("Should not happen other exception " + e.getMessage());
+        }
+    }
+
     private String getLocation(String wsdlFile) throws URISyntaxException {
         return JavaToWSDLProcessorTest.class.getResource(wsdlFile).toString();
     }



Mime
View raw message