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 pr...@apache.org on 2005/10/21 15:36:24 UTC

svn commit: r327176 - in /webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp: LargeReturningString.cpp LargeReturningString.hpp

Author: prestonf
Date: Fri Oct 21 06:36:21 2005
New Revision: 327176

URL: http://svn.apache.org/viewcvs?rev=327176&view=rev
Log:
Part of the fix for AXISCPP-859

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.hpp
Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.cpp?rev=327176&r1=327175&r2=327176&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.cpp Fri Oct 21 06:36:21 2005
@@ -1,17 +1,36 @@
 /*
+ * Copyright 2003-2004 The Apache Software Foundation.
+
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *		http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
  * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
  * This file contains definitions of the web service
  */
 
+#include <stdio.h>
 #include "LargeReturningString.hpp"
 
-
 LargeReturningString::LargeReturningString()
 {
+//	printf( "LargeReturningString::LargeReturningString\n");
+	myString = NULL;
 }
 
 LargeReturningString::~LargeReturningString()
 {
+//	printf( "LargeReturningString::~LargeReturningString\n");
+	delete myString;
 }
 
 /* This function is called by the AxisEngine when something went wrong
@@ -23,11 +42,57 @@
 
 xsd__string LargeReturningString::getLargeString(xsd__int Value0)  
 {
-	xsd__string ret= new char[Value0 +1];
-	char c = 'A';
-	memset(ret, c, Value0);
-	
-	ret[Value0] = '\0';
+//	printf( ">LargeReturningString::getLargeString(%d)\n", Value0);
+
+	if( myString != NULL)
+	{
+		delete myString;
+	}
+
+	myString = new char[Value0 + 1];
+
+	for( int iCount = 0; iCount < Value0; iCount++)
+	{
+		myString[iCount] = iCount % 26 + 'A';
+	}
+
+	myString[Value0] = '\0';
+
+	return myString;
+}
+
+xsd__int LargeReturningString::setLargeString(xsd__string Value0)  
+{
+//	printf( "LargeReturningString::setLargeString\n");
+
+	if( myString != NULL)
+	{
+		delete myString;
+	}
+
+	int	iSize = strlen( Value0) + 1;
+
+	myString = new char[iSize];
+
+	strcpy( myString, Value0);
+
+	return iSize;
+}
+
+void LargeReturningString::setRoundTripLargeString(xsd__string Value0,xsd__int Value1, AXIS_OUT_PARAM xsd__string *OutValue0, AXIS_OUT_PARAM xsd__int *OutValue1)  
+{
+//	printf( "LargeReturningString::setRoundTripLargeString\n");
+
+	if( myString != NULL)
+	{
+		delete myString;
+	}
+
+	myString = new char[Value1 + 1];
 
-	return ret;
+	strcpy( myString, Value0);
+
+	*OutValue0 = myString;
+	*OutValue1 = strlen( myString);
 }
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.hpp?rev=327176&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.hpp (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/server/cpp/LargeReturningString.hpp Fri Oct 21 06:36:21 2005
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *		http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
+ * This file contains declaration of the web service
+ */
+
+#if !defined(__LARGERETURNINGSTRING_SERVERSKELETON_H__INCLUDED_)
+#define __LARGERETURNINGSTRING_SERVERSKELETON_H__INCLUDED_
+
+#include <axis/AxisUserAPI.hpp>
+#include <axis/ISoapAttachment.hpp>
+#include "AxisServiceException.hpp" 
+
+
+class LargeReturningString 
+{
+	public:
+		LargeReturningString();
+	public:
+		virtual ~LargeReturningString();
+	public: 
+		void onFault();
+		xsd__string getLargeString(xsd__int Value0);
+		xsd__int setLargeString(xsd__string Value0);
+		void setRoundTripLargeString(xsd__string Value0,xsd__int Value1, AXIS_OUT_PARAM xsd__string *OutValue0, AXIS_OUT_PARAM xsd__int *OutValue1);
+
+	public:
+		xsd__string	myString;
+};
+
+#endif /* !defined(__LARGERETURNINGSTRING_SERVERSKELETON_H__INCLUDED_)*/