Consume SOAP service in spring-boot

Asked by At

I need to consume soap webservice in spring boot application. I found something over the internet https://spring.io/guides/gs/consuming-web-service/ and I tried that which results in the below exception.

I followed the below procedure for generating the java classes out of WSDL. Project -> New -> Web Service Client -> pasted the WSDL URL -> Finish

2019-04-11 16:06:39.481  WARN 10268 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshaller' defined in class path resource [com/test/myapp/client/ProductsConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.oxm.UncategorizedMappingException: Unknown JAXB exception; nested exception is javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "SomeWebService?wsdl" doesnt contain ObjectFactory.class or jaxb.index
- with linked exception:
[javax.xml.bind.JAXBException: "SomeWebService?wsdl" doesnt contain 
ObjectFactory.class or jaxb.index]
2019-04-11 16:06:39.493  INFO 10268 --- [           main] 
o.apache.catalina.core.StandardService   : Stopping service [Tomcat]

0 Answers