request.xml and fix issue
This commit is contained in:
parent
04a0e25afb
commit
fa6ffd4225
@ -4,3 +4,8 @@
|
||||
```
|
||||
mvn spring-boot:run -f pom.xml
|
||||
```
|
||||
|
||||
## Example
|
||||
```
|
||||
curl -H "content-type: text/xml" -d @request.xml http://localhost:8080/ws
|
||||
```
|
64
pom.xml
64
pom.xml
@ -40,6 +40,28 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</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>
|
||||
|
||||
<build>
|
||||
@ -48,27 +70,27 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!-- Plugin for generate WS classes -->
|
||||
<!-- <plugin> -->
|
||||
<!-- <groupId>org.codehaus.mojo</groupId> -->
|
||||
<!-- <artifactId>jaxb2-maven-plugin</artifactId> -->
|
||||
<!-- <version>2.4</version> -->
|
||||
<!-- <executions> -->
|
||||
<!-- <execution> -->
|
||||
<!-- <goals> -->
|
||||
<!-- <goal>xjc</goal> -->
|
||||
<!-- </goals> -->
|
||||
<!-- </execution> -->
|
||||
<!-- </executions> -->
|
||||
<!-- <configuration> -->
|
||||
<!-- <sources> -->
|
||||
<!-- <source>src/main/resources/person.xsd</source> -->
|
||||
<!-- </sources> -->
|
||||
<!-- <packageName>com.manalejandro.ws.model</packageName> -->
|
||||
<!-- <outputDirectory>${project.basedir}/src/main/java</outputDirectory> -->
|
||||
<!-- <clearOutputDir>false</clearOutputDir> -->
|
||||
<!-- </configuration> -->
|
||||
<!-- </plugin> -->
|
||||
<!-- Plugin for generate WS classes -->
|
||||
<!-- <plugin> -->
|
||||
<!-- <groupId>org.codehaus.mojo</groupId> -->
|
||||
<!-- <artifactId>jaxb2-maven-plugin</artifactId> -->
|
||||
<!-- <version>2.4</version> -->
|
||||
<!-- <executions> -->
|
||||
<!-- <execution> -->
|
||||
<!-- <goals> -->
|
||||
<!-- <goal>xjc</goal> -->
|
||||
<!-- </goals> -->
|
||||
<!-- </execution> -->
|
||||
<!-- </executions> -->
|
||||
<!-- <configuration> -->
|
||||
<!-- <sources> -->
|
||||
<!-- <source>src/main/resources/person.xsd</source> -->
|
||||
<!-- </sources> -->
|
||||
<!-- <packageName>com.manalejandro.ws.model</packageName> -->
|
||||
<!-- <outputDirectory>${project.basedir}/src/main/java</outputDirectory> -->
|
||||
<!-- <clearOutputDir>false</clearOutputDir> -->
|
||||
<!-- </configuration> -->
|
||||
<!-- </plugin> -->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
10
request.xml
Normal file
10
request.xml
Normal 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>
|
26
src/main/java/META-INF/JAXB/episode_default.xjb
Normal file
26
src/main/java/META-INF/JAXB/episode_default.xjb
Normal 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>
|
||||
|
Loading…
Reference in New Issue
Block a user