[
https://issues.apache.org/jira/browse/AXIS2C-1330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1330.
-------------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
When multiple services share identical type names (e.g., both Mapping.wsdl
and Geocoding.wsdl have a Coordinate type), the generated files would
conflict at link time. The new -prefix option prepends a user-specified
string to all generated filenames, type names, and function names.
Example usage:
wsdl2c-native -prefix Mapping_ -uri Mapping.wsdl
wsdl2c-native -prefix Geocoding_ -uri Geocoding.wsdl
This generates unique files:
Mapping_adb_Coordinate.c with Mapping_adb_Coordinate_t
Geocoding_adb_Coordinate.c with Geocoding_adb_Coordinate_t
Changes:
- Add prefix field to wsdl2c_options_t structure
- Add -prefix command line option parsing
- Apply prefix to stub header/source filenames and functions
- Apply prefix to ADB type filenames, types, and functions
- Add unit test for prefix functionality
> Prevent name clashes when using multiple services that happen to have
> identical named items
> -------------------------------------------------------------------------------------------
>
> Key: AXIS2C-1330
> URL: https://issues.apache.org/jira/browse/AXIS2C-1330
> Project: Axis2-C
> Issue Type: Improvement
> Components: code generation
> Reporter: Patrick van Beem
> Priority: Minor
> Fix For: 2.0.0
>
> Original Estimate: 16h
> Remaining Estimate: 16h
>
> Problem:
> When using multiple services in one project that happen to have identical
> named items, identical named structures and functions are generated in
> identical named files, but with specific content for the different services.
> This can not be linked.
> Solution:
> Add an optional command line option to the generator application that adds a
> prefix to every filename, structure, function, typedefinition, etc... of a
> specific code generation session. This allows the developer to generate
> unique c-code for each service.
> Example scenario:
> - an application needs to use two services - let's call their
> respective wsdl files Mapping.wsdl and Geocoding.wsdl
> - both services use a type called Coordinate, but it's not the same
> type
> - upon generating C code from the wsdl files using WSDL2C, we get
> two adb_Coordinate.c and two adb_Coordinate.h files (one for each wsdl),
> with two adb_Coordinate_create(const axutil_env_t* env) functions etc.
> - this leads to linkage errors
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]