[
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)