You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2006/12/14 05:44:02 UTC

svn commit: r486958 - in /webservices/axis2/trunk/c/tools/codegen: src/ src/util/ src/wsdl/extensions/ test/resources/wsdl/

Author: nandika
Date: Wed Dec 13 20:44:02 2006
New Revision: 486958

URL: http://svn.apache.org/viewvc?view=rev&rev=486958
Log:
codegen tool crash problem fixed for win32

Modified:
    webservices/axis2/trunk/c/tools/codegen/src/util/class_loader.c
    webservices/axis2/trunk/c/tools/codegen/src/util/xslt_template_processor.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c
    webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c
    webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl
    webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl
    webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl

Modified: webservices/axis2/trunk/c/tools/codegen/src/util/class_loader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/util/class_loader.c?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/util/class_loader.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/util/class_loader.c Wed Dec 13 20:44:02 2006
@@ -59,7 +59,6 @@
     AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc);
 
     axis2_class_loader_init(env);
-	printf("\n%s\n", file_path);
 	obj = axis2_class_loader_create_dll(env, impl_info_param);
 
     AXIS2_FREE ( env->allocator, file_path);

Modified: webservices/axis2/trunk/c/tools/codegen/src/util/xslt_template_processor.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/util/xslt_template_processor.c?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/util/xslt_template_processor.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/util/xslt_template_processor.c Wed Dec 13 20:44:02 2006
@@ -40,29 +40,30 @@
 	xmlDocPtr doc = NULL;
 	xmlDocPtr res = NULL;
 	FILE *out = NULL;
+	char *buf = NULL;
+	int size = 0;
     /* printf("%s\n --------%s\n\n", xslt_filename, xml_stream); */
 
 	xmlSubstituteEntitiesDefault(1);
 	xmlLoadExtDtdDefaultValue = 1;
-
 	ssheet = xsltParseStylesheetFile((const xmlChar *)xslt_filename);
 	doc = (xmlDocPtr)xmlParseMemory(xml_stream,
                               (unsigned int)strlen (xml_stream));
 	res = xsltApplyStylesheet(ssheet, doc, NULL);
-      
-	out = fopen ( out_filename, "w+");
-	xsltSaveResultToFile(out, res, ssheet);
-
+	
+	/*
+	printf("%d",xsltLibxmlVersion);
 
-    /*TODO: following freeing has some inpact to the external code*/
-	/*xmlFreeDoc(res);
-	xsltFreeStylesheet(ssheet);
-	xmlFreeDoc(doc);
-    xsltCleanupGlobals();*/
-    /*xmlCleanupParser();*/
-
-    /* adding new line at the end */
-    fprintf( out, "\n");
-    fclose( out);
+	xmlDocDumpMemory(doc, &buf, &size);
+	printf("%s", buf);
+	*/
+	xsltSaveResultToString(&buf, &size, res, ssheet);
+	
+	out = fopen ( out_filename, "w+");
+	if(out){
+		fprintf(out, "%s", buf);
+		fprintf( out, "\n");
+		fclose( out);
+	}
 }
 

Modified: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/c_qname2name_ext.c Wed Dec 13 20:44:02 2006
@@ -34,7 +34,7 @@
         ((w2c_c_qname2name_ext_impl_t*) extension)
 
 #define W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker) \
-        ((w2c_c_qname2name_ext_impl_t*) ((void*)(qname2name_maker) - sizeof(w2c_extension_t)))
+        ((w2c_c_qname2name_ext_impl_t*) ((char*)(qname2name_maker) - sizeof(w2c_extension_t)))
 
 /**
 Above macro was as 

Modified: webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl/extensions/default_qname2name_ext.c Wed Dec 13 20:44:02 2006
@@ -31,7 +31,7 @@
         ((w2c_default_qname2name_ext_impl_t*) extension)
 
 #define W2C_QNAME2NAME_MAKER_INTF_TO_IMPL(qname2name_maker) \
-        ((w2c_default_qname2name_ext_impl_t*) ((void*)(qname2name_maker) - sizeof(w2c_extension_t)))
+        ((w2c_default_qname2name_ext_impl_t*) ((char*)(qname2name_maker) - sizeof(w2c_extension_t)))
 
 /**************implmentations for w2c_extension_t methods**********************/
 axis2_status_t AXIS2_CALL

Modified: webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c (original)
+++ webservices/axis2/trunk/c/tools/codegen/src/wsdl2code.c Wed Dec 13 20:44:02 2006
@@ -39,12 +39,10 @@
 {
     w2c_cmdline_option_parser_t* cmd_opt_parser = NULL;
     axis2_env_t* env = NULL;
-    axis2_allocator_t* allocator = NULL;
     w2c_engine_t* engine = NULL;
     axis2_status_t status;
 
-    allocator = axis2_allocator_init(NULL);
-    env = axis2_env_create(allocator);
+	env = axis2_env_create_all("codegen.log", AXIS2_LOG_LEVEL_DEBUG);
 
     cmd_opt_parser = w2c_cmdline_option_parser_create
             (env, argc - 1, argv + 1);/* ommit first arg */

Modified: webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl (original)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/CalculatorDoc.wsdl Wed Dec 13 20:44:02 2006
@@ -14,7 +14,7 @@
 <!-- See the License for the specific language governing permissions and      -->
 <!-- limitations under the License.                                           -->
 
-<wsdl:definitions targetNamespace="http://localhost/axis/Calculator" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/Calculator" xmlns:intf="http://localhost/axis/Calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<wsdl:definitions targetNamespace="http://localhost/axis/Calculator" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/Calculator" xmlns:intf="http://localhost/axis/Calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
   <schema elementFormDefault="qualified" targetNamespace="http://localhost/axis/Calculator" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/axis/Calculator" xmlns:intf="http://localhost/axis/Calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <element name="add">

Modified: webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl (original)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl Wed Dec 13 20:44:02 2006
@@ -14,7 +14,7 @@
 <!-- See the License for the specific language governing permissions and      -->
 <!-- limitations under the License.                                           -->
 
-<wsdl:definitions targetNamespace="http://soapinterop.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soapinterop.org" xmlns:intf="http://soapinterop.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<wsdl:definitions targetNamespace="http://soapinterop.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soapinterop.org" xmlns:intf="http://soapinterop.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
   <schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soapinterop.org" xmlns:intf="http://soapinterop.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl">
    <element name="echoString">

Modified: webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl?view=diff&rev=486958&r1=486957&r2=486958
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl (original)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl Wed Dec 13 20:44:02 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?> 
 <description 
-    xmlns="http://www.w3.org/2006/01/wsdl"
+    xmlns="http://www.w3.org/2006/01/wsdl/"
     targetNamespace= "http://greath.example.com/2004/wsdl/resSvc" 
     xmlns:tns= "http://greath.example.com/2004/wsdl/resSvc"
     xmlns:ghns = "http://greath.example.com/2004/schemas/resSvc"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org