You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wh...@apache.org on 2005/06/11 23:44:59 UTC

cvs commit: ws-axis/c/tests/auto_build/testcases/output MultiOut.expected MultiOutServerResponse.expected

whitlock    2005/06/11 14:44:59

  Modified:    c/build  executeTest.xml
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        ClientStubWriter.java
               c/tests/auto_build/testcases/client/cpp MultiOutClient.cpp
               c/tests/auto_build/testcases/output MultiOut.expected
                        MultiOutServerResponse.expected
  Log:
  AXISCPP-679 Return data correctly from multiple output parameters. This also fixes the MultiOut unit test that tests out multiple output parameters. Only primitives are tested at present by MultiOut. This test should be extended to test arrays, complex types, etc. Also fixed is making the mock server listen on 9080 instead of 9081.
  
  Revision  Changes    Path
  1.29      +2 -2      ws-axis/c/build/executeTest.xml
  
  Index: executeTest.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/build/executeTest.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- executeTest.xml	10 Jun 2005 12:44:54 -0000	1.28
  +++ executeTest.xml	11 Jun 2005 21:44:59 -0000	1.29
  @@ -151,7 +151,7 @@
   		<java classname="org.apache.test.MockServer"
   			outputproperty="mockServer.out">
   <!--			<arg line="-p ${test.port}" /> -->
  -				<arg line="-p 9081" />
  +				<arg line="-p 9080" />
   			<arg line="-r &quot;${response_expected.file}&quot;" />
   			<classpath>
   				<pathelement
  @@ -176,7 +176,7 @@
   	<target name="stopMockServer">
   		<java classname="org.apache.test.StopMockServer" outputproperty="stopMockServer.out">
   <!--			<arg line="-p ${test.port}" />			-->
  -				<arg line="-p 9081" />
  +				<arg line="-p 9080" />
   			<classpath>
   				<pathelement
   					location="${dir.obj}/test/monitor/monitor.jar" />
  
  
  
  1.89      +24 -21    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- ClientStubWriter.java	3 Jun 2005 08:55:39 -0000	1.88
  +++ ClientStubWriter.java	11 Jun 2005 21:44:59 -0000	1.89
  @@ -777,14 +777,7 @@
   		    typeisarray = false;
   		}
   		typeissimple = CUtils.isSimpleType (currentParaType);
  -		
  -		//Chinthana:
  -		//Changes have done for handle AXIS_OUT_PARAM Types.
  -		if (CUtils.isPointerType(currentParaType))
  -			currentParamName = "*OutValue" + i;
  -		else
  -			currentParamName = "OutValue" + i;
  -		//10/05/2005.................................................
  +		currentParamName = "*OutValue" + i;
   		
   		// Some code need to be merged as we have some duplicated in coding here.
   		if (typeisarray)
  @@ -795,8 +788,10 @@
   		    if (CUtils.isSimpleType (qname))
   		    {
   			containedType = CUtils.getclass4qname (qname);
  -			writer.write ("\t\t\t" + currentParamName + " = (" + currentParaType + "&)m_pCall->getBasicArray(" + CUtils.getXSDTypeForBasicType (containedType) + ", \"" + currentType.getParamName ()	//getElementName().getLocalPart()
  -				      + "\", 0);\n");
  +			writer.write ("\t\t\t" + currentParamName + " = (" + currentParaType 
  +				+ "&)m_pCall->getBasicArray(" + CUtils.getXSDTypeForBasicType (containedType) 
  +				+ ", \"" + currentType.getParamName ()	//getElementName().getLocalPart()
  +				+ "\", 0);\n");
   		    }
   		    else
   		    {
  @@ -842,16 +837,24 @@
   
   		    if (typeissimple)
   		    {
  -			writer.write ("\t\t\t"
  +			if (CUtils.isPointerType(currentParaType))
  +			{
  +				writer.write ("\t\t\t"
   				      + currentParamName
   				      + " = m_pCall->"
  -				      +
  -				      CUtils.
  -				      getParameterGetValueMethodName
  -				      (currentParaType,
  -				       false) + "(\"" +
  -				      currentType.getParamName () +
  -				      "\", 0);\n");
  +				      + CUtils.getParameterGetValueMethodName(currentParaType,false) 
  +					+ "(\"" + currentType.getParamName () 
  +					+ "\", 0);\n");
  +			}
  +			else 
  +			{
  +				writer.write ("\t\t\t"
  +				      + currentParamName
  +				      + " = *(m_pCall->"
  +				      + CUtils.getParameterGetValueMethodName(currentParaType,false) 
  +					+ "(\"" + currentType.getParamName () 
  +					+ "\", 0));\n");
  +			}
   		    }
   		    else
   		    {
  @@ -861,7 +864,7 @@
   			    //for anyTtype 
   			    writer.write ("\t\t\t"
   					  + currentParamName
  -					  + " = ("
  +					  + " = *("
   					  + currentParaType
   					  + "*)m_pCall->getAnyObject();\n");
   			}
  @@ -874,7 +877,7 @@
   			    {
   				writer.write ("\t\t\t"
   					      + currentParamName
  -					      + " = ("
  +					      + " = *("
   					      + currentParaType
   					      +
   					      ")m_pCall->getCmplxObject((void*) Axis_DeSerialize_"
  @@ -891,7 +894,7 @@
   			    else
   				writer.write ("\t\t\t"
   					      + currentParamName
  -					      + " = ("
  +					      + " = *("
   					      + currentParaType
   					      +
   					      "*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_"
  
  
  
  1.2       +3 -2      ws-axis/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp
  
  Index: MultiOutClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultiOutClient.cpp	10 Jun 2005 15:33:39 -0000	1.1
  +++ MultiOutClient.cpp	11 Jun 2005 21:44:59 -0000	1.2
  @@ -52,9 +52,10 @@
   				&OutValue8,
   				&OutValue9);
   
  -			char sInteger[128], sLong[128];
  +			char sInteger[128], sLong[128], *sBool;
   			sprintf(sInteger,"%I64d",OutValue1);
   			sprintf(sLong,"%I64d",OutValue3);
  +			sBool = (OutValue8==false_)?"false":"true";
   
   			cout << OutValue0 << endl;
   			cout << sInteger << endl;
  @@ -64,7 +65,7 @@
   			cout << OutValue5 << endl;
   			cout << OutValue6 << endl;
   			cout << OutValue7 << endl;
  -			cout << OutValue8 << endl;
  +			cout << sBool << endl;
   			cout << OutValue9 << endl;
   			bSuccess = true;
   		}
  
  
  
  1.2       +10 -1     ws-axis/c/tests/auto_build/testcases/output/MultiOut.expected
  
  Index: MultiOut.expected
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/MultiOut.expected,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultiOut.expected	10 Jun 2005 15:33:39 -0000	1.1
  +++ MultiOut.expected	11 Jun 2005 21:44:59 -0000	1.2
  @@ -1,2 +1,11 @@
  -5
  +Hello Mark
  +23
  +23
  +23
  +23
  +23
  +23.1
  +23.1
  +true
  +A
   ---------------------- TEST COMPLETE -----------------------------
  
  
  
  1.2       +1 -1      ws-axis/c/tests/auto_build/testcases/output/MultiOutServerResponse.expected
  
  Index: MultiOutServerResponse.expected
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/MultiOutServerResponse.expected,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultiOutServerResponse.expected	10 Jun 2005 15:33:39 -0000	1.1
  +++ MultiOutServerResponse.expected	11 Jun 2005 21:44:59 -0000	1.2
  @@ -6,6 +6,6 @@
   
   ###
   <?xml version="1.0" encoding="utf-8"?>
  -<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body><get xmlns="http://localhost/axis/MultiOut"><out1>Hello Mark</out1><out14>23</out14><out15>23</out15><out16>23</out16><out17>23</out17><out18>23</out18><out19>23.1</out19><out20>23.1</out20><out21>1</out21><out22>23</out22></get></soapenv:Body></soapenv:Envelope>
  +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body><get xmlns="http://localhost/axis/MultiOut"><out1>Hello Mark</out1><out14>23</out14><out15>23</out15><out16>23</out16><out17>23</out17><out18>23</out18><out19>23.1</out19><out20>23.1</out20><out21>1</out21><out22>65</out22></get></soapenv:Body></soapenv:Envelope>
   0