0

I am trying to access a soap webservice through spring tool suite and maven.

I have done this using the source code from https://spring.io/guides/gs/consuming-web-service/ This works fine .

Dependancy is

<dependency>
         <groupId>org.springframework.ws</groupId>
         <artifactId>spring-ws-core</artifactId>
         <version>1.5.8</version>
     </dependency>

plugin is

<plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                 <artifactId>maven-jaxb2-plugin</artifactId>
                 <version>0.12.3</version>
                 <executions>
                     <execution>
                         <goals>
                             <goal>generate</goal>
                         </goals>
                     </execution>
                 </executions>
                 <configuration>
                     <schemaLanguage>WSDL</schemaLanguage>
                     <generatePackage>Test3.wsdl</generatePackage>
                     <schemas>
                         <schema>

 <url>http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl</url> 

                         </schema>
                     </schemas>
                 </configuration>
             </plugin>

Now I have changed the url to a new link with https:

I can access the wsdl from my browser.

I am getting the error

"Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed. (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate:default:generate-sources)"

I searched a lot for an answer.but could not find a soultion. would really appreciate a help.

Thankyou and Regards,

john
  • 613
  • 1
  • 7
  • 25
  • 1
    The error is very generic, could you please add -X as part of the maven install command to get a clear idea what the exact error. Then add the error to the post, it's easier to identify issue. Thanks. – Ashoka Jun 01 '15 at 12:16
  • Thank you , the error I get is "[ERROR] Error while parsing schema(s).Location []. com.sun.istack.SAXParseException2; IOException thrown when processing "https://172.26.13.204/PaymentMdule/ezcashagentservice?wsdl". Exception: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present." but I have added the jseccerts to the security folder. Do I have to add it to a different place If I run it on the spring tool suite server.? – Shamali Dahanayake Jun 03 '15 at 06:42

1 Answers1

0

This is an SSLClient related issue, now there's several ways to fix this. From the eclipse IDE configuration perspective please refer : https://db-blog.web.cern.ch/blog/luis-rodriguez-fernandez/2014-07-java-soap-client-certificate-authentication . Now the best approach would be to have maven configuration changes as part of the build. This can be done using the properties-maven-plugin , here's a thread which discusses the same: SSL client certificate in Maven

Community
  • 1
  • 1
Ashoka
  • 935
  • 7
  • 20
  • One thing leads to another. I used the SSL client certificate in maven. The plugin gives the error. Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:set-system-properties (execution: default, phase: initialize). I read in another forum that by putting plugin management this error can be removed. Did just that and it did remove the error message . but the wsdl was not generated either. I really appreciate your help since now I am headed in the correct direction after about a weeks effort. – Shamali Dahanayake Jun 05 '15 at 09:52