Spring Boot SOAP Client – WebServiceTemplate Example

JAXB maven plugin 用于生成 Java class。

Technology Stack for Spring boot soap client

  • maven、JDK1.8 - 开发环境
  • springboot - 基础框架
  • maven-jaxb2-plugin
  • Spring-boot CommandLineRunner

创建 Spring Client 工程

eclipse新建maven工程,pom.xml 添加 maven-jaxb2-plugin

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.13.2</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <generatePackage>com.example.howtodoinjava.schemas.school</generatePackage>
        <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
        <schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
        <schemaIncludes>
            <include>*.wsdl</include>
        </schemaIncludes>
    </configuration>
</plugin> 

待补充...

原文链接

 

posted on 2019-07-04 02:11  chenqr11  阅读(2156)  评论(0编辑  收藏  举报