I have an HTTPS WSDL URL (https://hostname/MyApp/MyApp.svc?wsdl) that needs to be consumed in a Maven project. The certificate on WSDL is expired and is issued to hostname.company.com.
I have following code in Maven pom.xml
<dependencies>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<scope>compile</scope>
<version>2.1.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
<wsdlUrls>
<wsdlUrl>https://hostname/MyApp/MyApp.svc?wsdl</wsdlUrl>
</wsdlUrls>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
When I do a clean and build, I get following error
[jaxws:wsimport]
Processing: https://hostname/MyApp/MyApp.svc?wsdl
jaxws:wsimport args: [-s, C:\WorkspaceNetBeans\Maven\WSTest\target\generated-sources\jaxws-wsimport, -d, C:\WorkspaceNetBeans\Maven\WSTest\target\classes, https://hostname/MyApp/MyApp.svc?wsdl]
parsing WSDL...
java.security.cert.CertificateException: No name matching hostname found
Failed to read the WSDL document: https://hostname/MyApp/MyApp.svc?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
failed.noservice=Could not find wsdl:service in the provided WSDL(s):
At least one WSDL with at least one service definition needs to be provided.
Failed to parse the WSDL.
I added the certificate to keystore using keytool utility. What else do I need to do?