ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/test/wsdl/echo2 deploy.wsdd echo2.wsdl Echo2PT.java Echo2ServiceTestCase.java Echo2SoapBindingImpl.java MyBase64Bean.java
Date Mon, 02 May 2005 12:06:07 GMT
dims        2005/05/02 05:06:07

  Modified:    java/test/wsdl/echo2 deploy.wsdd echo2.wsdl Echo2PT.java
                        Echo2ServiceTestCase.java Echo2SoapBindingImpl.java
                        MyBase64Bean.java
  Log:
  Additional tests from Guillaume.
  
  Revision  Changes    Path
  1.3       +0 -8      ws-axis/java/test/wsdl/echo2/deploy.wsdd
  
  Index: deploy.wsdd
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/echo2/deploy.wsdd,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- deploy.wsdd	29 Apr 2005 15:35:16 -0000	1.2
  +++ deploy.wsdd	2 May 2005 12:06:07 -0000	1.3
  @@ -43,13 +43,5 @@
           deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
         />
  -      <typeMapping
  -        xmlns:ns="urn:echo2.wsdl.test"
  -        qname="ns:Base64Type"
  -        type="java:test.wsdl.echo2.Base64Type"
  -        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
  -        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
  -        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  -      />
     </service>
   </deployment>
  
  
  
  1.3       +0 -29     ws-axis/java/test/wsdl/echo2/echo2.wsdl
  
  Index: echo2.wsdl
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/echo2/echo2.wsdl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- echo2.wsdl	29 Apr 2005 15:35:16 -0000	1.2
  +++ echo2.wsdl	2 May 2005 12:06:07 -0000	1.3
  @@ -38,11 +38,6 @@
   					<element name="varMyBase64Bean" nillable="true" maxOccurs="unbounded" type="tns:MyBase64Bean"
/>
   				</sequence>
   			</complexType>
  -			<complexType name="Base64Type">
  -				<sequence>
  -					<element name="varXsdBase64Binary" nillable="true" type="xsd:base64Binary" />
  -				</sequence>
  -			</complexType>
   		</schema>
   	</wsdl:types>
   
  @@ -74,13 +69,6 @@
   		<wsdl:part type="tns:ArrayOfString_SoapEncArray" name="return" />
   	</wsdl:message>
   
  -	<wsdl:message name="echoBase64TypeRequest">
  -		<wsdl:part type="tns:Base64Type" name="input" />
  -	</wsdl:message>
  -	<wsdl:message name="echoBase64TypeResponse">
  -		<wsdl:part type="tns:Base64Type" name="return" />
  -	</wsdl:message>
  -
   	<wsdl:portType name="Echo2PT">
   		<wsdl:operation name="echoMyBase64Bean">
   			<wsdl:input message="tns:echoMyBase64BeanRequest" name="echoMyBase64BeanRequest"
/>
  @@ -98,10 +86,6 @@
        		<wsdl:input message="tns:echoArrayOfString_SoapEncArrayRequest" name="echoArrayOfString_SoapEncArrayRequest"
/>
   			<wsdl:output message="tns:echoArrayOfString_SoapEncArrayResponse" name="echoArrayOfString_SoapEncArrayResponse"
/>
   		</wsdl:operation>
  -		<wsdl:operation name="echoBase64Type">
  -			<wsdl:input message="tns:echoBase64TypeRequest" name="echoBase64TypeRequest" />
  -			<wsdl:output message="tns:echoBase64TypeResponse" name="echoBase64TypeResponse" />
  -		</wsdl:operation>
   	</wsdl:portType>
   
   	<wsdl:binding name="Echo2SoapBinding" type="tns:Echo2PT">
  @@ -158,19 +142,6 @@
   					namespace="urn:echo2.wsdl.test" use="encoded" />
   			</wsdl:output>
   		</wsdl:operation>
  -		<wsdl:operation name="echoBase64Type">
  -			<wsdlsoap:operation soapAction="" />
  -			<wsdl:input name="echoBase64TypeRequest">
  -				<wsdlsoap:body
  -					encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  -					namespace="urn:echo2.wsdl.test" use="encoded" />
  -			</wsdl:input>
  -			<wsdl:output name="echoBase64TypeResponse">
  -				<wsdlsoap:body
  -					encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  -					namespace="urn:echo2.wsdl.test" use="encoded" />
  -			</wsdl:output>
  -		</wsdl:operation>
   	</wsdl:binding>
   	<wsdl:service name="Echo2Service">
   		<wsdl:port binding="tns:Echo2SoapBinding" name="Echo2">
  
  
  
  1.3       +0 -1      ws-axis/java/test/wsdl/echo2/Echo2PT.java
  
  Index: Echo2PT.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/echo2/Echo2PT.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Echo2PT.java	29 Apr 2005 15:35:16 -0000	1.2
  +++ Echo2PT.java	2 May 2005 12:06:07 -0000	1.3
  @@ -12,5 +12,4 @@
       public test.wsdl.echo2.MyBase64Bean[] echoArrayOfMyBase64Bean(test.wsdl.echo2.MyBase64Bean[]
input) throws java.rmi.RemoteException;
       public java.lang.String[] echoArrayOfString_MaxOccursUnbounded(java.lang.String[] input)
