[ 
https://issues.apache.org/jira/browse/CXF-8003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801602#comment-16801602
 ] 

Tsvetoslav edited comment on CXF-8003 at 3/26/19 12:36 PM:
-----------------------------------------------------------

Hey [~reta],
 * Do you have any idea why when I've migrated my project dependencies to the 
latest version - Apache-cxf(3.3.1) and Spring boot(2.1.3.RELEASE), my Maven 
build system has started to give me this 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._" When I've returned back to 
the older version of dependencies apache-cxf(3.3.1) and Spring 
boot(1.5.17.RELEASE), the error has gone.

I've found a solution which I don't prefer because it's applied directly in the 
jre  - created a new file "jaxp.properties" under 
"usr/lib/jvm/java-8-oracle/jre/lib" which contains "javax.xml.accessExternalDTD 
= all".

I would like to fix the problem in my pom.xml file. I tried out something like 
this based on this example [External 
DTD|https://programtalk.com/java/external-dtd-failed-restriction-accessexternaldtd/]
 but unfortunately it doesn't work:
{code:java}
<plugin>
     <groupId>org.apache.cxf</groupId>
     <artifactId>cxf-codegen-plugin</artifactId>
     <version>${cxf.version}</version>
     <configuration>
         <fork>always</fork>
         
<additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
     </configuration>
     ......................{code}
 * Regarding CXF User List. What is the best way to drop a message to this 
group - Apache CXF Mailing Lists or Apache CXF User Lists?

Thank you very much(!)

 


was (Author: oneping):
Hey [~reta],
 * Do you have any idea why when I've migrated my project dependencies to the 
latest version - Apache-cxf(3.3.1) and Spring boot(2.1.3.RELEASE), my Maven 
build system has started to give me this 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._" When I've returned back to 
the older version of dependencies apache-cxf(3.3.1) and Spring 
boot(1.5.17.RELEASE), the error has gone.

I've found a solution which I don't prefer because it's applied directly in the 
jre  - created a new file "jaxp.properties" under 
"usr/lib/jvm/java-8-oracle/jre/lib" which contains "javax.xml.accessExternalDTD 
= all".

I would like to fix the problem in my pom.xml file. I tried out something like 
this based on this example[External 
DTD|https://programtalk.com/java/external-dtd-failed-restriction-accessexternaldtd/]
 but unfortunately it doesn't work:
{code:java}
<plugin>
     <groupId>org.apache.cxf</groupId>
     <artifactId>cxf-codegen-plugin</artifactId>
     <version>${cxf.version}</version>
     <configuration>
         <fork>always</fork>
         
<additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
     </configuration>
     ......................{code}
 * Regarding CXF User List. What is the best way to drop a message to this 
group - Apache CXF Mailing Lists or Apache CXF User Lists?

Thank you very much(!)

 

> @MockBean issue in cxf-spring-boot-starter-jaxws
> ------------------------------------------------
>
>                 Key: CXF-8003
>                 URL: https://issues.apache.org/jira/browse/CXF-8003
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tsvetoslav
>            Priority: Minor
>         Attachments: cxf-jaxws-spring-boot-new.zip, image (1).png, 
> image-2019-03-22-15-30-26-348.png, image-2019-03-22-15-30-49-153.png, 
> xmldsig-core-schema.xsd
>
>
> Hi,
>  
> I'm creating Soap web service using wsdl2java plugin. I use 
> cxf-spring-boot-starter-jaxws dependency which gives me an opportunity to 
> create the service using both frameworks Apache-cxf and Spring boot. When I 
> was developing my Integration tests, I faced an issue which blocks my work. 
> I've created a component which is client to another service. This component 
> has been @Autowired in my Implementation class. In my test I would like to 
> mock this component because during the build I don't want to have real call 
> to the service. For some reason when the Implementation method is from *void* 
> return type, the Mocking doesn't work properly. 
> I attached you a Screenshot from my test and implementation class.
> Here is the log from the execution:
> 11:09:09.697 [http-nio-9091-exec-1] INFO c.i.es2.endpoint.SmDpES2PortImpl - 
> Executing operation es2GetEIS
> 11:09:09.698 [http-nio-9091-exec-1] INFO c.i.es2.endpoint.SmDpES2PortImpl -
> *TEST BEAN: CallMockClient_ES2GetEis*
> ----
> 11:09:09.733 [default-workqueue-1] INFO c.i.es2.endpoint.SmDpES2PortImpl - 
> Executing operation es2DownloadProfile
> 11:09:09.734 [default-workqueue-1] INFO c.i.es2.endpoint.SmDpES2PortImpl -
> *TEST BEAN: null* 
> I hope you can help me out for the problem.
> Thank you in advance!
>  
> PS: I tested with different dependencies version and hit the same issue



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to