dims 2002/10/09 05:24:27 Modified: java/test/wsdl/interop4/groupi round4XSD.wsdl Round4XSDTestSoapImpl.java Round4XSDTestTestCase.java Log: Updates to Round4 Impl and testcase. Revision Changes Path 1.3 +23 -241 xml-axis/java/test/wsdl/interop4/groupi/round4XSD.wsdl Index: round4XSD.wsdl =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupi/round4XSD.wsdl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- round4XSD.wsdl 8 Oct 2002 03:31:35 -0000 1.2 +++ round4XSD.wsdl 9 Oct 2002 12:24:27 -0000 1.3 @@ -296,21 +296,21 @@ </s:sequence> </s:complexType> </s:element> - <s:element name="RetAnyType"> + <s:element name="echoAnyType"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="inputAnyType" /> </s:sequence> </s:complexType> </s:element> - <s:element name="RetAnyTypeResponse"> + <s:element name="echoAnyTypeResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="return" /> </s:sequence> </s:complexType> </s:element> - <s:element name="RetAny"> + <s:element name="echoAnyElement"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="inputAny"> @@ -323,7 +323,7 @@ </s:sequence> </s:complexType> </s:element> - <s:element name="RetAnyResponse"> + <s:element name="echoAnyElementResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="return"> @@ -549,17 +549,17 @@ <message name="echoEnumSoapOut"> <part name="parameters" element="s0:echoEnumResponse" /> </message> - <message name="RetAnyTypeSoapIn"> - <part name="parameters" element="s0:RetAnyType" /> + <message name="echoAnyTypeSoapIn"> + <part name="parameters" element="s0:echoAnyType" /> </message> - <message name="RetAnyTypeSoapOut"> - <part name="parameters" element="s0:RetAnyTypeResponse" /> + <message name="echoAnyTypeSoapOut"> + <part name="parameters" element="s0:echoAnyTypeResponse" /> </message> - <message name="RetAnySoapIn"> - <part name="parameters" element="s0:RetAny" /> + <message name="echoAnyElementSoapIn"> + <part name="parameters" element="s0:echoAnyElement" /> </message> - <message name="RetAnySoapOut"> - <part name="parameters" element="s0:RetAnyResponse" /> + <message name="echoAnyElementSoapOut"> + <part name="parameters" element="s0:echoAnyElementResponse" /> </message> <message name="echoVoidSoapHeaderSoapIn"> <part name="parameters" element="s2:echoVoidSoapHeader" /> @@ -660,13 +660,13 @@ <input message="s0:echoEnumSoapIn" /> <output message="s0:echoEnumSoapOut" /> </operation> - <operation name="RetAnyType"> - <input message="s0:RetAnyTypeSoapIn" /> - <output message="s0:RetAnyTypeSoapOut" /> - </operation> - <operation name="RetAny"> - <input message="s0:RetAnySoapIn" /> - <output message="s0:RetAnySoapOut" /> + <operation name="echoAnyType"> + <input message="s0:echoAnyTypeSoapIn" /> + <output message="s0:echoAnyTypeSoapOut" /> + </operation> + <operation name="echoAnyElement"> + <input message="s0:echoAnyElementSoapIn" /> + <output message="s0:echoAnyElementSoapOut" /> </operation> <operation name="echoVoidSoapHeader"> <input message="s0:echoVoidSoapHeaderSoapIn" /> @@ -855,8 +855,8 @@ <soap:body use="literal" /> </output> </operation> - <operation name="RetAnyType"> - <soap:operation soapAction="http://soapinterop.org/RetAnyType" style="document" /> + <operation name="echoAnyType"> + <soap:operation soapAction="http://soapinterop.org/echoAnyType" style="document" /> <input> <soap:body use="literal" /> </input> @@ -864,8 +864,8 @@ <soap:body use="literal" /> </output> </operation> - <operation name="RetAny"> - <soap:operation soapAction="http://soapinterop.org/RetAny" style="document" /> + <operation name="echoAnyElement"> + <soap:operation soapAction="http://soapinterop.org/echoAnyElement" style="document" /> <input> <soap:body use="literal" /> </input> @@ -887,231 +887,13 @@ </output> </operation> </binding> - <binding name="Round4XSDTestSoap12" type="s0:Round4XSDTestSoap"> - <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <operation name="echoVoid"> - <soap12:operation soapAction="http://soapinterop.org/echoVoid" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoInteger"> - <soap12:operation soapAction="http://soapinterop.org/echoInteger" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoFloat"> - <soap12:operation soapAction="http://soapinterop.org/echoFloat" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoString"> - <soap12:operation soapAction="http://soapinterop.org/echoString" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoBase64"> - <soap12:operation soapAction="http://soapinterop.org/echoBase64" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoDate"> - <soap12:operation soapAction="http://soapinterop.org/echoDate" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoComplexType"> - <soap12:operation soapAction="http://soapinterop.org/echoComplexType" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoIntegerMultiOccurs"> - <soap12:operation soapAction="http://soapinterop.org/echoIntegerMultiOccurs" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoFloatMultiOccurs"> - <soap12:operation soapAction="http://soapinterop.org/echoFloatMultiOccurs" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoStringMultiOccurs"> - <soap12:operation soapAction="http://soapinterop.org/echoStringMultiOccurs" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoComplexTypeMultiOccurs"> - <soap12:operation soapAction="http://soapinterop.org/echoComplexTypeMultiOccurs" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoDecimal"> - <soap12:operation soapAction="http://soapinterop.org/echoDecimal" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoBoolean"> - <soap12:operation soapAction="http://soapinterop.org/echoBoolean" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoHexBinary"> - <soap12:operation soapAction="http://soapinterop.org/echoHexBinary" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoComplexTypeAsSimpleTypes"> - <soap12:operation soapAction="http://soapinterop.org/echoComplexTypeAsSimpleTypes" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoSimpleTypesAsComplexType"> - <soap12:operation soapAction="http://soapinterop.org/echoSimpleTypesAsComplexType" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoNestedComplexType"> - <soap12:operation soapAction="http://soapinterop.org/echoNestedComplexType" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoNestedMultiOccurs"> - <soap12:operation soapAction="http://soapinterop.org/echoNestedMultiOccurs" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoChoice"> - <soap12:operation soapAction="http://soapinterop.org/echoChoice" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoEnum"> - <soap12:operation soapAction="http://soapinterop.org/echoEnum" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="RetAnyType"> - <soap12:operation soapAction="http://soapinterop.org/RetAnyType" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="RetAny"> - <soap12:operation soapAction="http://soapinterop.org/RetAny" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - <operation name="echoVoidSoapHeader"> - <soap12:operation soapAction="http://soapinterop.org" style="document" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <input> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <soap12:header message="s0:echoVoidSoapHeaderechoMeComplexTypeRequest" part="echoMeComplexTypeRequest" use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <soap12:header message="s0:echoVoidSoapHeaderechoMeStringRequest" part="echoMeStringRequest" use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </input> - <output> - <soap12:body use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <soap12:header message="s0:echoVoidSoapHeaderechoMeComplexTypeResponse" part="echoMeComplexTypeResponse" use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - <soap12:header message="s0:echoVoidSoapHeaderechoMeStringResponse" part="echoMeStringResponse" use="literal" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> - </output> - </operation> - </binding> <service name="Round4XSDTest"> <documentation>These operations implement DOC/LIT SOAP operations, for interop testing. Please email [EMAIL PROTECTED] with any questions/coments.</documentation> <port name="Round4XSDTestSoap" binding="s0:Round4XSDTestSoap"> <!-- - <soap:address location="http://www.whitemesa.net/interop/r4/wsdl-xsd" /> <soap:address location="http://mssoapinterop.org/asmx/xsd/round4xsd.asmx" /> --> <soap:address location="http://localhost:8080/axis/services/Round4XSDTestSoap" /> - </port> - <port name="Round4XSDTestSoap12" binding="s0:Round4XSDTestSoap12"> - <soap12:address location="http://mssoapinterop.org/asmx/xsd/round4xsd.asmx" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" /> </port> </service> </definitions> 1.3 +18 -4 xml-axis/java/test/wsdl/interop4/groupi/Round4XSDTestSoapImpl.java Index: Round4XSDTestSoapImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupi/Round4XSDTestSoapImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Round4XSDTestSoapImpl.java 8 Oct 2002 03:31:35 -0000 1.2 +++ Round4XSDTestSoapImpl.java 9 Oct 2002 12:24:27 -0000 1.3 @@ -7,7 +7,14 @@ package test.wsdl.interop4.groupi; -public class Round4XSDTestSoapImpl implements test.wsdl.interop4.groupi.Round4XSDTestSoap { +import org.apache.axis.MessageContext; +import org.apache.axis.Message; +import org.apache.axis.message.SOAPHeaderElement; + +import java.util.Vector; +import java.util.Iterator; + +public class Round4XSDTestSoapImpl implements test.wsdl.interop4.groupi.Round4XSDTestSoap{ public void echoVoid() throws java.rmi.RemoteException { return; } @@ -94,17 +101,24 @@ return inputEnum; } - public java.lang.Object retAnyType(java.lang.Object inputAnyType) throws java.rmi.RemoteException { + public java.lang.Object echoAnyType(java.lang.Object inputAnyType) throws java.rmi.RemoteException { return inputAnyType; } - public test.wsdl.interop4.groupi._return retAny(test.wsdl.interop4.groupi.InputAny inputAny) throws java.rmi.RemoteException { + public test.wsdl.interop4.groupi._return echoAnyElement(test.wsdl.interop4.groupi.InputAny inputAny) throws java.rmi.RemoteException { test.wsdl.interop4.groupi._return output = new test.wsdl.interop4.groupi._return(); output.set_any(inputAny.get_any()); return output; } public void echoVoidSoapHeader() throws java.rmi.RemoteException { + MessageContext context = MessageContext.getCurrentContext(); + Message request = context.getRequestMessage(); + Message response = context.getResponseMessage(); + Vector headers = request.getSOAPEnvelope().getHeaders(); + for (int i=0;i<headers.size();i++) { + SOAPHeaderElement header = (SOAPHeaderElement)headers.get(i); + response.getSOAPEnvelope().addHeader(header); + } } - } 1.3 +7 -2 xml-axis/java/test/wsdl/interop4/groupi/Round4XSDTestTestCase.java Index: Round4XSDTestTestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupi/Round4XSDTestTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Round4XSDTestTestCase.java 8 Oct 2002 03:31:35 -0000 1.2 +++ Round4XSDTestTestCase.java 9 Oct 2002 12:24:27 -0000 1.3 @@ -38,6 +38,7 @@ binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(url); } catch (javax.xml.rpc.ServiceException jre) { + jre.printStackTrace(); if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); @@ -210,6 +211,10 @@ input.set_int(input2); int[] value = null; value = binding.echoIntegerMultiOccurs(input); + assertEquals(input2.length, value.length); + for(int i=0;i<input2.length;i++) { + assertEquals("EchoIntegerMultiOccurs: Array values don't match", input2[i], value[i]); + } assertTrue("Array values don't match", Arrays.equals(input2, value)); } catch (java.rmi.RemoteException re) { @@ -548,7 +553,7 @@ try { java.lang.Object input = new java.lang.String("Hello World"); java.lang.Object value = null; - value = binding.retAnyType(input); + value = binding.echoAnyType(input); assertEquals(value, input); } catch (java.rmi.RemoteException re) { @@ -574,7 +579,7 @@ _any[0] = new org.apache.axis.message.MessageElement("hello", "world"); input.set_any(_any); test.wsdl.interop4.groupi._return value = null; - value = binding.retAny(input); + value = binding.echoAnyElement(input); assertEquals(value.get_any()[0].toString(), _any[0].toString()); } catch (java.rmi.RemoteException re) {