= ./start_wsimport_encoding_bug.sh: line 62: warning: setlocale: LC_ALL: cannot change locale (en_US.ISO8859-1): No such file or directory parsing WSDL... Downloading the WSDL and associated metadata Generating code... Compiling code... Archiving the generated artifacts into destdirISO/HelloWorldClient.jar. Archive: destdirISO/HelloWorldClient.jar inflating: META-INF/wsdl/HelloWorld.wsdl # the encoding of the WSDL-file in the generated client is: text/plain; charset=us-ascii # but in this generated WSDL-File, there is no line with an XML-declaration (with an encoding): These are also german umlaute: ??? ... # so this wsdl (that must also follow all rules from an xml-file) is an invalid xml-file. # run this ISO-8859-1 webservice-client: (will fail) ============================================== # the webservice-client is initializted with the default-charset: UTF-8 # SUCCESS: successfully created webservice client: ch.postfinance.example.helloworld.HelloService@5451c3a8 # the webservice-client will fail again, even when running with ISO-8859-1 default-character encoding ============================================== # the webservice-client is initializted with the default-charset: ISO-8859-1 # SUCCESS: successfully created webservice client: ch.postfinance.example.helloworld.HelloService@5451c3a8 tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$ locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$ tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$ tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$ tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$ tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$ ./start_wsimport_encoding_bug.sh # clean the environment: ======================== # the original WSDL-file, is encoded as UTF-8: application/xml; charset=utf-8 # and its encoding is declared in the XML encoding-line: ... java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) wsimport version "2.2.9" # set the encoding to UTF-8 =========================== parsing WSDL... Downloading the WSDL and associated metadata Generating code... Compiling code... Archiving the generated artifacts into destdirUTF8/HelloWorldClient.jar. Archive: destdirUTF8/HelloWorldClient.jar inflating: META-INF/wsdl/HelloWorld.wsdl # the encoding of the WSDL-file in the generated client is: text/plain; charset=utf-8 # but in this generated WSDL-File, there is no line with an XML-declaration (with an encoding): These are also german umlaute: äöü ... # run this webservice-client within UTF-8: ========================================= # the webservice-client is initializted with the default-charset: UTF-8 # SUCCESS: successfully created webservice client: ch.postfinance.example.helloworld.HelloService@5451c3a8 # set the encoding to ISO-8895-1 ================================ ./start_wsimport_encoding_bug.sh: line 62: warning: setlocale: LC_ALL: cannot change locale (en_US.ISO8859-1): No such file or directory parsing WSDL... Downloading the WSDL and associated metadata Generating code... Compiling code... Archiving the generated artifacts into destdirISO/HelloWorldClient.jar. Archive: destdirISO/HelloWorldClient.jar inflating: META-INF/wsdl/HelloWorld.wsdl # the encoding of the WSDL-file in the generated client is: text/plain; charset=us-ascii # but in this generated WSDL-File, there is no line with an XML-declaration (with an encoding): These are also german umlaute: ??? ... # so this wsdl (that must also follow all rules from an xml-file) is an invalid xml-file. # run this ISO-8859-1 webservice-client: (will fail) ============================================== # the webservice-client is initializted with the default-charset: UTF-8 # SUCCESS: successfully created webservice client: ch.postfinance.example.helloworld.HelloService@5451c3a8 # the webservice-client will fail again, even when running with ISO-8859-1 default-character encoding ============================================== # the webservice-client is initializted with the default-charset: ISO-8859-1 # SUCCESS: successfully created webservice client: ch.postfinance.example.helloworld.HelloService@5451c3a8 tviessma@aubing:/misc/swan/cases/3-11261185931-Postfinanz-wsimport$