Apache CXF client loads fine in Eclipse but standalone jar throws NullpointerException in WSDLServiceFactory

后端 未结 4 659
旧巷少年郎
旧巷少年郎 2020-12-09 10:11

My goal is to create a Web Service client that runs in a standalone jar with all the dependencies using mvn assembly:single

I generated the client using CXF codegen

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 10:30

    Expanding on @DanielKulp's answer, which worked a treat for me with CXF 2.7.7 (just in case the link dies). Configure your shade plugin with the following additional transformers:

    
      
        
        
          META-INF/spring.handlers
        
        
          META-INF/services/com.sun.tools.xjc.Plugin
        
        
          META-INF/spring.schemas
        
        
          META-INF/cxf/cxf.extension
        
        
          META-INF/extensions.xml
        
        
          META-INF/cxf/extensions.xml
        
        
          META-INF/cxf/bus-extensions.txt
        
        
          META-INF/cxf/bus-extensions.xml
        
        
          META-INF/wsdl.plugin.xml
        
        
          META-INF/tools.service.validator.xml
        
        
          META-INF/cxf/java2wsbeans.xml
        
      
    
    

提交回复
热议问题