Specifying Package Name When Using Maven to Generate Java from WSDL

后端 未结 3 2168
孤独总比滥情好
孤独总比滥情好 2021-02-19 20:15

I am using a maven script to generate the Java code I need to communicate with a WCF service. I have gotten communication working and am ready to integrate my maven script, and

3条回答
  •  野的像风
    2021-02-19 21:19

    Add -pcom.name.server.cxf to your section inside the tag. The following (slightly different version) works for me.

           
                org.apache.cxf
                cxf-codegen-plugin
                ${cxf.version}
                
                    
                        generate-sources
                        generate-sources
                        
                            
                                
                                    src/com/server/cxf/code-generation/service.xml
                                    
                                        src/com/server/cxf/code-generation/javabindings.xml
                                    
                                    
                                        -validate
                                        -client
                                        -verbose
                                        -xjc-verbose
                                        -p
                                        com.name.server.cxf
                                    
                                
                            
                        
                        
                            wsdl2java
                        
                    
                
            
    

    Alternatively, create a file service-options in src/com/server/cxf/code-generation/ with the content -p com.name.server.cxf

提交回复
热议问题