添加要bindingFile的jaxb配置文件,如下:

<jaxb:bindings version="2.1" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
<jaxb:globalBindings generateElementProperty="false" />
</jaxb:bindings>

引入bindingFile的jaxb配置文件,如下:

<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>generate-sources-w2j</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}\src\main\resources\wsdl\20180628-OnePoint.svc-D11V2-single.wsdl</wsdl>
<extendedSoapHeaders>true</extendedSoapHeaders>
<autoNameResolution>true</autoNameResolution>
<bindingFiles>
<bindingFile>${basedir}\src\main\resources\wsdl\jaxb-bindings.xml</bindingFile>
</bindingFiles>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

转载:https://stackoverflow.com/questions/12508741/jaxb-generating-jaxbelementstring-instead-of-string

Maven CXF wsdl2Java String生成JAXBElement<Xxx> 解决方法的更多相关文章

  1. rpm包安装过程中依赖问题“libc.so.6 is needed by XXX”解决方法

    rpm包安装过程中依赖问题"libc.so.6 is needed by XXX"解决方法 折腾了几天,终于搞定了CentOS上的Canon LBP2900打印机驱动.中间遇到了一 ...

  2. maven的pom报plugins却是的解决方法(转)

    maven的pom报plugins却是的解决方法. 引用 Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom: ...

  3. maven的pom报plugins却是的解决方法2

    Failure to transfer org.apache.maven.plugins:maven-plugins:pom:25 from https://repo.maven.apache.org ...

  4. sudo: unable to resolve host XXX 解决方法

    执行sudo命令时候,总是提示sudo: unable to resolve host xxx 解决方法: 法1. 在/etc/hosts/添加hosts映射, 如127.0.0.1 xxx 法2. ...

  5. maven的pom报plugins缺失的解决方法

    maven的pom报plugins却是的解决方法. 引用 Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom: ...

  6. 关于python3 使用pycharm+unittest+html+HTMLTestRunner 测试用例运行正常,但却不能生成测试报告的解决方法

    关于python3 使用pycharm+unittest+html+HTMLTestRunner 测试用例运行正常,但却不能生成测试报告的解决方法 这个问题我也遇到过,以下是解决办法   该方法适用于 ...

  7. Maven无法下载com.oracle:ojdbc.jar解决方法

    Maven无法下载com.oracle:ojdbc.jar解决方法 从maven仓库中下载失败,可以搭建私服nexus,也可以将jar下载到本地然后导入local_repository 使用maven ...

  8. spring boot 1.x完整学习指南(含各种常见问题servlet、web.xml、maven打包,spring mvc差别及解决方法)

    spring boot 入门 关于版本的选择,spring boot 2.0开始依赖于 Spring Framework 5.1.0,而spring 5.x和之前的版本差距比较大,而且应该来说还没有广 ...

  9. Spring Boot Maven Plugin打包异常及三种解决方法:Unable to find main class

    [背景]spring-boot项目,打包成可执行jar,项目内有两个带有main方法的类并且都使用了@SpringBootApplication注解(或者另一种情形:你有两个main方法并且所在类都没 ...

随机推荐

  1. Python基础06_list

    尽量多挤点时间用来学点知识吧. list是不同于字符串的,字符串定义后不可修改,而list是可以修改的. 以下是学习笔记: #!/usr/bin/env python # coding:utf-8 l ...

  2. JAVA学习笔记系列4-Eclipse版本选择

    下载Eclipse需要根据安装的JDK的版本来决定是安装32位还是64位,不是根据操作系统选的.

  3. wc语法

    统计当前目录下的所有文件行数: wc -l * 当前目录以及子目录的所有文件行数: find  . * | xargs wc -l 可以把*改成所要匹配的文件,例如Java文件,*.java这样就只统 ...

  4. 指向函数的指针 ------ 函数指针(function pointer)

    函数指针: 指向函数的指针, 首先是一个指针, 这个指针指向一个函数. 函数具有可赋值给指针的物理内存地址,一个函数的函数名就是一个指针,它指向函数的代码.一个函数的地址是该函数的进入点,也是调用函数 ...

  5. logback-spring.xml 博客分享

    https://juejin.im/post/5b51f85c5188251af91a7525

  6. 官网下载MySQL最新版本的安装包

    下载地址:http://www.mysql.com/downloads/ 1.选择下载社区版本 MySQL Community Edition (GPL)Community (GPL) Downloa ...

  7. HBase和Phoneix使用示例

    HBase操作 基本操作 创建表 Examples: hbase> create 't1', {NAME => 'f1', VERSIONS => 5} hbase> crea ...

  8. [LeetCode&Python] Problem 202. Happy Number

    Write an algorithm to determine if a number is "happy". A happy number is a number defined ...

  9. maven pom.xml配置文件详解

    1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/ ...

  10. 在微信小程序中,如何实现下拉刷新(模拟刷新)

    一.在app.json中启动刷新, 在Windows 中, 添加  "enablePullDownRefresh":"true" 二.在需要刷新的页面中写(若是 ...