JAX-WS error on WSDL file: “Error resolving component 's:schema'”

前端 未结 5 954
我寻月下人不归
我寻月下人不归 2020-12-28 15:25

The Error

I am using wsimport in a Java project to generate sources for three SOAP web services. The first two work fine: I use the JAX-WS Maven plugin to grab the

5条回答
  •  猫巷女王i
    2020-12-28 15:44

    This seems to be working for me finally. I am using apache maven cfx plugin

        
                    org.apache.cxf
                    cxf-codegen-plugin
                    
                        
                            generate-sources
                            generate-sources
                            
                                
                                    -Djavax.xml.accessExternalDTD=all
                                
                                ${basedir}/src/main/generated 
                                
                                    
                                        
                                            -autoNameResolution
                                            -impl
                                            -verbose
                                            -b
                                            http://www.w3.org/2001/XMLSchema.xsd
    
                                            -p
                                            com.nevado.travelstudio
                                        
                                        
                                        ${basedir}/src/main/resources/wsdl/B2.wsdl
                                    
                                
                            
                            
                                wsdl2java
                            
                        
                    
                
    

    along with these changes I had to create jaxp.properties file in ..java/jdk/jre/lib folder with following property

      -Djavax.xml.accessExternalDTD=all
    

提交回复
热议问题