[
https://issues.apache.org/jira/browse/CXF-8005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16802527#comment-16802527
]
Tsvetoslav edited comment on CXF-8005 at 3/28/19 8:16 AM:
----------------------------------------------------------
Hi [~coheigea]
Regarding the Jvm configuration . As per your web site
[cxf-codegen-plugin|[http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html],]
JVM configurations have to be under <_plugin>_ but as I can see from your
example, you have set them under <_execution>_.
It's very odd that when I was using the old cxf version(3.2.7) I didn't face
such issue.
I've attached you all schemes which you need from to reproduce my problem
[^wsdl.zip]
Here is my full cxf-codegen-plugin configuration:
{code:java}
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<!-- <configuration>
<fork>once</fork>
<additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
<additionalJvmArgs>-Djavax.xml.accessExternalSchema=all</additionalJvmArgs>
</configuration>-->
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${project.basedir}/src/main/resources/wsdl/ES1_SMSR.wsdl</wsdl>
<wsdlLocation>classpath:wsdl/ES1_SMSR.wsdl</wsdlLocation>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
Please for cxf.version use 3.3.1
was (Author: oneping):
Hi [~coheigea]
First of all, I would like to apologist for all these messages above. I don't
know why the Jira has generated me new messages for all my changes.
Regarding the Jvm configuration . As per your web site
[cxf-codegen-plugin|[http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html],]
JVM configurations have to be under <_plugin>_ but as I can see from your
example, you have set them under <_execution>_.
It's very odd that when I was using the old cxf version(3.2.7) I didn't face
such issue.
I've attached you all schemes which you need from to reproduce my problem
[^wsdl.zip]
Here is my full cxf-codegen-plugin configuration:
{code:java}
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<!-- <configuration>
<fork>once</fork>
<additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
<additionalJvmArgs>-Djavax.xml.accessExternalSchema=all</additionalJvmArgs>
</configuration>-->
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${project.basedir}/src/main/resources/wsdl/ES1_SMSR.wsdl</wsdl>
<wsdlLocation>classpath:wsdl/ES1_SMSR.wsdl</wsdlLocation>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
Please for cxf.version use 3.3.1
> 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
>
>
> 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)