java - Configuring the maven plugin cxf-codegen-plugin to ignore security concerns -


i trying set maven project generates java code based on wsdl files.

unfortunately having problems because test environment doesn't have valid ssl certificate (i have confirmed using chrome). because happening in test environment not concerned security. want code generation work.

the following shows how use plugin cxf-codegen-plugin

        <plugin>             <groupid>org.apache.cxf</groupid>             <artifactid>cxf-codegen-plugin</artifactid>             <version>3.1.8</version>             <executions>                 <execution>                     <id>generate-sources</id>                     <phase>generate-sources</phase>                     <configuration>                         <sourceroot>${project.build.directory}/generated/cxf</sourceroot>                         <defaultoptions>                             <bindingfiles>                                 <bindingfile>${basedir}/src/main/jaxb/jaxb.bindings.xml</bindingfile>                             </bindingfiles>                             <packagenames>                                 <packagename>foo.bar</packagename>                             </packagenames>                             <extraargs>                                   <extraarg>-client</extraarg>                             </extraargs>                            </defaultoptions>                         <wsdloptions>                             <wsdloption>                                 <wsdl>[removed url]</wsdl>                             </wsdloption>                          </wsdloptions>                     </configuration>                     <goals>                         <goal>wsdl2java</goal>                     </goals>                 </execution>                 </executions>         </plugin> 

when run mvn clean install maven outputs following error

[error] failed execute goal org.apache.cxf:cxf-codegen-plugin:3.1.8:wsdl2java (generate-sources) on project testclient: execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.1.8:wsdl2java failed: org.apache.cxf.wsdl11.wsdlruntimeexception: fail create wsdl definition [removed url] wsdlexception: faultcode=parser_error: problem parsing [removed url].: javax.net.ssl.sslhandshakeexception: java.security.cert.certificateexception: no subject alternative dns name matching .... found. -> [help 1]

so question if there way configure cxf-codegen-plugin s.t. ignores security concerns , continues generating java code?

do not know if possible ignore can add certificate local certificate store seems solve problem.

without knowing further details development environment these instructions might apply directly or @ least little modifications.

i found blog post of ishwara varnasi:

http://ibswings.blogspot.fi/2008/12/running-axis-wsdl2java-on-https-wsdl.html

steps shortly:

  1. download certificate %java_home%/jre/lib/security . directory may vary there should java jre cacert certificate store.
  2. import downloaded certificate cacerts file in same directory. idea make backup copy of original cacerts file before import.

steps more detailed:

  1. fetching certificate can done browser confirming security exception , storing certificate permanently , exporting browser desired directory. exporting in format x.509 should work fine not know other formats. tools openssl can used download certificate, see using openssl certificate server
  2. use appropriate tool import certificate, example:

    keytool -importcert -trustcacerts -keystore cacerts -storepass changeit -alias aliasname -file cert_to_import_file_name

    more infromation importing: how import selfsigned certificate java keystore available java applications default?

at least in case storepass 'changeit'. not meaning change 'real' storepass first figured out.

be sure import certificate correct jre if using more 1 java version or add versions.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -