You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2023/06/05 13:15:00 UTC

[jira] [Commented] (CXF-8880) Catch wrong XML binding file during parsing

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

Freeman Yue Fang commented on CXF-8880:
---------------------------------------

fixed by
https://github.com/apache/cxf/commit/6266242cb5e720efdd0add51842ea953376494f9

> Catch wrong XML binding file during parsing
> -------------------------------------------
>
>                 Key: CXF-8880
>                 URL: https://issues.apache.org/jira/browse/CXF-8880
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Lukas Lowinger
>            Assignee: Freeman Yue Fang
>            Priority: Critical
>             Fix For: 4.0.2
>
>
> Taking this example https://github.com/apache/camel-spring-boot-examples/tree/bd9f51ed67d74fa5f4e8c4b40935ef88e7089274/soap-cxf 
> (which uses _cxf-codegen-plugin:3.10.1:wsdl2java_) and running `mvn clean package` will generate class *Customer.java* with
> {noformat}protected LocalDate birthDate;{noformat}
> but when changing version to _cxf-codegen-plugin:4.0.0:wsdl2java_ it will generate 
> {noformat}protected XMLGregorianCalendar birthDate;{noformat}
> Which means the binding XML was not used, the problem is that we must use 
> {code}
> xmlns:jaxws="https://jakarta.ee/xml/ns/jaxws"
> xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
> {code}
> instead of 
> {code}
> xmlns:jaxws="https://java.sun.com/xml/ns/jaxws"
> xmlns:jxb="https://java.sun.com/xml/ns/jaxb"
> {code}
> The problem is, that the cxf-codegen plugin doesn't throw any error while loading such wrong XML binding file. Which could lead to problems during upgrading to newer CXF codegen plugin. It should also be documented.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)