dims 2005/05/13 07:07:23
Modified: java/test/wsdl/marshall MarshallBindingImpl.java
MarshallTestCase.java marshall.wsdl
Log:
one more test case from Guillaume
Revision Changes Path
1.4 +5 -0 ws-axis/java/test/wsdl/marshall/MarshallBindingImpl.java
Index: MarshallBindingImpl.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall/MarshallBindingImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MarshallBindingImpl.java 4 May 2005 19:41:34 -0000 1.3
+++ MarshallBindingImpl.java 13 May 2005 14:07:23 -0000 1.4
@@ -27,6 +27,11 @@
public String[] arrayOfXsdString(String[] parameter) throws java.rmi.RemoteException
{
return parameter;
}
+
+ public String[][] arrayOfArrayOfSoapEncString(String[][] parameter) throws java.rmi.RemoteException
{
+ return parameter;
+ }
+
public byte[][] arrayOfbase64Binary(byte[][] parameter) throws java.rmi.RemoteException
{
return parameter;
}
1.7 +53 -0 ws-axis/java/test/wsdl/marshall/MarshallTestCase.java
Index: MarshallTestCase.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall/MarshallTestCase.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MarshallTestCase.java 11 May 2005 15:01:48 -0000 1.6
+++ MarshallTestCase.java 13 May 2005 14:07:23 -0000 1.7
@@ -336,6 +336,59 @@
innerTypeString);
}
+ public void test12MarshallPortArrayOfArrayOfSoapEncString() throws Exception {
+ test.wsdl.marshall.MarshallBindingStub binding;
+ try {
+ binding = (test.wsdl.marshall.MarshallBindingStub) new test.wsdl.marshall.MarshallLocator()
+ .getMarshallPort();
+ } 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
+ String[] v1 = new String[] { "a1", "a2", "", null, "a5", null};
+ String[] v2 = new String[] { "b1", "b2", "", null, "b5", null };
+ String[] v3 = new String[] { "c1", "c2", "", null, "c5", null };
+ String[][] value = new String[][] {v1, v2, v3};
+ String[][] ret = null;
+ ret = binding.arrayOfArrayOfSoapEncString(value);
+ QName responseQName = new QName("http://marshall.wsdl.test",
+ "ArrayOfArrayOfSoapEncStringResponse");
+ QName returnQName = new QName("return");
+ Message m = binding._getCall().getResponseMessage();
+
+ SOAPBody body = (SOAPBody) m.getSOAPBody();
+ MessageElement response = body.getChildElement(responseQName);
+ MessageElement returnE = response.getChildElement(returnQName);
+ String arrayType = returnE.getAttributeNS(
+ "http://schemas.xmlsoap.org/soap/encoding/", "arrayType");
+ assertEquals("wrong array type", "ns2:ArrayOfSoapEncString[3]", arrayType);
+
+
+ for (Iterator it = response.getChildElements(returnQName); it.hasNext();) {
+ returnE = (MessageElement) it.next();
+ arrayType = returnE.getAttributeNS(
+ "http://schemas.xmlsoap.org/soap/encoding/", "arrayType");
+ assertEquals("wrong array type", "soapenc:string[6]", arrayType);
+
+
+ for (Iterator it2 = response.getChildElements(returnQName); it2.hasNext();)
{
+ returnE = (MessageElement) it2.next();
+ String xsiType = returnE.getAttributeNS(
+ "http://www.w3.org/2001/XMLSchema", "type");
+ assertEquals("wrong xsi type", "soapenc:string", xsiType);
+
+
+ }
+ }
+ // TBD - validate results
+ }
+
/**
* @param m
*/
1.4 +31 -0 ws-axis/java/test/wsdl/marshall/marshall.wsdl
Index: marshall.wsdl
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall/marshall.wsdl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- marshall.wsdl 4 May 2005 19:41:34 -0000 1.3
+++ marshall.wsdl 13 May 2005 14:07:23 -0000 1.4
@@ -47,6 +47,15 @@
</complexContent>
</complexType>
+ <!-- Multi Array -->
+ <complexType name="ArrayOfArrayOfSoapEncString">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:ArrayOfSoapEncString[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
<complexType name="ArrayOfbase64Binary">
<complexContent>
<restriction base="soapenc:Array">
@@ -130,6 +139,13 @@
<wsdl:part name="return" type="tns1:ArrayOfXsdString"/>
</wsdl:message>
+ <wsdl:message name="ArrayOfArrayOfSoapEncStringRequest">
+ <wsdl:part name="parameter" type="tns1:ArrayOfArrayOfSoapEncString"/>
+ </wsdl:message>
+ <wsdl:message name="ArrayOfArrayOfSoapEncStringResponse">
+ <wsdl:part name="return" type="tns1:ArrayOfArrayOfSoapEncString"/>
+ </wsdl:message>
+
<wsdl:message name="ArrayOfbase64BinaryRequest">
@@ -199,6 +215,11 @@
<wsdl:output name="ArrayOfXsdStringResponse" message="impl:ArrayOfXsdStringResponse"/>
</wsdl:operation>
+ <wsdl:operation name="ArrayOfArrayOfSoapEncString" parameterOrder="parameter">
+ <wsdl:input name="ArrayOfArrayOfSoapEncStringRequest" message="impl:ArrayOfArrayOfSoapEncStringRequest"/>
+ <wsdl:output name="ArrayOfArrayOfSoapEncStringResponse" message="impl:ArrayOfArrayOfSoapEncStringResponse"/>
+ </wsdl:operation>
+
<wsdl:operation name="ArrayOfbase64Binary" parameterOrder="parameter">
<wsdl:input name="ArrayOfbase64BinaryRequest" message="impl:ArrayOfbase64BinaryRequest"/>
<wsdl:output name="ArrayOfbase64BinaryResponse" message="impl:ArrayOfbase64BinaryResponse"/>
@@ -273,6 +294,16 @@
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="ArrayOfArrayOfSoapEncString">
+ <wsdlsoap:operation/>
+ <wsdl:input>
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://marshall.wsdl.test"/>
+ </wsdl:input>
+ <wsdl:output>
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://marshall.wsdl.test"/>
+ </wsdl:output>
+ </wsdl:operation>
+
<wsdl:operation name="ArrayOfbase64Binary">
<wsdlsoap:operation/>
<wsdl:input>
|