Troubleshooting
Problem
Attempts to generate JAX-RPC WebServices from a WSDL file that contain non-ASCII characters result in an "Invalid Character" compilation errors shown in IBM Rational Business Developer.
Symptom
The following steps reproduce the problem:
- Develop a WSDL file that contains non ASCII characters (for example, diacritic characters used in the Danish language)
- Develop a JAX-RPC WebService from this WSDL, targeting IBM WebSphere Application Server v7 or higher
- Open the files with the Java editor in Rational Business Developer and you will find that the diacritic characters do not show correctly:
and there are compilation errors for each such diacritic character:
Syntax error on token "Invalid Character",, expected
Cause
Starting with IBM WebSphere Application Server v7, JAX-RPC WebServices files are generated with fixed UTF-8 encoding. In previous versions of WebSphere Application Server, the encoding was not specified and therefore the default platform encoding was used.
Environment
- Windows Operating System, with English locale
- Rational Business Developer was set to use the default encoding for this environment, namely Cp125
Diagnosing The Problem
- Compile the generated files with a command-line compiler such as
javac
. You will see that they do not produce any compilation errors in this case.
- Regenerate the same WebService targeting IBM WebSphere Application Server v6.1, if available
- Notice that the files emitted by WebSphere Application Server v6.1 also compile correctly in Rational Business Developer
- Compare the corresponding files generated when targeting WebSphere Application Server v6.1 and WebSphere Application Server v7 with a hexadecimal editor. Notice that the diacritic characters are represented differently in the corresponding files.
Resolving The Problem
SOLUTION
You must use UTF-8 encoding in Rational Business Developer to read the WebServices files generated when targeting WebSphere Application Server v7 and higher.
You can change the encoding at the following levels:
If you use the settings at folder/file level, you can use UTF-8 for the WebServices generated files, and continue to use the previous encoding for all the other files.
You must use UTF-8 encoding in Rational Business Developer to read the WebServices files generated when targeting WebSphere Application Server v7 and higher.
You can change the encoding at the following levels:
- Workspace (Window > Preferences > General > Workspace > Text File Encoding)
- Project (Properties > Resource > Text File encoding)
- Folder (Properties > Resource > Text File encoding)
- File (Properties > Resource > Text File encoding)
If you use the settings at folder/file level, you can use UTF-8 for the WebServices generated files, and continue to use the previous encoding for all the other files.
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.5.1;8.5;8.0.1.5;8.0.1.4;8.0.1.3;8.0.1.2;8.0.1.1;8.0.1;7.5.1.8;7.5.1.7;7.5.1.6;7.5.1.5;7.5.1.4;7.5.1.3;7.5.1.2;7.5.1.1;7.5.1;7.5","Line of Business":{"code":"LOB35","label":"Mainframe SW"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.1;7.5.2;7.5.3;7.5.4;7.5.5;7.5.5.1;7.5.5.2;7.5.5.3;7.5.5.4;7.5.5.5;8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.4.1;8.0.4.2;8.5;8.5.1","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.1;7.5.2;7.5.3;7.5.4;7.5.5;7.5.5.1;7.5.5.2;7.5.5.3;7.5.5.4;7.5.5.5;8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.4.1;8.0.4.2;8.5;8.5.1","Line of Business":{"code":"LOB15","label":"Integration"}}]
Was this topic helpful?
Document Information
Modified date:
29 May 2020
UID
swg21637620