You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2019/05/14 15:33:00 UTC
[jira] [Comment Edited] (CXF-8005) cxf-codegen-plugin - External DTD: Failed to read external DTD ‘.dtd’
[ https://issues.apache.org/jira/browse/CXF-8005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839534#comment-16839534 ]
Colm O hEigeartaigh edited comment on CXF-8005 at 5/14/19 3:32 PM:
-------------------------------------------------------------------
Hi [~thopap], I fixed this in Santuario (https://issues.apache.org/jira/browse/SANTUARIO-505 + WSS4J (https://issues.apache.org/jira/browse/WSS-649)
was (Author: coheigea):
Hi [~thopap], did you actually run into the problem in WSS4J? It's unclear from your comment. What stacktrace are you getting?
> cxf-codegen-plugin - External DTD: Failed to read external DTD ‘.dtd’
> ---------------------------------------------------------------------
>
> Key: CXF-8005
> URL: https://issues.apache.org/jira/browse/CXF-8005
> Project: CXF
> Issue Type: Bug
> Reporter: Tsvetoslav
> Assignee: Colm O hEigeartaigh
> Priority: Blocker
> Attachments: wsdl.zip, xmldsig-core-schema.xsd
>
>
> Hello,
>
> First I would like to mention that I'm using "Spring Boot CXF JAX-WS Starter" for developing my web service. When I'd migrated my project dependencies to the latest version - Apache-cxf(3.3.1) and Spring boot(2.1.3.RELEASE), the Maven build system started to give me during the build this blocking error "_Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.3.1:wsdl2java failed: org.apache.ws.commons.schema.XmlSchemaException: External DTD: Failed to read external DTD 'XMLSchema.dtd', because 'http' access is not allowed due to restriction set by the accessExternalDTD property._" I've returned back to the older/current version of dependencies Apache-cxf(3.2.7) and Spring boot(1.5.17.RELEASE), the error has gone.
>
> I've found a solution [stackoverflow|[https://stackoverflow.com/a/23012746/7357959]] which I don't prefer because it's applied directly in the jre and I need to look after it when I create a new environment.
>
> Based on your official documentation[maven-cxf-codegen-plugin|[http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html]], section "Other configuration options", I can apply the same configuration to my JVM using cxf-codegen-plugin. I tried out this configuration:
> {code:java}
> <plugin>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-codegen-plugin</artifactId>
> <version>${cxf.version}</version>
> <configuration>
> <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
> </configuration>
> ......................{code}
> based on this example [External DTD|https://programtalk.com/java/external-dtd-failed-restriction-accessexternaldtd/] but unfortunately it doesn't work
> I will appreciate if somebody can take a look at the problem.
> Thank you in advance!
>
> P.S. I tried different configuration option like:
>
> {code:java}
> <configuration>
> <fork>once</fork>
> <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
> <additionalJvmArgs>-Djavax.xml.accessExternalSchema=all</additionalJvmArgs>
> </configuration>{code}
>
> ----
>
> {code:java}
> <configuration>
> <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
> <additionalJvmArgs>-Djavax.xml.accessExternalSchema=all</additionalJvmArgs>
> </configuration>
> {code}
> but unfortunately neither of them was working
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)