request.xml and fix issue

This commit is contained in:
manalejandro 2019-05-19 23:29:48 +02:00
parent 04a0e25afb
commit fa6ffd4225
4 changed files with 84 additions and 21 deletions

View File

@ -3,4 +3,9 @@
## Run ## Run
``` ```
mvn spring-boot:run -f pom.xml mvn spring-boot:run -f pom.xml
```
## Example
```
curl -H "content-type: text/xml" -d @request.xml http://localhost:8080/ws
``` ```

64
pom.xml
View File

@ -40,6 +40,28 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- https://github.com/eclipse-ee4j/jaxb-ri/issues/1235 -->
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.activation/activation -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -48,27 +70,27 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<!-- Plugin for generate WS classes --> <!-- Plugin for generate WS classes -->
<!-- <plugin> --> <!-- <plugin> -->
<!-- <groupId>org.codehaus.mojo</groupId> --> <!-- <groupId>org.codehaus.mojo</groupId> -->
<!-- <artifactId>jaxb2-maven-plugin</artifactId> --> <!-- <artifactId>jaxb2-maven-plugin</artifactId> -->
<!-- <version>2.4</version> --> <!-- <version>2.4</version> -->
<!-- <executions> --> <!-- <executions> -->
<!-- <execution> --> <!-- <execution> -->
<!-- <goals> --> <!-- <goals> -->
<!-- <goal>xjc</goal> --> <!-- <goal>xjc</goal> -->
<!-- </goals> --> <!-- </goals> -->
<!-- </execution> --> <!-- </execution> -->
<!-- </executions> --> <!-- </executions> -->
<!-- <configuration> --> <!-- <configuration> -->
<!-- <sources> --> <!-- <sources> -->
<!-- <source>src/main/resources/person.xsd</source> --> <!-- <source>src/main/resources/person.xsd</source> -->
<!-- </sources> --> <!-- </sources> -->
<!-- <packageName>com.manalejandro.ws.model</packageName> --> <!-- <packageName>com.manalejandro.ws.model</packageName> -->
<!-- <outputDirectory>${project.basedir}/src/main/java</outputDirectory> --> <!-- <outputDirectory>${project.basedir}/src/main/java</outputDirectory> -->
<!-- <clearOutputDir>false</clearOutputDir> --> <!-- <clearOutputDir>false</clearOutputDir> -->
<!-- </configuration> --> <!-- </configuration> -->
<!-- </plugin> --> <!-- </plugin> -->
</plugins> </plugins>
</build> </build>

10
request.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:gs="http://www.manalejandro.com/person">
<soapenv:Header/>
<soapenv:Body>
<gs:getPersonRequest>
<gs:name>name1</gs:name>
</gs:getPersonRequest>
</soapenv:Body>
</soapenv:Envelope>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb">
<!--
Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.3.0
Visite <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen.
Generado el: 2019.05.19 a las 11:13:06 PM CEST
-->
<bindings scd="x-schema::tns" xmlns:tns="http://www.manalejandro.com/person">
<schemaBindings map="false">
<package name="com.manalejandro.ws.model"/>
</schemaBindings>
<bindings scd="tns:getPersonRequest">
<class ref="com.manalejandro.ws.model.GetPersonRequest"/>
</bindings>
<bindings scd="tns:getPersonResponse">
<class ref="com.manalejandro.ws.model.GetPersonResponse"/>
</bindings>
<bindings scd="~tns:Person">
<class ref="com.manalejandro.ws.model.Person"/>
</bindings>
</bindings>
</bindings>