This test suite provides comprehensive validation of ADB (Axis Data Binding) functionality in the Axis2/C native WSDL2C generator. The test structure is based on the extensive ADB test suite from Axis2/Java, with over 90 test categories adapted for C implementation.
The Axis2/C native generator supports only two databinding modes:
ADB (Axis Data Binding) is the core Apache Axis TLP (Top Level Project) invention for data binding, making it the primary focus for comprehensive testing.
src/adb_test_framework.c)src/test_basic_types.c)src/test_complex_types.c)src/test_enumerations.c)src/test_choices.c)src/test_arrays.c)Based on analysis of Axis2/Java ADB tests, the following test categories are included:
From Axis2/Java modules/adb-tests structure:
Complete Ubuntu/Debian package installation:
sudo apt update sudo apt install libxml2-dev libjson-c-dev pkgconf autoconf \ automake libtool make gcc g++ libssl-dev zlib1g-dev # Optional for testing sudo apt install libgtest-dev valgrind
Note: These requirements are documented in the main INSTALL file section 1.1.3.
# From the test directory mkdir build && cd build cmake .. make # Run all ADB tests make run_adb_tests # Run integration tests with native generator make integration_adb_test
# Run the test framework directly ./adb_test_runner # Run integration tests ./integration/run_integration_tests.sh
# Create test directory mkdir -p /tmp/wsdl_test && cd /tmp/wsdl_test # Create a simple test WSDL or use existing ones # Generate code using the native generator /home/robert/repos/axis-axis2-c-core/tools/codegen/native/build/wsdl2c-native \ -uri your_wsdl_file.wsdl -o output -d adb -u # Check generated files ls -la output/src/
# Navigate to generated source directory cd output/src # Compile all ADB classes with proper include paths and warning suppression gcc -c adb_*.c \ -I. \ -I/home/robert/repos/axis-axis2-c-core/deploy/include/axis2-2.0.0 \ -I/usr/include/libxml2 \ -Wall -Wextra -std=c99 -Wno-unused-parameter # Verify compilation success echo "Compilation result: $?" ls -la adb_*.o && echo "✅ SUCCESS: All ADB classes compiled!"
# Compile all generated files including stub (may have minor template issues) gcc -c *.c \ -I. \ -I/home/robert/repos/axis-axis2-c-core/axiom/include \ -I/home/robert/repos/axis-axis2-c-core/util/include \ -I/home/robert/repos/axis-axis2-c-core/neethi/include \ -I/home/robert/repos/axis-axis2-c-core/include \ -I/usr/include/libxml2 \ -Wall -Wextra -std=c99 -Wno-unused-parameter
# One-liner test script mkdir -p /tmp/wsdl_test && cd /tmp/wsdl_test && \ echo '<?xml version="1.0"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://test/"><types><xsd:schema targetNamespace="http://test/"><xsd:element name="TestRequest" type="xsd:string"/><xsd:element name="TestResponse" type="xsd:string"/></xsd:schema></types><message name="TestMessage"><part name="body" element="tns:TestRequest"/></message><message name="TestResponseMessage"><part name="body" element="tns:TestResponse"/></message><portType name="TestPortType"><operation name="TestOperation"><input message="tns:TestMessage"/><output message="tns:TestResponseMessage"/></operation></portType><binding name="TestBinding" type="tns:TestPortType"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="TestOperation"><soap:operation soapAction="urn:TestOperation"/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation></binding><service name="TestService"><port name="TestPort" binding="tns:TestBinding"><soap:address location="http://localhost:8080/axis2/services/TestService"/></port></service></definitions>' > test.wsdl && \ /home/robert/repos/axis-axis2-c-core/tools/codegen/native/build/wsdl2c-native -uri test.wsdl -o output -d adb -u && \ cd output/src && \ gcc -c adb_*.c -I. -I/home/robert/repos/axis-axis2-c-core/deploy/include/axis2-2.0.0 -I/usr/include/libxml2 -Wall -Wextra -std=c99 -Wno-unused-parameter && \ echo "✅ WSDL Test Complete - Generated and compiled $(ls adb_*.o | wc -l) ADB classes!"
-Wno-unused-parameter: Recommended for generated code compilationoutput/src/adb_*.c and adb_*.h files generatedadb_*.o created without errorsintegration/run_integration_tests.sh)Based on Axis2/Java ADB test analysis, this test suite covers:
The ADB test suite integrates with the main Axis2/C build system:
This comprehensive test suite ensures that the Axis2/C native generator provides robust, memory-safe ADB functionality equivalent to the mature Java implementation while focusing specifically on the Apache Axis TLP's core databinding technology.