Author: tli
Date: Tue Jan 30 01:26:31 2007
New Revision: 501354
URL: http://svn.apache.org/viewvc?view=rev&rev=501354
Log:
CXF-367 add systest for this jira bug
Added:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java
(with props)
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
(with props)
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
incubator/cxf/trunk/testutils/pom.xml
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?view=diff&rev=501354&r1=501353&r2=501354
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Tue Jan 30 01:26:31 2007
@@ -22,6 +22,7 @@
import java.lang.reflect.UndeclaredThrowableException;
import javax.xml.namespace.QName;
+import javax.xml.ws.Holder;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -33,6 +34,9 @@
import org.apache.cxf.anonymous_complex_type.SplitNameResponse.Names;
import org.apache.cxf.jaxb_element_test.JaxbElementTest;
import org.apache.cxf.jaxb_element_test.JaxbElementTest_Service;
+import org.apache.cxf.ordered_param_holder.ComplexStruct;
+import org.apache.cxf.ordered_param_holder.OrderedParamHolder;
+import org.apache.cxf.ordered_param_holder.OrderedParamHolder_Service;
import org.apache.cxf.systest.common.ClientServerSetupBase;
import org.apache.cxf.systest.common.ClientServerTestBase;
@@ -100,6 +104,37 @@
assertNotNull(response);
assertEquals("in=null", response);
+ } catch (UndeclaredThrowableException ex) {
+ throw (Exception) ex.getCause();
+ }
+ }
+
+ public void testOrderedParamHolder() throws Exception {
+ OrderedParamHolder_Service service = new OrderedParamHolder_Service();
+ OrderedParamHolder port = service.getOrderedParamHolderSOAP();
+
+ try {
+ Holder<ComplexStruct> part3 = new Holder<ComplexStruct>();
+ part3.value = new ComplexStruct();
+ part3.value.setElem1("elem1");
+ part3.value.setElem2("elem2");
+ part3.value.setElem3(0);
+ Holder<Integer> part2 = new Holder<Integer>();
+ part2.value = 0;
+ Holder<String> part1 = new Holder<String>();
+ part1.value = "part1";
+
+ port.orderedParamHolder(part3, part2, part1);
+
+ assertNotNull(part3.value);
+ assertEquals("check value", "return elem1",
part3.value.getElem1());
+ assertEquals("check value", "return elem2",
part3.value.getElem2());
+ assertEquals("check value", 1, part3.value.getElem3());
+ assertNotNull(part2.value);
+ assertEquals("check value", 1, part2.value.intValue());
+ assertNotNull(part1.value);
+ assertEquals("check value", "return part1", part1.value);
+
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java?view=diff&rev=501354&r1=501353&r2=501354
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
Tue Jan 30 01:26:31 2007
@@ -23,6 +23,7 @@
import org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeImpl;
import org.apache.cxf.jaxb_element_test.JaxbElementTestImpl;
+import org.apache.cxf.ordered_param_holder.OrderedParamHolderImpl;
import org.apache.cxf.systest.common.TestServerBase;
@@ -36,6 +37,11 @@
Object implementor2 = new JaxbElementTestImpl();
address = "http://localhost:9001/jaxb_element_test";
Endpoint.publish(address, implementor2);
+
+ Object implementor3 = new OrderedParamHolderImpl();
+ address = "http://localhost:9002/ordered_param_holder/";
+ Endpoint.publish(address, implementor3);
+
}
public static void main(String[] args) {
Modified: incubator/cxf/trunk/testutils/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=501354&r1=501353&r2=501354
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Tue Jan 30 01:26:31 2007
@@ -329,7 +329,9 @@
<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>
</wsdlOptions>
</configuration>
<goals>
Added:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java?view=auto&rev=501354
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java
Tue Jan 30 01:26:31 2007
@@ -0,0 +1,41 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.ordered_param_holder;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
[EMAIL PROTECTED](serviceName = "ordered_param_holder",
+ portName = "ordered_param_holderSOAP",
+ targetNamespace = "http://cxf.apache.org/ordered_param_holder/",
+ endpointInterface =
"org.apache.cxf.ordered_param_holder.OrderedParamHolder")
+
+public class OrderedParamHolderImpl implements OrderedParamHolder {
+
+ public void orderedParamHolder(Holder<ComplexStruct> part3,
Holder<Integer> part2, Holder<String> part1) {
+ // TODO Auto-generated method stub
+ part2.value = new Integer(part2.value.intValue() + 1);
+ part1.value = "return " + part1.value;
+ part3.value.elem1 = "return " + part3.value.elem1;
+ part3.value.elem2 = "return " + part3.value.elem2;
+ part3.value.elem3++;
+ }
+
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/ordered_param_holder/OrderedParamHolderImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl?view=auto&rev=501354
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
(added)
+++
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
Tue Jan 30 01:26:31 2007
@@ -0,0 +1,72 @@
+<?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.
+-->
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://cxf.apache.org/ordered_param_holder/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ordered_param_holder"
+ targetNamespace="http://cxf.apache.org/ordered_param_holder/">
+ <wsdl:types>
+ <schema targetNamespace="http://cxf.apache.org/ordered_param_holder/"
+ xmlns:x1="http://cxf.apache.org/ordered_param_holder/"
+ xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
+ <complexType name="ComplexStruct">
+ <sequence>
+ <element name="elem1" type="string" />
+ <element name="elem2" type="string" />
+ <element name="elem3" type="int" />
+ </sequence>
+ </complexType>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="OrderedParamHolderResponse">
+ <wsdl:part name="Part1" type="xsd:string" />
+ <wsdl:part name="Part2" type="xsd:int" />
+ <wsdl:part name="Part3" type="tns:ComplexStruct" />
+ </wsdl:message>
+ <wsdl:message name="OrderedParamHolderRequest">
+ <wsdl:part name="Part1" type="xsd:string" />
+ <wsdl:part name="Part2" type="xsd:int" />
+ <wsdl:part name="Part3" type="tns:ComplexStruct" />
+ </wsdl:message>
+ <wsdl:portType name="ordered_param_holder">
+ <wsdl:operation name="OrderedParamHolder" parameterOrder="Part3 Part2
Part1">
+ <wsdl:input message="tns:OrderedParamHolderRequest" />
+ <wsdl:output message="tns:OrderedParamHolderResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="ordered_param_holderSOAP"
type="tns:ordered_param_holder">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="OrderedParamHolder">
+ <soap:operation
soapAction="http://cxf.apache.org/ordered_param_holder/OrderedParamHolder" />
+ <wsdl:input>
+ <soap:body
namespace="http://cxf.apache.org/ordered_param_holder/" use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
namespace="http://cxf.apache.org/ordered_param_holder/" use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ordered_param_holder">
+ <wsdl:port binding="tns:ordered_param_holderSOAP"
name="ordered_param_holderSOAP">
+ <soap:address
location="http://localhost:9002/ordered_param_holder/" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange:
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/testutils/src/main/resources/wsdl/ordered_param_holder.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml