[JBoss JIRA] (JBWS-3957) publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
by Martin Both (JIRA)
[ https://issues.jboss.org/browse/JBWS-3957?page=com.atlassian.jira.plugin.... ]
Martin Both commented on JBWS-3957:
-----------------------------------
Hi Jim,
don't correct a mistake with an other mistake.
JBoss should write a right file and not try to read a wrong file.
Why not always write UTF-8 files like the outer WSDL file, which is in UTF-8.
One more comment
"should be published" means not writing to file system.
One more comment
Please write an email to one developer of WSDL4J as I did.
Maybe this could help to improve WSDL4J also.
Martin
Here is the stack trace
2015-10-29 12:26:36,778 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 3.3.4.Final-redhat-1
2015-10-29 12:26:36,791 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 39) JBAS011800: Aktivierung des Naming-Untersystems
2015-10-29 12:26:36,806 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Aktivierung des Infinispan-Untersystems.
2015-10-29 12:26:36,813 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 37) JBAS012615: Aktivierte folgende JSF-Implementierungen: [main, 1.2]
2015-10-29 12:26:36,829 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013371: Aktivierung des Sicherheits-Untersystems
2015-10-29 12:26:36,832 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starte Naming-Dienst
2015-10-29 12:26:36,843 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013370: Aktuelle PicketBox Version=4.1.1.Final-redhat-1
2015-10-29 12:26:36,844 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
2015-10-29 12:26:36,849 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Aktivierung der WebServices-Erweiterung
2015-10-29 12:26:36,870 INFO [org.jboss.as.mail.extension] (MSC service thread 1-8) JBAS015400: Gebundene Mail-Session [java:jboss/mail/Default]
2015-10-29 12:26:36,906 INFO [org.jboss.as.connector.logging] (MSC service thread 1-2) JBAS010408: Starten von JCA Untersystem (IronJacamar 1.0.31.Final-redhat-1)
2015-10-29 12:26:36,936 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deployment von JDBC-konformem Treiber class org.h2.Driver (Version 1.3)
2015-10-29 12:26:37,048 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 27) JBAS014612: Operation ("add") fehlgeschlagen - Adresse: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mariadb")
]) - Fehlerbeschreibung: "JBAS010441: Laden von Modul für Treiber [org.mariadb] fehlgeschlagen"
2015-10-29 12:26:37,471 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Start von FileSystemDeploymentService für Verzeichnis C:\Users\A300859\workspaces\ProKom2.0_trunk\Servers\JBossEAP6.4\standalone\deployments
2015-10-29 12:26:37,481 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starte Deployment von "VzEBeauftragungService.war" (runtime-name: "VzEBeauftragungService.war")
2015-10-29 12:26:37,506 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Horche auf 127.0.0.1:9999
2015-10-29 12:26:37,507 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
2015-10-29 12:26:37,520 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
2015-10-29 12:26:37,522 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Horche auf 127.0.0.1:4447
2015-10-29 12:26:37,526 INFO [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.4.Final-redhat-1
2015-10-29 12:26:37,711 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Gebundene Datenquelle [java:jboss/datasources/ExampleDS]
2015-10-29 12:26:37,781 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8443
2015-10-29 12:26:37,781 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8443
2015-10-29 12:26:38,347 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-8) JBWS024061: Adding service endpoint metadata: id=de.telekom.prokom.ws.vzebeauftragung.VzEBeauftragungImpl
address=http://localhost:8080/telekom/VzEBeauftragungService
implementor=de.telekom.prokom.ws.vzebeauftragung.VzEBeauftragungImpl
serviceName={http://services.tdeu.telekom.net/ServAndResMgmt/TechOrderMgm...
portName={http://services.tdeu.telekom.net/ServAndResMgmt/TechOrderMgmt/V...
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
2015-10-29 12:26:38,538 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-8) Creating Service {http://services.tdeu.telekom.net/ServAndResMgmt/TechOrderMgmt/VzEBeauftragung_v05.00/provider}VzEBeauftragungService from class net.telekom.tdeu.services.servandresmgmt.techordermgmt.vzebeauftragung_v05_00.provider.VzEBeauftragung
2015-10-29 12:26:39,291 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-8) Setting the server's publish address to be http://localhost:8080/telekom/VzEBeauftragungService
2015-10-29 12:26:39,350 INFO [org.jboss.ws.cxf.deployment] (MSC service thread 1-8) JBWS024074: WSDL published to: file:/C:/Users/A300859/workspaces/ProKom2.0_trunk/Servers/JBossEAP6.4/standalone/data/wsdl/VzEBeauftragungService.war/VzEBeauftragungService.wsdl
[Fatal Error] :290:35: Invalid byte 2 of 3-byte UTF-8 sequence.
2015-10-29 12:26:39,457 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."VzEBeauftragungService.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."VzEBeauftragungService.war".INSTALL: JBAS018733: Verarbeitung von Phase INSTALL von deployment "VzEBeauftragungService.war" fehlgeschlagen
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: java.lang.RuntimeException: JBWS024076: Service {http://services.tdeu.telekom.net/ServAndResMgmt/TechOrderMgmt/VzEBeauftragung_v05.00/provider}VzEBeauftragungService, cannot publish wsdl to: C:\Users\A300859\workspaces\ProKom2.0_trunk\Servers\JBossEAP6.4\standalone\data\wsdl\VzEBeauftragungService.war\VzEBeauftragungService.wsdl
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:107)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:131)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:71)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:118)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:136)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:68)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 5 more
Caused by: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 290; columnNumber: 35; Invalid byte 2 of 3-byte UTF-8 sequence.
at org.jboss.ws.common.DOMUtils.parse(DOMUtils.java:274)
at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishWsdlImports(AbstractWSDLFilePublisher.java:179)
at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:89)
... 14 more
2015-10-29 12:26:39,467 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("deploy") fehlgeschlagen - Adresse: ([("deployment" => "VzEBeauftragungService.war")]) - Fehlerbeschreibung: {"JBAS014671: Fehlgeschlagene Dienste" => {"jboss.deployment.unit.\"VzEBeauftragungService.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"VzEBeauftragungService.war\".INSTALL: JBAS018733: Verarbeitung von Phase INSTALL von deployment \"VzEBeauftragungService.war\" fehlgeschlagen
Caused by: java.lang.RuntimeException: JBWS024076: Service {http://services.tdeu.telekom.net/ServAndResMgmt/TechOrderMgmt/VzEBeauftragung_v05.00/provider}VzEBeauftragungService, cannot publish wsdl to: C:\\Users\\A300859\\workspaces\\ProKom2.0_trunk\\Servers\\JBossEAP6.4\\standalone\\data\\wsdl\\VzEBeauftragungService.war\\VzEBeauftragungService.wsdl
Caused by: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 290; columnNumber: 35; Invalid byte 2 of 3-byte UTF-8 sequence."}}
2015-10-29 12:26:39,468 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") fehlgeschlagen - Adresse: ([
("subsystem" => "datasources"),
("data-source" => "prokom2pool")
]) - Fehlerbeschreibung: {"JBAS014771: Dienste mit fehlenden/unverfügbaren Abhängigkeiten " => [
"jboss.data-source.java:/prokom-ds [jboss.jdbc-driver.mariadb] fehlt",
"jboss.driver-demander.java:/prokom-ds [jboss.jdbc-driver.mariadb] fehlt"
]}
2015-10-29 12:26:39,469 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("enable") fehlgeschlagen - Adresse: ([
("subsystem" => "datasources"),
("data-source" => "prokom2pool")
]) - Fehlerbeschreibung: {"JBAS014879: Einer oder mehrere Dienste konnten wegen der Nichtverfügbarkeit von einer oder mehreren indirekten Abhängigkeiten nicht gestartet werden." => {
"Dienste, deren Start nicht möglich war:" => [
"jboss.data-source.reference-factory.prokom2pool",
"jboss.naming.context.java.prokom-ds"
],
"Dienste, die die Ursache sein können:" => ["jboss.jdbc-driver.mariadb"]
}}
2015-10-29 12:26:39,496 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS015859: "VzEBeauftragungService.war" deployed (runtime-name: "VzEBeauftragungService.war")
2015-10-29 12:26:39,501 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Dienst-Statusbericht
JBAS014775: Neue fehlende/unbefriedigte Abhängigkeiten:
service jboss.jdbc-driver.mariadb (fehlende) Dependents: [service jboss.driver-demander.java:/prokom-ds, service jboss.data-source.java:/prokom-ds]
JBAS014777: Dienste, deren Start fehlgeschlagen ist: service jboss.deployment.unit."VzEBeauftragungService.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."VzEBeauftragungService.war".INSTALL: JBAS018733: Verarbeitung von Phase INSTALL von deployment "VzEBeauftragungService.war" fehlgeschlagen
2015-10-29 12:26:39,516 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: HTTP-Management Interface ist empfangsbereit auf http://127.0.0.1:9990/Management
2015-10-29 12:26:39,516 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin-Konsole horcht an http://127.0.0.1:9990
2015-10-29 12:26:39,517 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) wurde gestartet (mit Fehlern) in 4568ms - 183 von 226 Services gestartet (Der Start von 5 Diensten ist fehlgeschlagen oder die Abhängigkeiten wurden nicht aufgelöst, 63 Dienste sind "lazy", passiv oder werden bei Bedarf geladen)
2015-10-29 12:26:39,729 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Deployment von VzEBeauftragungService.war in (runtime-name: "VzEBeauftragungService.war") 6ms gestoppt
2015-10-29 12:26:39,825 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015858: "VzEBeauftragungService.war" undeployed (runtime-name: "VzEBeauftragungService.war")
2015-10-29 12:26:39,825 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Dienst-Statusbericht
JBAS014777: Dienste, deren Start fehlgeschlagen ist: service jboss.deployment.unit."VzEBeauftragungService.war".INSTALL
2015-10-29 12:26:39,885 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) JBWEB003075: Coyote HTTP/1.1 pausing on: http-/127.0.0.1:8080
2015-10-29 12:26:39,885 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003075: Coyote HTTP/1.1 pausing on: http-/127.0.0.1:8443
2015-10-29 12:26:39,886 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) JBWEB003077: Coyote HTTP/1.1 stopping on : http-/127.0.0.1:8080
2015-10-29 12:26:39,886 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003077: Coyote HTTP/1.1 stopping on : http-/127.0.0.1:8443
2015-10-29 12:26:39,886 INFO [org.apache.catalina.core] (MSC service thread 1-1) JBWEB001079: Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/] has not been started
2015-10-29 12:26:39,887 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010409: Ungebundene Datenquelle [java:jboss/datasources/ExampleDS]
2015-10-29 12:26:39,921 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015950: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) in 51ms gestoppt
> publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
> ------------------------------------------------------------------------------
>
> Key: JBWS-3957
> URL: https://issues.jboss.org/browse/JBWS-3957
> Project: JBoss Web Services
> Issue Type: Bug
> Environment: WildFly 9, Windows 7 with default Java file.encoding Cp1252.
> Reporter: Martin Both
> Assignee: Jim Ma
> Fix For: jbossws-cxf-5.2.0.Final
>
>
> I would like to deploy a WebService but I get an exception. The WSDL XSD file contains an german character 'ä'. See:
> Here is the part of the XSD:
> <xs:simpleType name="Teilnehmerart">
> <xs:restriction base="xs:string">
> <xs:enumeration value="Privat"></xs:enumeration>
> <xs:enumeration value="Geschäftlich"></xs:enumeration>
> </xs:restriction>
> </xs:simpleType>
> The JBoss class org.jboss.ws.common.utils.AbstractWSDLFilePublisher
> writes the imported WSDL file using a FileWriter at line 166 + 167.
> FileWriter fw = new FileWriter(targetFile);
> wsdlWriter.writeWSDL(subdef, fw);
> In a next step this file is read again and results in an exception:
> Invalid byte 2 of 3-byte UTF-8 sequence.
> This is because the file is written in Cp1252 enconding together with an XML prolog
> UTF-8 encoding. That is crazy and cannot work.
> A workaround would be to set the Java file.encoding to UTF-8 but that is not what I want.
> There are two solutions:
> I think it is better to create a binary OutputStream instead of creating a FileWriter.
> The wsdlWriter offers two methods! The method with OutputStream argument would always write XML files using a UTF-8 encoding.
> An other way to fix that would be a bug fix to WSDL4J 1.6.3.
> The WSDL4J method com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Definition wsdlDef, Writer sink) does map default Java file.encoding to "UTF-8". That is sometimes wrong.
> The class com.ibm.wsdl.util.xml.DOM2Writer should have an XmlEncodingMapping from "Cp1252" to "Windows-1252". That would fix the problem also. But I think it would be better to use always UTF-8 with the OutputStream method.
> Best regards
> Martin Both
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (JBWS-3957) publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
by Jim Ma (JIRA)
[ https://issues.jboss.org/browse/JBWS-3957?page=com.atlassian.jira.plugin.... ]
Jim Ma commented on JBWS-3957:
------------------------------
Hi Martin,
Thanks for your quick response. Cp1252 encoding is a standard xml encoding, I think WSDL4j should add this support. Regards to write and read wsdl , this behavior is specified in JSR 109(Web Services for Java EE). It requires the wsdl should be published after endpoint deployment. Given the wsdl4j is slowly updated(the latest release is two years ago), we can look at what can we do in jbossws code to fix this issue. I don't have a cp1252 windows machine at my hand, can you please paste the error stacktrace which contains the error "Invalid byte 2 of 3-byte UTF-8 sequence" ? I'll look at if we can manually set something to fix the read.
Thanks,
Jim
> publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
> ------------------------------------------------------------------------------
>
> Key: JBWS-3957
> URL: https://issues.jboss.org/browse/JBWS-3957
> Project: JBoss Web Services
> Issue Type: Bug
> Environment: WildFly 9, Windows 7 with default Java file.encoding Cp1252.
> Reporter: Martin Both
> Assignee: Jim Ma
> Fix For: jbossws-cxf-5.2.0.Final
>
>
> I would like to deploy a WebService but I get an exception. The WSDL XSD file contains an german character 'ä'. See:
> Here is the part of the XSD:
> <xs:simpleType name="Teilnehmerart">
> <xs:restriction base="xs:string">
> <xs:enumeration value="Privat"></xs:enumeration>
> <xs:enumeration value="Geschäftlich"></xs:enumeration>
> </xs:restriction>
> </xs:simpleType>
> The JBoss class org.jboss.ws.common.utils.AbstractWSDLFilePublisher
> writes the imported WSDL file using a FileWriter at line 166 + 167.
> FileWriter fw = new FileWriter(targetFile);
> wsdlWriter.writeWSDL(subdef, fw);
> In a next step this file is read again and results in an exception:
> Invalid byte 2 of 3-byte UTF-8 sequence.
> This is because the file is written in Cp1252 enconding together with an XML prolog
> UTF-8 encoding. That is crazy and cannot work.
> A workaround would be to set the Java file.encoding to UTF-8 but that is not what I want.
> There are two solutions:
> I think it is better to create a binary OutputStream instead of creating a FileWriter.
> The wsdlWriter offers two methods! The method with OutputStream argument would always write XML files using a UTF-8 encoding.
> An other way to fix that would be a bug fix to WSDL4J 1.6.3.
> The WSDL4J method com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Definition wsdlDef, Writer sink) does map default Java file.encoding to "UTF-8". That is sometimes wrong.
> The class com.ibm.wsdl.util.xml.DOM2Writer should have an XmlEncodingMapping from "Cp1252" to "Windows-1252". That would fix the problem also. But I think it would be better to use always UTF-8 with the OutputStream method.
> Best regards
> Martin Both
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (JBWS-3957) publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
by Martin Both (JIRA)
[ https://issues.jboss.org/browse/JBWS-3957?page=com.atlassian.jira.plugin.... ]
Martin Both commented on JBWS-3957:
-----------------------------------
Hello Jim Ma,
it is not my code. It is the code of JBoss application server witch write and read WSDL files during a deployment of a webservice if there is no explicit wsdlLocation in the war file.
1. I have a WSDL file in UTF-8 encoding. Both file encoding and XML-encoding are UTF-8.
2. I have generate Java code with JAX-WS and write my service implementation.
3. I create a deployment archive. A war file without the original wsdl file but it is based on the original wsdl file.
4. I deploy my war on JBoss (or WildFly it's the same error). JBoss generate a new WSDL file in the data directory and read also this generated files a second later. That is stupid but that it is. If the JBoss Java VM is configured to use the file.encoding Cp1252 than JBoss wirte imported WSDL files in that encoding but says in the XML-Prolog that the encoding is UTF-8 but it is'nt.
JBoss reads the corrupt WSDL and complain that the file is wrong. How stupid! The deployment ends with an error.
I'm using a selfmade fix of WSDL4J. I try to open a ticket against WSDL4J but it is not possible. Maybe WSDL4J is to old or the guys of WSDL4J like there own mistakes so much. I don't know.
It is also possible to fix that error in JBoss if JBoss would write WSDL import files always in UTF-8 encoding. Or better don't write and read because it is useless and would be faster without.
My fix to WSDL4J is to remove the default mapping because than WSDL4J would throw errors in case of missing mapping. Much importend is the new mapping between Cp1252 and Wndows-1252..
//xmlEncodingMap.put(System.getProperty("file.encoding"),
// Constants.XML_DECL_DEFAULT);
xmlEncodingMap.put("Cp1252", "Windows-1252");
Martin
> publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
> ------------------------------------------------------------------------------
>
> Key: JBWS-3957
> URL: https://issues.jboss.org/browse/JBWS-3957
> Project: JBoss Web Services
> Issue Type: Bug
> Environment: WildFly 9, Windows 7 with default Java file.encoding Cp1252.
> Reporter: Martin Both
> Assignee: Jim Ma
> Fix For: jbossws-cxf-5.2.0.Final
>
>
> I would like to deploy a WebService but I get an exception. The WSDL XSD file contains an german character 'ä'. See:
> Here is the part of the XSD:
> <xs:simpleType name="Teilnehmerart">
> <xs:restriction base="xs:string">
> <xs:enumeration value="Privat"></xs:enumeration>
> <xs:enumeration value="Geschäftlich"></xs:enumeration>
> </xs:restriction>
> </xs:simpleType>
> The JBoss class org.jboss.ws.common.utils.AbstractWSDLFilePublisher
> writes the imported WSDL file using a FileWriter at line 166 + 167.
> FileWriter fw = new FileWriter(targetFile);
> wsdlWriter.writeWSDL(subdef, fw);
> In a next step this file is read again and results in an exception:
> Invalid byte 2 of 3-byte UTF-8 sequence.
> This is because the file is written in Cp1252 enconding together with an XML prolog
> UTF-8 encoding. That is crazy and cannot work.
> A workaround would be to set the Java file.encoding to UTF-8 but that is not what I want.
> There are two solutions:
> I think it is better to create a binary OutputStream instead of creating a FileWriter.
> The wsdlWriter offers two methods! The method with OutputStream argument would always write XML files using a UTF-8 encoding.
> An other way to fix that would be a bug fix to WSDL4J 1.6.3.
> The WSDL4J method com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Definition wsdlDef, Writer sink) does map default Java file.encoding to "UTF-8". That is sometimes wrong.
> The class com.ibm.wsdl.util.xml.DOM2Writer should have an XmlEncodingMapping from "Cp1252" to "Windows-1252". That would fix the problem also. But I think it would be better to use always UTF-8 with the OutputStream method.
> Best regards
> Martin Both
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (JBWS-3957) publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
by Jim Ma (JIRA)
[ https://issues.jboss.org/browse/JBWS-3957?page=com.atlassian.jira.plugin.... ]
Jim Ma commented on JBWS-3957:
------------------------------
Hi Martin,
Yes. Like what you said wsdl4j doesn't support cp1252 encoding :
{code:java}
static
{
xmlEncodingMap.put(null, Constants.XML_DECL_DEFAULT);
xmlEncodingMap.put(System.getProperty("file.encoding"),
Constants.XML_DECL_DEFAULT);
xmlEncodingMap.put("UTF8", "UTF-8");
xmlEncodingMap.put("UTF-16", "UTF-16");
xmlEncodingMap.put("UnicodeBig", "UTF-16");
xmlEncodingMap.put("UnicodeLittle", "UTF-16");
xmlEncodingMap.put("ASCII", "US-ASCII");
xmlEncodingMap.put("ISO8859_1", "ISO-8859-1");
xmlEncodingMap.put("ISO8859_2", "ISO-8859-2");
xmlEncodingMap.put("ISO8859_3", "ISO-8859-3");
xmlEncodingMap.put("ISO8859_4", "ISO-8859-4");
xmlEncodingMap.put("ISO8859_5", "ISO-8859-5");
xmlEncodingMap.put("ISO8859_6", "ISO-8859-6");
xmlEncodingMap.put("ISO8859_7", "ISO-8859-7");
xmlEncodingMap.put("ISO8859_8", "ISO-8859-8");
xmlEncodingMap.put("ISO8859_9", "ISO-8859-9");
xmlEncodingMap.put("ISO8859_13", "ISO-8859-13");
xmlEncodingMap.put("ISO8859_15_FDIS", "ISO-8859-15");
xmlEncodingMap.put("GBK", "GBK");
xmlEncodingMap.put("Big5", "Big5");
}
{code}
What is your code to read this wsdl ? If the xml prolg encoding is set to "UTF-8", the underlying encoding should be set to "UTF-8" when read it.
> publishWsdlImports writes WSDL-XML files with wrong characterset under Windows
> ------------------------------------------------------------------------------
>
> Key: JBWS-3957
> URL: https://issues.jboss.org/browse/JBWS-3957
> Project: JBoss Web Services
> Issue Type: Bug
> Environment: WildFly 9, Windows 7 with default Java file.encoding Cp1252.
> Reporter: Martin Both
> Assignee: Jim Ma
> Fix For: jbossws-cxf-5.2.0.Final
>
>
> I would like to deploy a WebService but I get an exception. The WSDL XSD file contains an german character 'ä'. See:
> Here is the part of the XSD:
> <xs:simpleType name="Teilnehmerart">
> <xs:restriction base="xs:string">
> <xs:enumeration value="Privat"></xs:enumeration>
> <xs:enumeration value="Geschäftlich"></xs:enumeration>
> </xs:restriction>
> </xs:simpleType>
> The JBoss class org.jboss.ws.common.utils.AbstractWSDLFilePublisher
> writes the imported WSDL file using a FileWriter at line 166 + 167.
> FileWriter fw = new FileWriter(targetFile);
> wsdlWriter.writeWSDL(subdef, fw);
> In a next step this file is read again and results in an exception:
> Invalid byte 2 of 3-byte UTF-8 sequence.
> This is because the file is written in Cp1252 enconding together with an XML prolog
> UTF-8 encoding. That is crazy and cannot work.
> A workaround would be to set the Java file.encoding to UTF-8 but that is not what I want.
> There are two solutions:
> I think it is better to create a binary OutputStream instead of creating a FileWriter.
> The wsdlWriter offers two methods! The method with OutputStream argument would always write XML files using a UTF-8 encoding.
> An other way to fix that would be a bug fix to WSDL4J 1.6.3.
> The WSDL4J method com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Definition wsdlDef, Writer sink) does map default Java file.encoding to "UTF-8". That is sometimes wrong.
> The class com.ibm.wsdl.util.xml.DOM2Writer should have an XmlEncodingMapping from "Cp1252" to "Windows-1252". That would fix the problem also. But I think it would be better to use always UTF-8 with the OutputStream method.
> Best regards
> Martin Both
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (JBWS-3956) Random webservice deployment failure on windows
by Alessio Soldano (JIRA)
[ https://issues.jboss.org/browse/JBWS-3956?page=com.atlassian.jira.plugin.... ]
Alessio Soldano updated JBWS-3956:
----------------------------------
Fix Version/s: jbossws-cxf-5.2.0.Final
> Random webservice deployment failure on windows
> -----------------------------------------------
>
> Key: JBWS-3956
> URL: https://issues.jboss.org/browse/JBWS-3956
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-cxf
> Reporter: Jan Blizňák
> Assignee: Jim Ma
> Fix For: jbossws-cxf-5.2.0.Final
>
> Attachments: jaxws-samples-wsrm-store.war
>
>
> When you try to deploy deployment with webservices and with -ds.xml (not sure if it is relevant) it from time to time cause a failure like this:
> {code:java}
> 14:42:05,312 WARN [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.jaxws-samples-wsrm-store.war" is using a private module ("org.apache.cxf.impl:main") which may be changed or removed in future versions without notice.
> 14:42:05,347 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-4) JBWS024061: Adding service endpoint metadata: id=SimpleService
> address=http://[::1]:8080/jaxws-samples-wsrm-store
> implementor=org.jboss.test.ws.jaxws.samples.wsrm.store.EndpointImpl
> serviceName={http://www.jboss.org/jbossws/ws-extensions/wsrm}RMService
> portName={http://www.jboss.org/jbossws/ws-extensions/wsrm}RMEndpointPort
> annotationWsdlLocation=null
> wsdlLocationOverride=null
> mtomEnabled=false
> 14:42:05,355 INFO [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-4) Creating Service {http://www.jboss.org/jbossws/ws-extensions/wsrm}RMService from class org.jboss.test.ws.jaxws.samples.wsrm.store.Endpoint
> 14:42:05,371 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-4) Setting the server's publish address to be http://[::1]:8080/jaxws-samples-wsrm-store
> 14:42:05,381 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."jaxws-samples-wsrm-store.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jaxws-samples-wsrm-store.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "jaxws-samples-wsrm-store.war"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoClassDefFoundError: org/jboss/ws/common/Loggers
> at org.jboss.test.ws.jaxws.samples.wsrm.store.RMStoreFeature.initializeProvider(RMStoreFeature.java:85)
> at org.apache.cxf.feature.AbstractFeature.initialize(AbstractFeature.java:45)
> at org.apache.cxf.frontend.ServerFactoryBean.applyFeatures(ServerFactoryBean.java:249)
> at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:211)
> at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
> at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:460)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:338)
> at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:79)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543)
> at org.jboss.wsf.stack.cxf.configuration.BusHolder.configure(BusHolder.java:231)
> at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:97)
> at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:59)
> at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
> ... 5 more
> Caused by: java.lang.ClassNotFoundException: org.jboss.ws.common.Loggers from [Module "deployment.jaxws-samples-wsrm-store.war:main" from Service Module Loader]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
> ... 20 more
> 14:42:05,402 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/rmclientdb]
> 14:42:05,403 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/rmdb]
> 14:42:05,403 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 5) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "jaxws-samples-wsrm-store.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"jaxws-samples-wsrm-store.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jaxws-samples-wsrm-store.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"jaxws-samples-wsrm-store.war\"
> Caused by: java.lang.NoClassDefFoundError: org/jboss/ws/common/Loggers
> Caused by: java.lang.ClassNotFoundException: org.jboss.ws.common.Loggers from [Module \"deployment.jaxws-samples-wsrm-store.war:main\" from Service Module Loader]"}}
> 14:42:05,404 ERROR [org.jboss.as.server] (management-handler-thread - 5) WFLYSRV0021: Deploy of deployment "jaxws-samples-wsrm-store.war" was rolled back with the following failure message:
> {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"jaxws-samples-wsrm-store.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jaxws-samples-wsrm-store.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"jaxws-samples-wsrm-store.war\"
> Caused by: java.lang.NoClassDefFoundError: org/jboss/ws/common/Loggers
> Caused by: java.lang.ClassNotFoundException: org.jboss.ws.common.Loggers from [Module \"deployment.jaxws-samples-wsrm-store.war:main\" from Service Module Loader]"}}
> 14:42:05,423 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0010: Unbound data source [java:jboss/datasources/rmdb]
> 14:42:05,423 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0010: Unbound data source [java:jboss/datasources/rmclientdb]
> 14:42:05,427 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment jaxws-samples-wsrm-store.war (runtime-name: jaxws-samples-wsrm-store.war) in 23ms
> 14:42:05,427 INFO [org.jboss.as.controller] (management-handler-thread - 5) WFLYCTL0183: Service status report
> WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."jaxws-samples-wsrm-store.war".INSTALL
> {code}
> It might be cause by some sort of race condition because its intermittent nature, I was not able to narrow it down so far.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (JBWS-3955) JBossWS testsuite failure on Windows - CreateProcess error=206, The filename or extension is too long
by Alessio Soldano (JIRA)
[ https://issues.jboss.org/browse/JBWS-3955?page=com.atlassian.jira.plugin.... ]
Alessio Soldano updated JBWS-3955:
----------------------------------
Fix Version/s: jbossws-cxf-5.2.0.Final
> JBossWS testsuite failure on Windows - CreateProcess error=206, The filename or extension is too long
> -----------------------------------------------------------------------------------------------------
>
> Key: JBWS-3955
> URL: https://issues.jboss.org/browse/JBWS-3955
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-cxf
> Environment: Windows
> Reporter: Jan Blizňák
> Assignee: Jim Ma
> Fix For: jbossws-cxf-5.2.0.Final
>
>
> When running whole jbossws-cxf testsuite on windows node, it fails on executing ant task because of long classpath.
> {code:java}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (wsconsume) on project jbossws-cxf-shared-tests: An Ant BuildException has occured: The following error occurred while executing this line:
> [ERROR] W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\build\stack-cxf\modules\testsuite\shared-tests\scripts\antrun-wsconsume.xml:41: The following error occurred while executing this line:
> [ERROR] W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\build\stack-cxf\modules\testsuite\shared-tests\scripts\antrun-wsconsume.xml:72: java.io.IOException: Cannot run program "W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\jdk1.8.0.unlimited.BC\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
> [ERROR] around Ant part ...<ant antfile="scripts/antrun-wsconsume.xml" target="wsconsume"/>... @ 10:67 in W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\build\stack-cxf\modules\testsuite\shared-tests\target\antrun\build-main.xml
> [ERROR] -> [Help 1]
> {code}
> Incorporating this [task|https://ant.apache.org/manual/Tasks/manifestclasspath.html] in ant script might be a way how to workaround this issue.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (JBWS-3955) JBossWS testsuite failure on Windows - CreateProcess error=206, The filename or extension is too long
by Jim Ma (JIRA)
[ https://issues.jboss.org/browse/JBWS-3955?page=com.atlassian.jira.plugin.... ]
Jim Ma updated JBWS-3955:
-------------------------
Assignee: Jim Ma (was: Alessio Soldano)
> JBossWS testsuite failure on Windows - CreateProcess error=206, The filename or extension is too long
> -----------------------------------------------------------------------------------------------------
>
> Key: JBWS-3955
> URL: https://issues.jboss.org/browse/JBWS-3955
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-cxf
> Environment: Windows
> Reporter: Jan Blizňák
> Assignee: Jim Ma
>
> When running whole jbossws-cxf testsuite on windows node, it fails on executing ant task because of long classpath.
> {code:java}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (wsconsume) on project jbossws-cxf-shared-tests: An Ant BuildException has occured: The following error occurred while executing this line:
> [ERROR] W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\build\stack-cxf\modules\testsuite\shared-tests\scripts\antrun-wsconsume.xml:41: The following error occurred while executing this line:
> [ERROR] W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\build\stack-cxf\modules\testsuite\shared-tests\scripts\antrun-wsconsume.xml:72: java.io.IOException: Cannot run program "W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\jdk1.8.0.unlimited.BC\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
> [ERROR] around Ant part ...<ant antfile="scripts/antrun-wsconsume.xml" target="wsconsume"/>... @ 10:67 in W:\workspace\eap-7x-jbossws-testsuite-windows\59544db6\build\stack-cxf\modules\testsuite\shared-tests\target\antrun\build-main.xml
> [ERROR] -> [Help 1]
> {code}
> Incorporating this [task|https://ant.apache.org/manual/Tasks/manifestclasspath.html] in ant script might be a way how to workaround this issue.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months