You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/05/02 18:59:19 UTC
cvs commit: ws-axis/java/test/wsdl/marshall3/types QNameArrayTest.java QNameArrayTestResponse.java
dims 2005/05/02 09:59:19
Modified: java/test/wsdl/marshall3 marshall3.wsdl
Marshall3TestPort1SoapBindingImpl.java
MarshallTestServiceTestCase.java
Added: java/test/wsdl/marshall3/types QNameArrayTest.java
QNameArrayTestResponse.java
Log:
more tests from Guillaume. Thanks Guillaume.
Revision Changes Path
1.2 +45 -8 ws-axis/java/test/wsdl/marshall3/marshall3.wsdl
Index: marshall3.wsdl
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall3/marshall3.wsdl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- marshall3.wsdl 29 Apr 2005 18:48:16 -0000 1.1
+++ marshall3.wsdl 2 May 2005 16:59:19 -0000 1.2
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions xmlns:impl="http://marshalltestservice.org/"
- xmlns:intf="http://marshalltestservice.org/"
- xmlns:tns1="http://marshalltestservice.org/types"
- xmlns:tns2="http://marshalltestservice.org/types2"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+<wsdl:definitions xmlns:impl="http://marshalltestservice.org/"
+ xmlns:intf="http://marshalltestservice.org/"
+ xmlns:tns1="http://marshalltestservice.org/types"
+ xmlns:tns2="http://marshalltestservice.org/types2"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://marshalltestservice.org/">
<wsdl:types>
<schema targetNamespace="http://marshalltestservice.org/types" xmlns="http://www.w3.org/2001/XMLSchema">
@@ -30,6 +30,21 @@
<element name="StringArray" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
+ <complexType name="QNameArrayTest">
+ <sequence>
+ <element name="qnameArray_1" type="QName"
+ nillable="true" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+ <complexType name="QNameArrayTestResponse">
+ <sequence>
+ <element name="result" type="QName" nillable="true"
+ minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+
+ <element name="QNameArrayTest" type="tns1:QNameArrayTest"/>
+ <element name="QNameArrayTestResponse" type="tns1:QNameArrayTestResponse"/>
<element name="ShortArrayTest" type="tns1:ShortArrayTest"/>
<element name="ShortArrayTestResponse" type="tns1:ShortArrayTestResponse"/>
<element name="StringArrayTest" type="tns1:StringArrayTest"/>
@@ -60,6 +75,13 @@
<message name="FooShortListTypeResponse">
<part name="fooShortListTypeResponse" element="tns2:FooShortListType"/>
</message>
+ <message name="MarshallTest_qnameArrayTest">
+ <part name="parameters" element="tns1:QNameArrayTest" />
+ </message>
+ <message name="MarshallTest_qnameArrayTestResponse">
+ <part name="result" element="tns1:QNameArrayTestResponse" />
+ </message>
+
<portType name="MarshallTest">
<operation name="shortArrayTest">
<input message="impl:MarshallTest_shortArrayTest"/>
@@ -73,6 +95,11 @@
<input message="impl:FooShortListTypeRequest"/>
<output message="impl:FooShortListTypeResponse"/>
</operation>
+ <operation name="qnameArrayTest">
+ <input message="impl:MarshallTest_qnameArrayTest" />
+ <output message="impl:MarshallTest_qnameArrayTestResponse" />
+ </operation>
+
</portType>
<binding name="Marshall3TestPort1SoapBinding" type="impl:MarshallTest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
@@ -103,6 +130,16 @@
<soap:body use="literal"/>
</output>
</operation>
+ <operation name="qnameArrayTest">
+ <soap:operation/>
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+
</binding>
<service name="MarshallTestService">
<port name="Marshall3TestPort1" binding="impl:Marshall3TestPort1SoapBinding">
1.2 +10 -0 ws-axis/java/test/wsdl/marshall3/Marshall3TestPort1SoapBindingImpl.java
Index: Marshall3TestPort1SoapBindingImpl.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall3/Marshall3TestPort1SoapBindingImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Marshall3TestPort1SoapBindingImpl.java 29 Apr 2005 18:48:16 -0000 1.1
+++ Marshall3TestPort1SoapBindingImpl.java 2 May 2005 16:59:19 -0000 1.2
@@ -7,6 +7,9 @@
package test.wsdl.marshall3;
+import java.rmi.RemoteException;
+import test.wsdl.marshall3.types.QNameArrayTest;
+import test.wsdl.marshall3.types.QNameArrayTestResponse;
import test.wsdl.marshall3.types.ShortArrayTest;
import test.wsdl.marshall3.types.ShortArrayTestResponse;
import test.wsdl.marshall3.types.StringArrayTest;
@@ -21,6 +24,13 @@
return new StringArrayTestResponse(parameters.getStringArray());
}
+ public QNameArrayTestResponse qnameArrayTest(QNameArrayTest parameters) throws java.rmi.RemoteException {
+ if (parameters.getQnameArray().length != 3) {
+ throw new java.rmi.RemoteException("Array size mismatch");
+ }
+ return new QNameArrayTestResponse(parameters.getQnameArray());
+ }
+
public short[] echoShortListTypeTest(short[] fooShortListTypeRequest) throws java.rmi.RemoteException {
return fooShortListTypeRequest;
}
1.2 +33 -0 ws-axis/java/test/wsdl/marshall3/MarshallTestServiceTestCase.java
Index: MarshallTestServiceTestCase.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall3/MarshallTestServiceTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MarshallTestServiceTestCase.java 29 Apr 2005 18:48:16 -0000 1.1
+++ MarshallTestServiceTestCase.java 2 May 2005 16:59:19 -0000 1.2
@@ -7,6 +7,9 @@
package test.wsdl.marshall3;
+import javax.xml.namespace.QName;
+import test.wsdl.marshall3.types.QNameArrayTest;
+import test.wsdl.marshall3.types.QNameArrayTestResponse;
import test.wsdl.marshall3.types.ShortArrayTest;
import test.wsdl.marshall3.types.ShortArrayTestResponse;
import test.wsdl.marshall3.types.StringArrayTest;
@@ -62,6 +65,36 @@
assertEquals(6,value.getStringArray().length);
}
+ public void test2Marshall3TestPort1QnameArrayTest() throws Exception {
+ test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
+ try {
+ binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
+ new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ QNameArrayTestResponse value = null;
+ QName[] qnames= new QName[3];
+ qnames[0] = new QName("urn:someNamespaceURI", "localPart");
+ qnames[1] = new QName("localPartWithoutNS");
+ qnames[2] = null;
+ value = binding.qnameArrayTest(new QNameArrayTest(qnames));
+ // TBD - validate results
+ assertEquals("wrong array size", 3, value.getQnameArray().length);
+ assertEquals("qnames[0] not equals", new QName("urn:someNamespaceURI", "localPart"), value.getQnameArray()[0]);
+ assertEquals("qnames[1] not equals", new QName("localPartWithoutNS"), value.getQnameArray()[1]);
+ assertEquals("qnames[2] not equals", null, value.getQnameArray()[2]);
+ }
+
public void test3Marshall3TestPort1EchoShortListTypeTest() throws Exception {
test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
try {
1.1 ws-axis/java/test/wsdl/marshall3/types/QNameArrayTest.java
Index: QNameArrayTest.java
===================================================================
/**
* StringArrayTest.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
*/
package test.wsdl.marshall3.types;
import javax.xml.namespace.QName;
public class QNameArrayTest implements java.io.Serializable {
private QName[] qnameArray;
public QNameArrayTest() {
}
public QNameArrayTest(QName[] qnameArray) {
this.qnameArray = qnameArray;
}
/**
* Gets the stringArray value for this StringArrayTest.
*
* @return stringArray
*/
public QName[] getQnameArray() {
return qnameArray;
}
/**
* Sets the stringArray value for this StringArrayTest.
*
* @param stringArray
*/
public void setQnameArray(QName[] qnameArray) {
this.qnameArray = qnameArray;
}
}
1.1 ws-axis/java/test/wsdl/marshall3/types/QNameArrayTestResponse.java
Index: QNameArrayTestResponse.java
===================================================================
/**
* StringArrayTestResponse.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
*/
package test.wsdl.marshall3.types;
import javax.xml.namespace.QName;
public class QNameArrayTestResponse implements java.io.Serializable {
private QName[] qnameArray;
public QNameArrayTestResponse() {
}
public QNameArrayTestResponse(
QName[] qnameArray) {
this.qnameArray = qnameArray;
}
/**
* Gets the stringArray value for this StringArrayTestResponse.
*
* @return stringArray
*/
public QName[] getQnameArray() {
return qnameArray;
}
/**
* Sets the stringArray value for this StringArrayTestResponse.
*
* @param stringArray
*/
public void setQnameArray(QName[] qnameArray) {
this.qnameArray = qnameArray;
}
}