在spring-boot中使用SOAP服务

时间:2019-04-11 10:53:37

标签: web-services spring-boot

我需要在Spring Boot应用程序中使用soap Webservice。我在互联网https://spring.io/guides/gs/consuming-web-service/上发现了一些东西,然后尝试执行该操作,导致出现以下异常。

我按照以下过程从WSDL中生成Java类。 项目->新建-> Web服务客户端->粘贴WSDL URL->完成

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 个答案:

没有答案