axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r439295 [15/15] - in /webservices/axis2/trunk/c: tools/ tools/codegen/ tools/codegen/include/ tools/codegen/samples/ tools/codegen/samples/client/ tools/codegen/samples/client/calculator/ tools/codegen/samples/client/interop_test_svc/ tools...
Date Fri, 01 Sep 2006 12:46:04 GMT
Added: 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?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/InteropTestRound1Doc.wsdl Fri Sep  1 05:45:57 2006
@@ -0,0 +1,774 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2003-2004 The Apache Software Foundation.                      -->
+<!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved                   -->
+<!--                                                                          -->
+<!-- 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.                                           -->
+
+<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">
+    <complexType>
+     <sequence>
+      <element name="arg_0_0" nillable="true" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoStringResponse">
+    <complexType>
+     <sequence>
+      <element name="echoStringReturn" nillable="true" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoStringArray">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="arg_0_1" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoStringArrayResponse">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="echoStringArrayReturn" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoInteger">
+    <complexType>
+     <sequence>
+      <element name="arg_0_2" type="xsd:int"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoIntegerResponse">
+    <complexType>
+     <sequence>
+      <element name="echoIntegerReturn" type="xsd:int"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoIntegerArray">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="arg_0_3" type="xsd:int"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoIntegerArrayResponse">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="echoIntegerArrayReturn" type="xsd:int"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoFloat">
+    <complexType>
+     <sequence>
+      <element name="arg_0_4" type="xsd:float"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoFloatResponse">
+    <complexType>
+     <sequence>
+      <element name="echoFloatReturn" type="xsd:float"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoFloatArray">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="arg_0_5" type="xsd:float"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoFloatArrayResponse">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="echoFloatArrayReturn" type="xsd:float"/>
+     </sequence>
+    </complexType>
+   </element>
+   <complexType name="SOAPStruct">
+    <sequence>
+     <element name="varString" nillable="true" type="xsd:string"/>
+     <element name="varInt" type="xsd:int"/>
+     <element name="varFloat" type="xsd:float"/>
+    </sequence>
+   </complexType>
+   <element name="echoStruct">
+    <complexType>
+     <sequence>
+      <element name="arg_0_6" nillable="true" type="impl:SOAPStruct"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoStructResponse">
+    <complexType>
+     <sequence>
+      <element name="echoStructReturn" nillable="true" type="impl:SOAPStruct"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoStructArray">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="arg_0_7" type="impl:SOAPStruct"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoStructArrayResponse">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="echoStructArrayReturn" type="impl:SOAPStruct"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoVoid">
+    <complexType>
+     <sequence/>
+    </complexType>
+   </element>
+   <element name="echoVoidResponse">
+    <complexType>
+     <sequence/>
+    </complexType>
+   </element>
+   <element name="echoBase64">
+    <complexType>
+     <sequence>
+      <element name="arg_0_9" type="xsd:base64Binary"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoBase64Response">
+    <complexType>
+     <sequence>
+      <element name="echoBase64Return" type="xsd:base64Binary"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoDate">
+    <complexType>
+     <sequence>
+      <element name="arg_0_10" nillable="true" type="xsd:dateTime"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoDateResponse">
+    <complexType>
+     <sequence>
+      <element name="echoDateReturn" nillable="true" type="xsd:dateTime"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoHexBinary">
+    <complexType>
+     <sequence>
+      <element name="arg_0_11" type="xsd:hexBinary"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoHexBinaryResponse">
+    <complexType>
+     <sequence>
+      <element name="echoHexBinaryReturn" type="xsd:hexBinary"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoDecimal">
+    <complexType>
+     <sequence>
+      <element name="arg_0_12" nillable="true" type="xsd:decimal"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoDecimalResponse">
+    <complexType>
+     <sequence>
+      <element name="echoDecimalReturn" nillable="true" type="xsd:decimal"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoBoolean">
+    <complexType>
+     <sequence>
+      <element name="arg_0_13" type="xsd:boolean"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoBooleanResponse">
+    <complexType>
+     <sequence>
+      <element name="echoBooleanReturn" type="xsd:boolean"/>
+     </sequence>
+    </complexType>
+   </element>
+  </schema>
+ </wsdl:types>
+
+   <wsdl:message name="echoBooleanResponse">
+
+      <wsdl:part element="impl:echoBooleanResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoBase64Response">
+
+      <wsdl:part element="impl:echoBase64Response" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoVoidRequest">
+
+      <wsdl:part element="impl:echoVoid" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStringArrayRequest">
+
+      <wsdl:part element="impl:echoStringArray" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoDecimalResponse">
+
+      <wsdl:part element="impl:echoDecimalResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoFloatResponse">
+
+      <wsdl:part element="impl:echoFloatResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoBase64Request">
+
+      <wsdl:part element="impl:echoBase64" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoDateResponse">
+
+      <wsdl:part element="impl:echoDateResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoBooleanRequest">
+
+      <wsdl:part element="impl:echoBoolean" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoHexBinaryRequest">
+
+      <wsdl:part element="impl:echoHexBinary" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoHexBinaryResponse">
+
+      <wsdl:part element="impl:echoHexBinaryResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoFloatRequest">
+
+      <wsdl:part element="impl:echoFloat" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoIntegerResponse">
+
+      <wsdl:part element="impl:echoIntegerResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoFloatArrayRequest">
+
+      <wsdl:part element="impl:echoFloatArray" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStringArrayResponse">
+
+      <wsdl:part element="impl:echoStringArrayResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStructArrayRequest">
+
+      <wsdl:part element="impl:echoStructArray" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStructRequest">
+
+      <wsdl:part element="impl:echoStruct" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoIntegerRequest">
+
+      <wsdl:part element="impl:echoInteger" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoDateRequest">
+
+      <wsdl:part element="impl:echoDate" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoIntegerArrayRequest">
+
+      <wsdl:part element="impl:echoIntegerArray" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoDecimalRequest">
+
+      <wsdl:part element="impl:echoDecimal" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStructResponse">
+
+      <wsdl:part element="impl:echoStructResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoFloatArrayResponse">
+
+      <wsdl:part element="impl:echoFloatArrayResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStringResponse">
+
+      <wsdl:part element="impl:echoStringResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoVoidResponse">
+
+      <wsdl:part element="impl:echoVoidResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStructArrayResponse">
+
+      <wsdl:part element="impl:echoStructArrayResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoIntegerArrayResponse">
+
+      <wsdl:part element="impl:echoIntegerArrayResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="echoStringRequest">
+
+      <wsdl:part element="impl:echoString" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="InteropTestPortTypeDoc">
+
+      <wsdl:operation name="echoString">
+
+         <wsdl:input message="impl:echoStringRequest" name="echoStringRequest"/>
+
+         <wsdl:output message="impl:echoStringResponse" name="echoStringResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoStringArray">
+
+         <wsdl:input message="impl:echoStringArrayRequest" name="echoStringArrayRequest"/>
+
+         <wsdl:output message="impl:echoStringArrayResponse" name="echoStringArrayResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoInteger">
+
+         <wsdl:input message="impl:echoIntegerRequest" name="echoIntegerRequest"/>
+
+         <wsdl:output message="impl:echoIntegerResponse" name="echoIntegerResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoIntegerArray">
+
+         <wsdl:input message="impl:echoIntegerArrayRequest" name="echoIntegerArrayRequest"/>
+
+         <wsdl:output message="impl:echoIntegerArrayResponse" name="echoIntegerArrayResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoFloat">
+
+         <wsdl:input message="impl:echoFloatRequest" name="echoFloatRequest"/>
+
+         <wsdl:output message="impl:echoFloatResponse" name="echoFloatResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoFloatArray">
+
+         <wsdl:input message="impl:echoFloatArrayRequest" name="echoFloatArrayRequest"/>
+
+         <wsdl:output message="impl:echoFloatArrayResponse" name="echoFloatArrayResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoStruct">
+
+         <wsdl:input message="impl:echoStructRequest" name="echoStructRequest"/>
+
+         <wsdl:output message="impl:echoStructResponse" name="echoStructResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoStructArray">
+
+         <wsdl:input message="impl:echoStructArrayRequest" name="echoStructArrayRequest"/>
+
+         <wsdl:output message="impl:echoStructArrayResponse" name="echoStructArrayResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoVoid">
+
+         <wsdl:input message="impl:echoVoidRequest" name="echoVoidRequest"/>
+
+         <wsdl:output message="impl:echoVoidResponse" name="echoVoidResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoBase64">
+
+         <wsdl:input message="impl:echoBase64Request" name="echoBase64Request"/>
+
+         <wsdl:output message="impl:echoBase64Response" name="echoBase64Response"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoDate">
+
+         <wsdl:input message="impl:echoDateRequest" name="echoDateRequest"/>
+
+         <wsdl:output message="impl:echoDateResponse" name="echoDateResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoHexBinary">
+
+         <wsdl:input message="impl:echoHexBinaryRequest" name="echoHexBinaryRequest"/>
+
+         <wsdl:output message="impl:echoHexBinaryResponse" name="echoHexBinaryResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoDecimal">
+
+         <wsdl:input message="impl:echoDecimalRequest" name="echoDecimalRequest"/>
+
+         <wsdl:output message="impl:echoDecimalResponse" name="echoDecimalResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoBoolean">
+
+         <wsdl:input message="impl:echoBooleanRequest" name="echoBooleanRequest"/>
+
+         <wsdl:output message="impl:echoBooleanResponse" name="echoBooleanResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="InteropBaseSoapBinding" type="impl:InteropTestPortTypeDoc">
+
+      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="echoString">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoStringRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoStringResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoStringArray">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoStringArrayRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoStringArrayResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoInteger">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoIntegerRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoIntegerResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoIntegerArray">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoIntegerArrayRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoIntegerArrayResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoFloat">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoFloatRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoFloatResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoFloatArray">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoFloatArrayRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoFloatArrayResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoStruct">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoStructRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoStructResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoStructArray">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoStructArrayRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoStructArrayResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoVoid">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoVoidRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoVoidResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoBase64">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoBase64Request">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoBase64Response">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoDate">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoDateRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoDateResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoHexBinary">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoHexBinaryRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoHexBinaryResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoDecimal">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoDecimalRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoDecimalResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoBoolean">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoBooleanRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoBooleanResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="InteropTestPortTypeDocService">
+
+      <wsdl:port binding="impl:InteropBaseSoapBinding" name="InteropBaseDoc">
+
+         <wsdlsoap:address location="http://localhost/axis/InteropBaseDoc"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: 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?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/wsdl/primer-hotelReservationService.wsdl Fri Sep  1 05:45:57 2006
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<description 
+    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"
+    xmlns:wsoap= "http://www.w3.org/2004/08/wsdl/soap12"
+    xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+
+  <documentation>
+    This document describes the GreatH Web service.  Additional 
+    application-level requirements for use of this service -- 
+    beyond what WSDL 2.0 is able to describe -- are available 
+    at http://greath.example.com/2004/reservation-documentation.html
+  </documentation>
+
+  <types>
+    <xs:schema 
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        targetNamespace="http://greath.example.com/2004/schemas/resSvc"
+        xmlns="http://greath.example.com/2004/schemas/resSvc">
+
+      <xs:element name="checkAvailability" type="tCheckAvailability"/>    
+      <xs:complexType name="tCheckAvailability">     
+        <xs:sequence>      
+          <xs:element  name="checkInDate" type="xs:date"/>      
+          <xs:element  name="checkOutDate" type="xs:date"/>      
+          <xs:element  name="roomType" type="xs:string"/>      
+        </xs:sequence>     
+      </xs:complexType>   
+            
+      <xs:element name="checkAvailabilityResponse" type="xs:double"/>    
+    
+      <xs:element name="invalidDataError" type="xs:string"/>    
+
+    </xs:schema>    
+  </types>
+  
+  <interface  name = "reservationInterface" >
+
+    <fault name = "invalidDataFault"
+            element = "ghns:invalidDataError"/> 
+   
+    <operation name="opCheckAvailability" 
+            pattern="http://www.w3.org/2004/03/wsdl/in-out" >
+        <input messageLabel="In" 
+              element="ghns:checkAvailability" />
+        <output messageLabel="Out" 
+              element="ghns:checkAvailabilityResponse" />
+        <outfault ref="tns:invalidDataFault" messageLabel="Out"/>
+    </operation>
+
+  </interface>
+
+  <binding name="reservationSOAPBinding" 
+	  interface="tns:reservationInterface"
+	  type="http://www.w3.org/2004/08/wsdl/soap12"
+	  wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
+
+    <operation ref="tns:opCheckAvailability" 
+      wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response"/>
+  
+    <fault ref="tns:invalidDataFault" 
+      wsoap:code="soap:Sender"/>
+
+  </binding>
+
+  <service name="reservationService" 
+       interface="tns:reservationInterface">
+
+     <endpoint name="reservationEndpoint" 
+               binding="tns:reservationSOAPBinding"
+               address ="http://greath.example.com/2004/reservation"/>
+        
+  </service>
+
+</description>

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/atoms.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/atoms.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/atoms.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/atoms.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xml" href="style1.xsl"?>
+<PERIODIC_TABLE>
+  <ATOM STATE="GAS">
+    <NAME>Hydrogen</NAME>
+    <SYMBOL>H</SYMBOL>
+    <ATOMIC_NUMBER>1</ATOMIC_NUMBER>
+    <ATOMIC_WEIGHT>1.00794</ATOMIC_WEIGHT>
+    <BOILING_POINT UNITS="Kelvin">20.28</BOILING_POINT>
+    <MELTING_POINT UNITS="Kelvin">13.81</MELTING_POINT>
+    <DENSITY UNITS="grams/cubic centimeter">
+      <!-- At 300K, 1 atm -->
+      0.0000899
+    </DENSITY>
+  </ATOM>
+  <ATOM STATE="GAS">
+    <NAME>Helium</NAME>
+    <SYMBOL>He</SYMBOL>
+    <ATOMIC_NUMBER>2</ATOMIC_NUMBER>
+    <ATOMIC_WEIGHT>4.0026</ATOMIC_WEIGHT>
+    <BOILING_POINT UNITS="Kelvin">4.216</BOILING_POINT>
+    <MELTING_POINT UNITS="Kelvin">0.95</MELTING_POINT>
+    <DENSITY UNITS="grams/cubic centimeter"><!-- At 300K -->
+      0.0001785
+    </DENSITY>
+  </ATOM>
+</PERIODIC_TABLE>

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result1.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result1.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result1.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result1.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,26 @@
+<html>
+  <P>
+    Hydrogen
+    H
+    1
+    1.00794
+    20.28
+    13.81
+    
+      
+      0.0000899
+    
+  </P>
+  <P>
+    Helium
+    He
+    2
+    4.0026
+    4.216
+    0.95
+    
+      0.0001785
+    
+  </P>
+</html>
+

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result2.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result2.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/result2.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,25 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Atomic Number vs. Atomic Weight</title>
+</head>
+<body>
+<h1>Atomic Number vs. Atomic Weight</h1>
+<table>
+<th>Element</th>
+<th>Atomic Number</th>
+<th>Atomic Weight</th>
+<tr>
+<td>Hydrogen</td>
+<td>1</td>
+<td>1.00794</td>
+</tr>
+<tr>
+<td>Helium</td>
+<td>2</td>
+<td>4.0026</td>
+</tr>
+</table>
+</body>
+</html>
+

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1.xsl?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1.xsl (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1.xsl Fri Sep  1 05:45:57 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" 
+          xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template match="PERIODIC_TABLE">
+    <html>
+      <xsl:apply-templates/>
+    </html>
+  </xsl:template>
+  <xsl:template match="ATOM">
+    <P>
+      <xsl:apply-templates/>
+    </P>
+  </xsl:template>
+</xsl:stylesheet>

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1_result.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1_result.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1_result.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style1_result.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,25 @@
+<html>
+  <P>
+    Hydrogen
+    H
+    1
+    1.00794
+    20.28
+    13.81
+    
+      
+      0.0000899
+    
+  </P>
+  <P>
+    Helium
+    He
+    2
+    4.0026
+    4.216
+    0.95
+    
+      0.0001785
+    
+  </P>
+</html>

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2.xsl?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2.xsl (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2.xsl Fri Sep  1 05:45:57 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:template match="/">
+      <html>
+        <head>
+          <title>Atomic Number vs. Atomic Weight</title>
+        </head>
+        <body>
+          <xsl:apply-templates select="PERIODIC_TABLE"/>
+        </body>
+      </html>
+    </xsl:template>
+    <xsl:template match="PERIODIC_TABLE">
+      <h1>Atomic Number vs. Atomic Weight</h1>
+      <table>
+        <th>Element</th>
+        <th>Atomic Number</th>
+        <th>Atomic Weight</th>
+          <xsl:apply-templates select="ATOM"/>
+      </table>
+    </xsl:template>
+    <xsl:template match="ATOM">
+      <tr>
+        <td><xsl:value-of select="NAME"/></td>
+        <td><xsl:value-of select="ATOMIC_NUMBER"/></td>
+        <td><xsl:value-of select="ATOMIC_WEIGHT"/></td>
+      </tr>
+    </xsl:template>
+</xsl:stylesheet>

Added: webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2_result.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2_result.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2_result.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/resources/xml/style2_result.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,24 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Atomic Number vs. Atomic Weight</title>
+</head>
+<body>
+<h1>Atomic Number vs. Atomic Weight</h1>
+<table>
+<th>Element</th>
+<th>Atomic Number</th>
+<th>Atomic Weight</th>
+<tr>
+<td>Hydrogen</td>
+<td>1</td>
+<td>1.00794</td>
+</tr>
+<tr>
+<td>Helium</td>
+<td>2</td>
+<td>4.0026</td>
+</tr>
+</table>
+</body>
+</html>

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,25 @@
+TESTS =
+prgbindir=$(prefix)/bin/unit_test
+prgbin_PROGRAMS = w2c_unit_test_suite
+SUBDIRS = util codegen
+w2c_unit_test_suite_SOURCES = main.c
+
+
+w2c_unit_test_suite_LDADD   =   \
+		     util/libtest_w2c_util.la \
+                     $(top_builddir)/src/util/libw2c_util.la \
+                     -L$(CUTEST_HOME)/lib \
+                     -lcutest \
+                     -L$(AXIS2C_HOME)/lib \
+                     -laxis2_util \
+                     -laxis2_axiom \
+                     -laxis2_parser \
+                     -lxslt \
+                     -lxml2
+
+
+INCLUDES = -I${CUTEST_HOME}/include \
+           -I$(top_builddir)/include \
+                        @UTILINC@ \
+                        @AXIOMINC@
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,26 @@
+TESTS = w2c_codegen_test
+prglibdir=$(prefix)/lib/unit_test
+prgbindir=$(prefix)/bin/unit_test
+noinst_HEADERS =
+prglib_LTLIBRARIES = libtest_w2c_codegen.la
+libtest_w2c_codegen_la_SOURCES = w2c_engine_test.c w2c_writer_test.c
+
+INCLUDES = -I${CUTEST_HOME}/include \
+           -I$(top_builddir)/include \
+           @UTILINC@ \
+           @AXIOMINC@
+
+check_PROGRAMS = w2c_codegen_test
+prgbin_PROGRAMS = w2c_codegen_test
+w2c_codegen_test_SOURCES = main.c
+w2c_codegen_test_LDADD   =   libtest_w2c_codegen.la \
+                     $(top_builddir)/src/wsdl/libw2c_codegen.la \
+                     -L$(CUTEST_HOME)/lib \
+                     -lcutest \
+                     -L$(AXIS2C_HOME)/lib \
+                     -laxis2_util \
+                     -laxis2_axiom \
+                     -laxis2_parser \
+                     -lxslt \
+                     -lxml2
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/main.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/main.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/main.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,22 @@
+#include <CuTest.h>
+#include <stdio.h>
+#include "w2c_engine_test.h"
+#include "w2c_writer_test.h"
+
+void RunAllTests(void) {
+    CuString *output = CuStringNew();
+    CuSuite* suite = CuSuiteNew();
+
+    CuSuiteAddSuite(suite, (CuSuite*)w2c_engineGetSuite());
+    CuSuiteAddSuite(suite, (CuSuite*)w2c_writerGetSuite());
+    
+    CuSuiteRun(suite);
+    CuSuiteSummary(suite, output);
+    CuSuiteDetails(suite, output);
+    printf("%s\n", output->buffer);
+}
+
+int main(void) {
+    RunAllTests();
+    return 0;
+}

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/ns2p_file
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/ns2p_file?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/ns2p_file (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/ns2p_file Fri Sep  1 05:45:57 2006
@@ -0,0 +1,3 @@
+http://somewhere.com/someres=com.somewhere.someres
+http://anotherwhere.com/anotherres=com.anotherwhere.anothereres
+http://nowhere.lk/anotheres=lk.nowhere.anotherres

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/src/howar/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/src/howar/services.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/src/howar/services.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/src/howar/services.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,8 @@
+<!-- This file was auto-generated from WSDL -->
+<!-- by the Apache Axis2 version: #axisVersion# #today# -->
+<service name="myservice">
+  <parameter name="ServiceClass" locked="false">myservice</parameter>
+  <operation name="myfirstmethod"/>
+  <operation name="mysecondmethod"/>
+  <operation name="lastmethod-if more add prior to this"/>
+</service>

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,114 @@
+#include <CuTest.h>
+#include <axis2_utils.h>
+#include <axis2_string.h>
+#include <w2c_cmdline_option.h>
+#include <w2c_cmdline_option_parser.h>
+#include <w2c_property.h>
+#include <w2c_config_property_loader.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <w2c_engine_configuration.h>
+#include "w2c_engine_test.h"
+
+static const axis2_char_t* w2c_config_test_input1[] = {"-o", "src",
+                                     "-uri","a.wsdl"};
+static const axis2_char_t* w2c_config_test_input2[] = {"-ns2p", 
+         "http://somewhere.com/someres=com.somewhere.someres,"
+         "http://anotherwhere.com/anotherres=com.anotherwhere.anothereres,"
+         "http://nowhere.lk/anotheres=lk.nowhere.anotherres"};
+static const axis2_char_t* w2c_config_test_input3[] = {"-ns2p",
+                                               "ns2p_file"};
+
+void test_engine_config_loader(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    w2c_cmdline_option_parser_t* parser = NULL;
+    axis2_hash_index_t *hi;
+    axis2_hash_t* hash = NULL;
+    int input_size;
+    axis2_char_t actual[1024];
+    int actual_len = 0;
+    axis2_char_t* expected;
+    axis2_char_t* key;
+    axis2_char_t* value;
+    w2c_engine_configuration_t* conf = NULL;
+
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+    input_size = 4;
+
+    parser = w2c_cmdline_option_parser_create (env,
+            input_size, (axis2_char_t**)w2c_config_test_input1);
+    hash = W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS ( parser, env );
+    
+    conf = w2c_engine_configuration_create( env );
+    w2c_engine_config_loader_load_config(env, conf, hash);
+    strcpy(actual,  W2C_ENGINE_CONFIGURATION_GET_OUTPUT_LOCATION(conf, env) );
+    expected = "src"; 
+    CuAssertStrEquals(tc, expected, actual);
+    
+    W2C_ENGINE_CONFIGURATION_FREE (conf, env);
+    W2C_CMDLINE_OPTION_PARSER_FREE ( parser, env);
+
+    /* ---------------------------------------------------------------------*/
+    input_size = 2;
+    parser = w2c_cmdline_option_parser_create (env,
+            input_size, (axis2_char_t**)w2c_config_test_input2);
+    hash = W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS ( parser, env );
+    
+    conf = w2c_engine_configuration_create( env );
+    w2c_engine_config_loader_load_config(env, conf, hash);
+    
+    hash = W2C_ENGINE_CONFIGURATION_GET_URI2PACKAGEMAP ( conf, env);
+    
+    for (hi = axis2_hash_first(hash, env), actual[0]='\0';
+                hi; hi = axis2_hash_next(env, hi))
+    {
+        axis2_hash_this(hi, (void*)&key, NULL, (void*)&value);
+        sprintf(actual, "%s%s=%s,", actual, key, value );
+    }
+    actual_len = AXIS2_STRLEN ( actual);
+    actual[actual_len -1 ] = '\0'; /* remove the last comma */
+    expected = (char*)w2c_config_test_input2[1];
+   
+    CuAssertStrEquals(tc, expected, actual);
+
+    /* ---------------------------------------------------------------------*/
+    W2C_ENGINE_CONFIGURATION_FREE (conf, env);
+    W2C_CMDLINE_OPTION_PARSER_FREE ( parser, env);
+
+    parser = w2c_cmdline_option_parser_create (env,
+            input_size, (axis2_char_t**)w2c_config_test_input3);
+    hash = W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS ( parser, env );
+    
+    conf = w2c_engine_configuration_create( env );
+    w2c_engine_config_loader_load_config(env, conf, hash);
+    
+    hash = W2C_ENGINE_CONFIGURATION_GET_URI2PACKAGEMAP ( conf, env);
+    
+    for (hi = axis2_hash_first(hash, env), actual[0]='\0';
+                hi; hi = axis2_hash_next(env, hi))
+    {
+        axis2_hash_this(hi, (void*)&key, NULL, (void*)&value);
+        sprintf(actual, "%s%s=%s,", actual, key, value );
+    }
+    actual_len = AXIS2_STRLEN ( actual);
+    actual[actual_len -1 ] = '\0'; /* remove the last comma */
+    expected = (char*)w2c_config_test_input2[1];
+    CuAssertStrEquals(tc, expected, actual);
+
+    W2C_ENGINE_CONFIGURATION_FREE (conf, env);
+    W2C_CMDLINE_OPTION_PARSER_FREE ( parser, env);
+
+
+}
+
+
+CuSuite* w2c_engineGetSuite()
+{
+    CuSuite* suite = CuSuiteNew();
+    SUITE_ADD_TEST(suite, test_engine_config_loader);
+    return suite;
+}
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_engine_test.h Fri Sep  1 05:45:57 2006
@@ -0,0 +1,9 @@
+#ifndef W2C_ENGINE_TEST_H
+#define W2C_ENGINE_TEST_H
+
+#include <CuTest.h>
+
+CuSuite* w2c_engineGetSuite();
+
+#endif /* W2C_ENGINE_TEST_H */
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,95 @@
+#include <CuTest.h>
+#include <axis2_util.h>
+#include <axis2_string.h>
+#include <w2c_property.h>
+#include <w2c_config_property_loader.h>
+#include <stdlib.h>
+#include "w2c_writer_test.h"
+#include <w2c_writer.h>
+#include <w2c_class_loader.h>
+#include <axiom.h>
+#include <w2c_xslt_utils.h>
+#include <w2c_cmdline_option_parser.h>
+#include <axis2_hash.h>
+#include <w2c_engine_configuration.h>
+
+static const axis2_char_t* w2c_config_test_input1[] = {"-o", "src/howar",
+                                     "-uri","a.wsdl"};
+
+void test_writer(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    axis2_char_t* testing_lang = NULL;
+    w2c_writer_t* writer = NULL;
+    w2c_config_property_loader_t* loader = NULL;
+    axis2_char_t file_path[128];
+    axis2_char_t* axis2c_home = NULL;
+    axiom_node_t* root = NULL;
+    axiom_node_t* inter_node = NULL;
+    axis2_char_t* buffer = NULL;
+    w2c_cmdline_option_parser_t* parser = NULL;
+    axis2_hash_t* hash = NULL;
+    w2c_engine_configuration_t* conf = NULL;
+    axis2_dll_desc_t* dll_desc = NULL;
+
+    int input_size = 0;
+
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+
+    axis2c_home = getenv ( "AXIS2C_HOME");
+    /* this is to load configuration from properties file */
+    loader = w2c_config_property_loader_create ( env);
+
+    root = w2c_xslt_utils_add_child_node(env, "interface", NULL);
+    w2c_xslt_utils_add_attribute (env, root, "servicename", "myservice");
+    
+    inter_node = w2c_xslt_utils_add_child_node(env, "method", root);
+    w2c_xslt_utils_add_attribute (env, inter_node, "name", "myfirstmethod");
+    
+    inter_node = w2c_xslt_utils_add_child_node(env, "method", root);
+    w2c_xslt_utils_add_attribute (env, inter_node, "name", "mysecondmethod");
+ 
+    inter_node = w2c_xslt_utils_add_child_node(env, "method", root);
+    w2c_xslt_utils_add_attribute (env, inter_node, "name", "lastmethod-if more add prior to this");
+
+    buffer = w2c_xslt_utils_serialize (env, root);
+    
+    sprintf ( file_path, "%s/codegen/util/codegen-config.properties",
+                                                             axis2c_home );
+    testing_lang = "c";
+    
+    input_size = 2;
+    parser = w2c_cmdline_option_parser_create (env,
+                input_size, (axis2_char_t**)w2c_config_test_input1);
+    hash = W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS ( parser, env );
+
+    conf = w2c_engine_configuration_create( env );
+    CuAssertPtrNotNull(tc, conf);
+    /* this is to load configuration from command line arguments*/
+    w2c_engine_config_loader_load_config(env, conf, hash);
+    
+    writer = (w2c_writer_t*)w2c_class_loader_get_object_from_class_name
+                ( env, "w2c_cservice_xml_writer", "/codegen/writers/", &dll_desc);
+    CuAssertPtrNotNull(tc, writer);
+    if ( writer != NULL )
+    {
+        W2C_WRITER_INITIALIZE( writer, env, loader, conf );
+        W2C_WRITER_CREATE_OUT_FILE ( writer, env, NULL, NULL);
+        W2C_WRITER_PARSE ( writer, env, root);
+    }
+
+    w2c_class_loader_free_loaded_class(env, dll_desc);
+
+    /*CuAssertStrEquals(tc, expected, actual);*/
+}
+
+
+CuSuite* w2c_writerGetSuite()
+{
+    CuSuite* suite = CuSuiteNew();
+    SUITE_ADD_TEST(suite, test_writer);
+    return suite;
+}
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/codegen/w2c_writer_test.h Fri Sep  1 05:45:57 2006
@@ -0,0 +1,9 @@
+#ifndef W2C_WRITER_TEST_H
+#define W2C_WRITER_TEST_H
+
+#include <CuTest.h>
+
+CuSuite* w2c_writerGetSuite();
+
+#endif /* W2C_WRITER_TEST_H */
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/main.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/main.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/main.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,22 @@
+#include <CuTest.h>
+#include "util/w2c_util_test.h"
+#include "util/w2c_conf_test.h"
+#include <stdio.h>
+
+void RunAllTests(void) {
+    CuString *output = CuStringNew();
+    CuSuite* suite = CuSuiteNew();
+
+    CuSuiteAddSuite(suite, w2c_utilGetSuite());
+    CuSuiteAddSuite(suite, w2c_confGetSuite());
+
+    CuSuiteRun(suite);
+    CuSuiteSummary(suite, output);
+    CuSuiteDetails(suite, output);
+    printf("%s\n", output->buffer);
+}
+
+int main(void) {
+    RunAllTests();
+    return 0;
+}

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/util/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/util/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/util/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/util/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,27 @@
+TESTS = w2c_util_test
+prglibdir=$(prefix)/lib/unit_test
+prgbindir=$(prefix)/bin/unit_test
+noinst_HEADERS =
+prglib_LTLIBRARIES = libtest_w2c_util.la
+libtest_w2c_util_la_SOURCES = w2c_util_test.c \
+                            w2c_conf_test.c
+
+INCLUDES = -I${CUTEST_HOME}/include \
+           -I$(top_builddir)/include \
+           @UTILINC@ \
+           @AXIOMINC@
+
+check_PROGRAMS = w2c_util_test
+prgbin_PROGRAMS = w2c_util_test
+w2c_util_test_SOURCES = main.c
+w2c_util_test_LDADD   =   libtest_w2c_util.la \
+                     $(top_builddir)/src/util/libw2c_util.la \
+                     -L$(CUTEST_HOME)/lib \
+                     -lcutest \
+                     -L$(AXIS2C_HOME)/lib \
+                     -laxis2_util \
+                     -laxis2_axiom \
+                     -laxis2_parser \
+                     -lxslt \
+                     -lxml2
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/util/main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/util/main.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/util/main.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/util/main.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,22 @@
+#include <CuTest.h>
+#include <stdio.h>
+#include "w2c_util_test.h"
+#include "w2c_conf_test.h"
+
+void RunAllTests(void) {
+    CuString *output = CuStringNew();
+    CuSuite* suite = CuSuiteNew();
+
+    CuSuiteAddSuite(suite, (CuSuite*)w2c_utilGetSuite());
+    CuSuiteAddSuite(suite, (CuSuite*)w2c_confGetSuite());
+
+    CuSuiteRun(suite);
+    CuSuiteSummary(suite, output);
+    CuSuiteDetails(suite, output);
+    printf("%s\n", output->buffer);
+}
+
+int main(void) {
+    RunAllTests();
+    return 0;
+}

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,210 @@
+#include <CuTest.h>
+#include <axis2_utils.h>
+#include <axis2_string.h>
+#include <w2c_cmdline_option.h>
+#include <w2c_cmdline_option_parser.h>
+#include <w2c_properties.h>
+#include <w2c_config_property_loader.h>
+#include <w2c_messages.h>
+#include "w2c_conf_test.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+#define HASH_CONFIG_TEST_EXPECTED "{c.skeleton.impl.template}: " \
+        "w2c_cskel_source_writer "  \
+        "c/SkelSourceTemplate.xsl " \
+        "{c.interface.header.template}: " \
+        "w2c_cstub_header_writer " \
+        "c/StubHeaderTemplate.xsl " \
+        "{c.skeleton.header.template}: " \
+        "w2c_cskel_header_writer " \
+        "c/SkelHeaderTemplate.xsl " \
+        "{c.svc_skeleton.template}: " \
+        "w2c_csvc_skeleton_writer " \
+        "c/ServiceSkeleton.xsl " \
+        "{c.interface.impl.template}: " \
+        "w2c_cstub_source_writer " \
+        "c/StubSourceTemplate.xsl " \
+        "{c.service.template}: " \
+        "w2c_cservice_xml_writer " \
+        "c/ServiceXMLTemplate.xsl " \
+        "{c.filename.extension}: c "
+
+#define ARRAYLIST_CONFIG_TEST_EXPECTED \
+        "org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.JaxMeExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.JiBXExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension," \
+        "org.apache.axis2.wsdl.codegen.extension.TypeMapperExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.DefaultDatabindingExtension,"\
+        "org.apache.axis2.wsdl.codegen.extension.PolicyEvaluator,"
+
+static const axis2_char_t* w2c_util_test_input[]= { "-uri", "a.wsdl" , "b.wsdl" , "-ss",
+             "-sd" ,"-o" , "src" , "-pp" , "zs" };
+
+void test_cmdline_option(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    w2c_cmdline_option_parser_t *parser = NULL;
+    w2c_cmdline_option_t *option = NULL;
+    axis2_hash_index_t *hi;
+    axis2_hash_t *hash = NULL;
+    axis2_array_list_t *arr_list = NULL;
+    int i = 0;
+    int input_size;
+    axis2_char_t actual[128];
+    axis2_char_t *expected;
+
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+
+    input_size= 9;
+    parser = w2c_cmdline_option_parser_create
+              (env, input_size, (axis2_char_t**)w2c_util_test_input);
+    hash = W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS ( parser, env );
+    
+    option = (w2c_cmdline_option_t* )
+                axis2_hash_get (hash, "uri", AXIS2_HASH_KEY_STRING );
+    arr_list = W2C_CMDLINE_OPTION_GET_VALUES ( option, env );
+
+    for (i = 0 , strcpy (actual, W2C_CMDLINE_OPTION_GET_TYPE (option, env) ); 
+                       i < AXIS2_ARRAY_LIST_SIZE ( arr_list, env ); i ++ )
+    {
+        sprintf ( actual , "%s %s", actual ,
+                         (char*)AXIS2_ARRAY_LIST_GET (arr_list, env, i ) );
+    }
+    expected = "uri a.wsdl b.wsdl";
+    CuAssertStrEquals(tc, expected, actual);
+
+    /* ----------------------------------------------------------------------*/
+    for (hi = axis2_hash_first(hash, env), actual[0]= '\0';
+                hi; hi = axis2_hash_next(env, hi))
+    {
+        axis2_hash_this(hi, NULL, NULL, (void*)&option);
+        arr_list = W2C_CMDLINE_OPTION_GET_VALUES ( option, env );
+        sprintf ( actual, "%s{%s}: ", actual,W2C_CMDLINE_OPTION_GET_TYPE (option, env));
+
+        for (i = 0 ; i < AXIS2_ARRAY_LIST_SIZE ( arr_list, env ); i ++ )
+        {
+            sprintf ( actual , "%s%s ", actual ,
+                             (char*)AXIS2_ARRAY_LIST_GET (arr_list, env, i ) );
+        }
+    }
+    
+    expected = "{uri}: a.wsdl b.wsdl {pp}: zs {ss}: {sd}: {o}: src ";
+    CuAssertStrEquals(tc, expected, actual);
+
+    /* ----------------------------------------------------------------------*/
+    arr_list= W2C_CMDLINE_OPTION_PARSER_GET_INVALID_OPTIONS ( parser, env );
+    for (i = 0, actual[0]  = '\0';
+                        i < AXIS2_ARRAY_LIST_SIZE ( arr_list, env ); i ++ )
+    {
+        option = (w2c_cmdline_option_t*)
+                     AXIS2_ARRAY_LIST_GET (arr_list, env,i );
+        sprintf ( actual , "%s%s ", actual ,
+                         W2C_CMDLINE_OPTION_GET_TYPE(option, env ) );
+    }
+    expected = "pp ";
+    CuAssertStrEquals(tc, expected, actual);
+}
+
+
+void test_config_property_loader(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    w2c_config_property_loader_t *loader = NULL;
+    axis2_char_t *actual = NULL;
+    axis2_char_t *expected = NULL;
+    axis2_hash_index_t *hi = NULL;
+    axis2_hash_t *hash = NULL;
+    axis2_array_list_t *arr_list = NULL;
+    int i = 0;
+    axis2_char_t *axis2c_home = NULL;
+    axis2_char_t file_path[512];
+    axis2_char_t *key = NULL;
+  
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+    
+ 
+    loader = w2c_config_property_loader_create ( env);
+    
+    axis2c_home = getenv ( "AXIS2C_HOME");
+    sprintf ( file_path, "%s/codegen/util/codegen-config.properties",
+                                                             axis2c_home );
+    
+    /* file_path = AXIS2_STRDUP
+                      ("../../resources/codegen-config.properties", env); */
+    /*W2C_CONFIG_PROPERTY_LOADER_W2C_CONFIG_PROPERTY_LOADER_SET_FILENAME( loader,
+              env, file_path );*/
+    actual = W2C_CONFIG_PROPERTY_LOADER_GET_DEFAULT_LANGUAGE ( loader, env );
+    
+    expected = "c";
+    CuAssertStrEquals(tc, expected, actual);
+
+    hash = 
+      W2C_CONFIG_PROPERTY_LOADER_GET_LANGUAGE_SPECIFIC_PROPERTIES_MAP( loader, env );
+    hash = (axis2_hash_t*)axis2_hash_get ( hash, "c", AXIS2_HASH_KEY_STRING );
+
+    if (hash )
+    { 
+        actual = (axis2_char_t*) malloc (sizeof(axis2_char_t)* 4096 );
+        for (hi = axis2_hash_first(hash, env), actual[0]= '\0';
+                    hi; hi = axis2_hash_next(env, hi))
+        {
+            axis2_hash_this(hi, (void*)&key, NULL, (void*)&arr_list);
+            sprintf ( actual, "%s{%s}: ", actual, key);
+    
+            for (i = 0 ; i < AXIS2_ARRAY_LIST_SIZE ( arr_list, env ); i ++ )
+            {
+                sprintf ( actual , "%s%s ", actual ,
+                                 (char*)AXIS2_ARRAY_LIST_GET (arr_list, env, i ) );
+            }
+        }
+    }    
+    expected = HASH_CONFIG_TEST_EXPECTED;
+    CuAssertStrEquals(tc, expected, actual);
+
+    W2C_CONFIG_PROPERTY_LOADER_FREE( loader, env);
+    /** this part is removed from the config file - check later after it is readd */
+    /* 
+    arr_list = W2C_CONFIG_PROPERTY_LOADER_GET_EXTENSION_CLASS_NAMES ( loader, env );
+    for ( i = 0, actual[0] ='\0'; i < AXIS2_ARRAY_LIST_SIZE ( arr_list, env ); i ++ )
+    {
+        sprintf ( actual, "%s%s,", actual,
+                         (char*) AXIS2_ARRAY_LIST_GET ( arr_list, env , i ) );
+    }
+    expected = ARRAYLIST_CONFIG_TEST_EXPECTED;
+    CuAssertStrEquals(tc, expected, actual);
+    */
+}
+
+void test_messages(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    axis2_char_t *key;
+    axis2_char_t *actual = NULL;
+    axis2_char_t *expected = NULL;
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+    
+    key = AXIS2_STRDUP("wsdl2code.arg1",env );
+    expected = "Usage WSDL2Code -uri <Location of WSDL> : WSDL file location";
+    actual = w2c_messages_get_message(env, key );
+    CuAssertStrEquals(tc, expected, actual);
+}
+ 
+CuSuite* w2c_confGetSuite()
+{
+    CuSuite *suite = CuSuiteNew();
+    SUITE_ADD_TEST(suite, test_cmdline_option);
+    SUITE_ADD_TEST(suite, test_config_property_loader);
+    SUITE_ADD_TEST(suite, test_messages);
+    return suite;
+}
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_conf_test.h Fri Sep  1 05:45:57 2006
@@ -0,0 +1,9 @@
+#ifndef CODEGEN_CONF_TEST_H
+#define CODEGEN_CONF_TEST_H
+
+#include <CuTest.h>
+
+CuSuite* w2c_confGetSuite();
+
+#endif /* OM_CODEGEN_CONF_H */
+

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,156 @@
+#include <CuTest.h>
+#include <axis2_utils.h>
+#include <w2c_url_processor.h>
+#include <w2c_xslt_template_processor.h>
+#include "w2c_util_test.h"
+#include <stdlib.h>
+#include <w2c_typemapper.h>
+
+static axis2_char_t* read_file ( axis2_char_t* filename );
+
+void test_typemapper(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    axis2_char_t *actual;
+    axis2_char_t *expected;
+    w2c_typemapper_t *typemapper;
+    axis2_qname_t *qname;
+    
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+
+    expected = "axiom_node_t*";
+    typemapper = w2c_typemapper_create_from_file( env, "c.default.typemap.xml");
+    actual = W2C_TYPEMAPPER_GET_DEFAULT_MAPPING_NAME(typemapper, env);
+    CuAssertStrEquals(tc, expected, actual);
+
+    qname = W2C_TYPEMAPPER_GET_DEFAULT_QNAME(typemapper, env);
+    actual = W2C_TYPEMAPPER_GET_TYPE_NAME(typemapper, env, qname);
+    CuAssertStrEquals(tc, expected, actual);
+
+    W2C_TYPEMAPPER_FREE( typemapper, env);
+}
+
+void test_namespace_to_package_name(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    axis2_char_t *input;
+    axis2_char_t *actual;
+    axis2_char_t *expected;
+
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+
+    input = (char*)AXIS2_STRDUP("http://ws.apache.org/axis2/c/w2c", env);
+    actual = 
+      (char*)w2c_url_processor_make_package_name(env, input);
+    expected = "org.apache.ws.axis2.c.w2c";
+    CuAssertStrEquals(tc, expected, actual);
+    free (input);
+    free (actual);
+ 
+    input = (char*)AXIS2_STRDUP("http://while.234who.for/switch/case/2sixa", env);
+    actual = 
+      (char*)w2c_url_processor_make_package_name(env, input);
+    expected = "_for._234who._while._switch._case._2sixa";
+    CuAssertStrEquals(tc, expected, actual);
+    free (input);
+    free (actual);
+}
+
+void test_template_parse(CuTest *tc)
+{
+    axis2_env_t *env;
+    axis2_allocator_t *allocator;
+    axis2_char_t *xml_stream;
+    axis2_char_t *xslt_filename;
+    axis2_char_t *out_filename;
+    axis2_char_t *out_content = NULL;
+    axis2_char_t *cmp_out_content = NULL;
+    int len = 0;
+
+    allocator = axis2_allocator_init(NULL);
+    env = axis2_env_create(allocator);
+
+    xml_stream = read_file ("../../resources/xml/atoms.xml" );
+    if ( NULL == xml_stream )
+         return;
+    xslt_filename = "../../resources/xml/style1.xsl";
+    out_filename = "../../resources/xml/result1.xml";
+    w2c_xslt_template_processor_parse(
+                  env, xml_stream, xslt_filename, out_filename);
+    out_content = read_file ("../../resources/xml/result1.xml");
+    cmp_out_content = read_file ("../../resources/xml/style1_result.xml");
+    /* just ignore the last new line char for avoid warning */
+    len = AXIS2_STRLEN( out_content);
+    out_content[len -1] = '\0';
+    
+    CuAssertStrEquals(tc, out_content, cmp_out_content);
+    
+    if ( out_content )free ( out_content );
+    if ( cmp_out_content)free ( cmp_out_content );
+   
+    xslt_filename = "../../resources/xml/style2.xsl";
+    out_filename = "../../resources/xml/result2.xml";
+    w2c_xslt_template_processor_parse(
+                  env, xml_stream, xslt_filename, out_filename);
+    out_content = read_file ("../../resources/xml/result2.xml");
+    cmp_out_content = read_file ("../../resources/xml/style2_result.xml");
+    /* just ignore the last new line char for avoid warning */
+    len = AXIS2_STRLEN( out_content);
+    out_content[len -1] = '\0';
+    
+    CuAssertStrEquals(tc, out_content, cmp_out_content);
+
+    if ( out_content)free ( out_content );
+    if ( cmp_out_content)free ( cmp_out_content );
+}
+
+CuSuite* w2c_utilGetSuite()
+{
+    CuSuite* suite = CuSuiteNew();
+    SUITE_ADD_TEST(suite, test_namespace_to_package_name);
+    SUITE_ADD_TEST(suite, test_template_parse);
+    SUITE_ADD_TEST(suite, test_typemapper);
+    return suite;
+}
+
+
+static axis2_char_t* read_file ( axis2_char_t *filename )
+{
+    const int MAX_SIZE=100;
+    int nread = 0;
+    FILE *f = 0;
+    axis2_char_t *out_stream = NULL;
+    int ncount = 0;
+
+    out_stream = (axis2_char_t*) malloc (sizeof(axis2_char_t)* MAX_SIZE );
+    if (out_stream == NULL )
+    {
+        return NULL;
+    }
+
+    f = fopen ( filename, "r+");
+    if ( f == NULL )
+    {
+        free (out_stream );
+        return NULL;
+    }
+    do{
+        nread = fread ( out_stream + ncount, sizeof(axis2_char_t), MAX_SIZE, f);
+        ncount += nread;
+        out_stream = (axis2_char_t*) realloc( out_stream,
+                    sizeof(axis2_char_t)* (MAX_SIZE + ncount ) );
+        if ( out_stream == NULL )
+        {
+            return NULL;
+        }
+    }while ( nread == MAX_SIZE );
+
+    out_stream[ncount] = '\0';
+    fclose(f);
+
+    return out_stream;
+}

Added: webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/test/unit/util/w2c_util_test.h Fri Sep  1 05:45:57 2006
@@ -0,0 +1,9 @@
+#ifndef CODEGEN_UTIL_TEST_H
+#define CODEGEN_UTIL_TEST_H
+
+#include <CuTest.h>
+
+CuSuite* w2c_utilGetSuite();
+
+#endif /* OM_CODEGEN_UTIL_H */
+

Modified: webservices/axis2/trunk/c/util/test/unit/util/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/test/unit/util/Makefile.am?rev=439295&r1=439294&r2=439295&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/test/unit/util/Makefile.am (original)
+++ webservices/axis2/trunk/c/util/test/unit/util/Makefile.am Fri Sep  1 05:45:57 2006
@@ -15,9 +15,7 @@
                             util_class_loader_test.c \
                             util_string_test.c \
                             util_url_test.c \
-                            util_uri_test.c \
-                            util_properties_test.c \
-                            util_date_time_test.c
+                            util_uri_test.c
 
 INCLUDES = -I$(top_builddir)/include \
             -I${CUTEST_HOME}/include \



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


Mime
View raw message