throws java.rmi.RemoteException;
       public java.lang.String[] echoArrayOfString_SoapEncArray(java.lang.String[] input)
throws java.rmi.RemoteException;
  -    public Base64Type echoBase64Type(Base64Type input) throws java.rmi.RemoteException;
   }
  
  
  
  1.5       +73 -27    ws-axis/java/test/wsdl/echo2/Echo2ServiceTestCase.java
  
  Index: Echo2ServiceTestCase.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/echo2/Echo2ServiceTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Echo2ServiceTestCase.java	29 Apr 2005 15:35:16 -0000	1.4
  +++ Echo2ServiceTestCase.java	2 May 2005 12:06:07 -0000	1.5
  @@ -44,38 +44,84 @@
           fillMyBase64Bean(input);
           test.wsdl.echo2.MyBase64Bean ret = binding.echoMyBase64Bean(input);
   
  -    }
  -
  -    public void test1Echo2EchoBase64Type() throws Exception {
  -        test.wsdl.echo2.Echo2SoapBindingStub binding;
  -        binding = (test.wsdl.echo2.Echo2SoapBindingStub) new test.wsdl.echo2.Echo2ServiceLocator()
  -                .getEcho2();
  -        assertNotNull("binding is null", binding);
  -        // Time out after a minute
  -        binding.setTimeout(60000);
  -
  -        // message is more clear without multiref
  -        //binding._setProperty("sendMultiRefs", Boolean.FALSE);
  -        // Test operation
  -        Base64Type input = new Base64Type(new byte[] {-127, 0, 127});
  -        //byte[] input = new byte[] {-127, 0, 127};
  -        Base64Type ret = binding.echoBase64Type(input);
  +        // Body
  +        //  echoMyBase64BeanResponse
  +        //   return HREF
  +        //  multiRef : 1 element, no child
   
  -        binding._getCall().getResponseMessage().writeTo(System.out);
           // Check message format
  +        binding._getCall().getResponseMessage().writeTo(System.out);
           SOAPBody body = (SOAPBody) binding._getCall().getResponseMessage().getSOAPBody();
   
  -        // Body
  -        //  echoBase64TypeResponse
  -        //   return HREF
  -        //  multiRef : 1 element, no child
  +        QName responseQName = new QName("urn:echo2.wsdl.test", "echoMyBase64BeanResponse");
  +        QName returnQName = new QName("", "return");
  +        QName xsdByteQName = new QName("", "varXsdByte");
  +        QName soapByteQName = new QName("", "varSoapByte");
  +        QName xsdBase64BinQName = new QName("", "varXsdBase64Binary");
  +        QName soapBase64BinQName = new QName("", "varSoapBase64Binary");
  +        QName xsdHexBinQName = new QName("", "varXsdHexBinary");
  +        QName soapBase64QName = new QName("", "varSoapBase64");
  +
  +        MessageElement response = body.getChildElement(responseQName);
  +        assertNotNull("no <ns1:echoMyBase64BeanResponse> found", response);
  +        MessageElement return1 = response.getChildElement(returnQName);
  +        assertNotNull("no <return> found", return1);
  +        MessageElement realRet = return1.getRealElement();
  +
  +        Iterator it = realRet.getChildElements(xsdByteQName);
  +        // only 1 element
  +        MessageElement one = null;
  +        while (it.hasNext()) {
  +            assertNull("only 1 element named " + xsdByteQName, one);
  +            one = (MessageElement) it.next();
  +        }
  +        assertNull(xsdByteQName + " is nil and shouldn't have any children", one.getChildren());
  +
  +        it = realRet.getChildElements(soapByteQName);
  +        // only 1 element
  +        one = null;
  +        while (it.hasNext()) {
  +            assertNull("only 1 element named " + soapByteQName, one);
  +            one = (MessageElement) it.next();
  +        }
  +        assertNull(soapByteQName + " is nil and shouldn't have any children", one.getChildren());
  +
  +        it = realRet.getChildElements(xsdBase64BinQName);
  +        // only 1 element
  +        one = null;
  +        while (it.hasNext()) {
  +            assertNull("only 1 element named " + xsdBase64BinQName, one);
  +            one = (MessageElement) it.next();
  +        }
  +        assertEquals(xsdBase64BinQName + " have wrong value", "fwCB", one.getFirstChild().getNodeValue());
  +
  +        it = realRet.getChildElements(soapBase64BinQName);
  +        // only 1 element
  +        one = null;
  +        while (it.hasNext()) {
  +            assertNull("only 1 element named " + soapBase64BinQName, one);
  +            one = (MessageElement) it.next();
  +        }
  +        assertEquals(soapBase64BinQName + " have wrong value", "fwCB", one.getFirstChild().getNodeValue());
  +
  +        it = realRet.getChildElements(xsdHexBinQName);
  +        // only 1 element
  +        one = null;
  +        while (it.hasNext()) {
  +            assertNull("only 1 element named " + xsdHexBinQName, one);
  +            one = (MessageElement) it.next();
  +        }
  +        assertEquals(xsdHexBinQName + " have wrong value", "7f0081", one.getFirstChild().getNodeValue());
  +
  +        it = realRet.getChildElements(soapBase64QName);
  +        // only 1 element
  +        one = null;
  +        while (it.hasNext()) {
  +            assertNull("only 1 element named " + soapBase64QName, one);
  +            one = (MessageElement) it.next();
  +        }
  +        assertEquals(soapBase64QName + " have wrong value", "fwCB", one.getFirstChild().getNodeValue());
   
  -        MessageElement element = body.getChildElement(new QName("", "multiRef"));
  -        assertNotNull("no multiRef found", element);
  -        MessageElement base64 = element.getChildElement(new QName("", "varXsdBase64Binary"));
  -        assertNotNull("no varXsdBase64Binary found", base64);
  -        assertNotNull("<varXsdBase64Binary> must have 1 and only 1 TextNode subelement",
base64.getChildren());
  -        assertEquals("<varXsdBase64Binary> should have only 1 children : the TextNode",
1, base64.getChildren().size());
       }
   
       public void test1Echo2EchoArrayOfMyBase64Bean() throws Exception {
  
  
  
  1.3       +0 -3      ws-axis/java/test/wsdl/echo2/Echo2SoapBindingImpl.java
  
  Index: Echo2SoapBindingImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/echo2/Echo2SoapBindingImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Echo2SoapBindingImpl.java	29 Apr 2005 15:35:16 -0000	1.2
  +++ Echo2SoapBindingImpl.java	2 May 2005 12:06:07 -0000	1.3
  @@ -24,8 +24,5 @@
       public java.lang.String[] echoArrayOfString_SoapEncArray(java.lang.String[] input)
throws java.rmi.RemoteException {
           return input;
       }
  -    public Base64Type echoBase64Type(Base64Type input) throws RemoteException {
  -        return input;
  -    }
   
   }
  
  
  
  1.3       +4 -4      ws-axis/java/test/wsdl/echo2/MyBase64Bean.java
  
  Index: MyBase64Bean.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/echo2/MyBase64Bean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MyBase64Bean.java	29 Apr 2005 15:35:16 -0000	1.2
  +++ MyBase64Bean.java	2 May 2005 12:06:07 -0000	1.3
  @@ -148,19 +148,19 @@
        * Sets the varSoapBase64 value for this MyBase64Bean.
        *
        * @param varSoapBase64
  -     */
  +     *//*
       public void setVarSoapBase64(int i, byte varSoapBase64) {
           this.varSoapBase64[i] = varSoapBase64;
  -    }
  +    }*/
   
       /**
        * Gets the varSoapBase64 value for this MyBase64Bean.
        *
        * @return varSoapBase64
  -     */
  +     *//*
       public byte getVarSoapBase64(int i) {
           return varSoapBase64[i];
  -    }
  +    }*/
   
   
       /**
  
  
  

Mime
View raw message