first commit
This commit is contained in:
commit
e4607e3968
127 changed files with 8193 additions and 0 deletions
46
AnalyseClient/.classpath
Normal file
46
AnalyseClient/.classpath
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="target/generated-sources/cxf">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
23
AnalyseClient/.project
Normal file
23
AnalyseClient/.project
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>AnalyseClient</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
8
AnalyseClient/.settings/org.eclipse.jdt.core.prefs
Normal file
8
AnalyseClient/.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
4
AnalyseClient/.settings/org.eclipse.m2e.core.prefs
Normal file
4
AnalyseClient/.settings/org.eclipse.m2e.core.prefs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
54
AnalyseClient/pom.xml
Normal file
54
AnalyseClient/pom.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.ws.soap</groupId>
|
||||||
|
<artifactId>AnalyseClient</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<cxf.version>3.4.2</cxf.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-codegen-plugin</artifactId>
|
||||||
|
<version>${cxf.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<configuration>
|
||||||
|
<sourceRoot>
|
||||||
|
${project.build.directory}/generated-sources/cxf
|
||||||
|
</sourceRoot>
|
||||||
|
<wsdlOptions>
|
||||||
|
<wsdlOption>
|
||||||
|
<wsdl>
|
||||||
|
${basedir}/src/main/resources/wsdl/analyzer.wsdl
|
||||||
|
</wsdl>
|
||||||
|
<packagenames>
|
||||||
|
<packagename>fr.insa.soap.wsdltojava</packagename>
|
||||||
|
</packagenames>
|
||||||
|
</wsdlOption>
|
||||||
|
</wsdlOptions>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>wsdl2java</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
17
AnalyseClient/src/main/java/ClientOfAnalyzer.java
Normal file
17
AnalyseClient/src/main/java/ClientOfAnalyzer.java
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
import fr.insa.soap.wsdltojava.AnalyserChaineWS;
|
||||||
|
import fr.insa.soap.wsdltojava.Analyzer;
|
||||||
|
|
||||||
|
public class ClientOfAnalyzer {
|
||||||
|
public static void main(String [] args) throws MalformedURLException{
|
||||||
|
final String adresse="http://localhost:8089/analyzer";
|
||||||
|
final URL url = URI.create(adresse).toURL();
|
||||||
|
final Analyzer service = new Analyzer(url);
|
||||||
|
final AnalyserChaineWS port = service.getPort(AnalyserChaineWS.class);
|
||||||
|
String chaine = "aseuthasontehu";
|
||||||
|
System.out.println("La taille de la chaine " + chaine + " est " + port.compare(chaine));
|
||||||
|
}
|
||||||
|
}
|
39
AnalyseClient/src/main/resources/wsdl/analyzer.wsdl
Normal file
39
AnalyseClient/src/main/resources/wsdl/analyzer.wsdl
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Published by JAX-WS RI (https://github.com/eclipse-ee4j/metro-jax-ws). RI's version is JAX-WS RI 2.3.6 git-revision#d201abe. -->
|
||||||
|
<!-- Generated by JAX-WS RI (https://github.com/eclipse-ee4j/metro-jax-ws). RI's version is JAX-WS RI 2.3.6 git-revision#d201abe. -->
|
||||||
|
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.insa.fr/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap.insa.fr/" name="analyzer">
|
||||||
|
<types>
|
||||||
|
<xsd:schema>
|
||||||
|
<xsd:import namespace="http://soap.insa.fr/" schemaLocation="http://localhost:8089/?xsd=1"/>
|
||||||
|
</xsd:schema>
|
||||||
|
</types>
|
||||||
|
<message name="compare">
|
||||||
|
<part name="parameters" element="tns:compare"/>
|
||||||
|
</message>
|
||||||
|
<message name="compareResponse">
|
||||||
|
<part name="parameters" element="tns:compareResponse"/>
|
||||||
|
</message>
|
||||||
|
<portType name="AnalyserChaineWS">
|
||||||
|
<operation name="compare">
|
||||||
|
<input wsam:Action="http://soap.insa.fr/AnalyserChaineWS/compareRequest" message="tns:compare"/>
|
||||||
|
<output wsam:Action="http://soap.insa.fr/AnalyserChaineWS/compareResponse" message="tns:compareResponse"/>
|
||||||
|
</operation>
|
||||||
|
</portType>
|
||||||
|
<binding name="AnalyserChaineWSPortBinding" type="tns:AnalyserChaineWS">
|
||||||
|
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||||
|
<operation name="compare">
|
||||||
|
<soap:operation soapAction=""/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<service name="analyzer">
|
||||||
|
<port name="AnalyserChaineWSPort" binding="tns:AnalyserChaineWSPortBinding">
|
||||||
|
<soap:address location="http://localhost:8089/"/>
|
||||||
|
</port>
|
||||||
|
</service>
|
||||||
|
</definitions>
|
BIN
AnalyseClient/target/classes/ClientOfAnalyzer.class
Normal file
BIN
AnalyseClient/target/classes/ClientOfAnalyzer.class
Normal file
Binary file not shown.
4
AnalyseClient/target/classes/META-INF/MANIFEST.MF
Normal file
4
AnalyseClient/target/classes/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Build-Jdk-Spec: 22
|
||||||
|
Created-By: Maven Integration for Eclipse
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#Generated by Maven Integration for Eclipse
|
||||||
|
#Wed Oct 02 17:53:07 CEST 2024
|
||||||
|
artifactId=ClientWS
|
||||||
|
groupId=fr.insa.soap
|
||||||
|
m2e.projectLocation=/home/nbillard/eclipse-workspace/AnalyseClient
|
||||||
|
m2e.projectName=AnalyseClient
|
||||||
|
version=0.0.1-SNAPSHOT
|
|
@ -0,0 +1,52 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-
|
||||||
|
4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.soap</groupId>
|
||||||
|
<artifactId>ClientWS</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<cxf.version>3.4.2</cxf.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.3</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-codegen-plugin</artifactId>
|
||||||
|
<version>${cxf.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<configuration>
|
||||||
|
<sourceRoot>
|
||||||
|
${project.build.directory}/generated-sources/cxf
|
||||||
|
</sourceRoot>
|
||||||
|
<wsdlOptions>
|
||||||
|
<wsdlOption>
|
||||||
|
<wsdl>${basedir}/src/main/resources/wsdl/analyzer.wsdl</wsdl>
|
||||||
|
<packagenames>
|
||||||
|
<packagename>fr.insa.soap.wsdltojava</packagename>
|
||||||
|
</packagenames>
|
||||||
|
</wsdlOption>
|
||||||
|
</wsdlOptions>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>wsdl2java</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,7 @@
|
||||||
|
#Generated by Maven Integration for Eclipse
|
||||||
|
#Tue Oct 08 14:15:42 CEST 2024
|
||||||
|
artifactId=AnalyseClient
|
||||||
|
groupId=fr.insa.ws.soap
|
||||||
|
m2e.projectLocation=/home/nbillard/eclipse-workspace/AnalyseClient
|
||||||
|
m2e.projectName=AnalyseClient
|
||||||
|
version=0.0.1-SNAPSHOT
|
|
@ -0,0 +1,54 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.ws.soap</groupId>
|
||||||
|
<artifactId>AnalyseClient</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<cxf.version>3.4.2</cxf.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-codegen-plugin</artifactId>
|
||||||
|
<version>${cxf.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<configuration>
|
||||||
|
<sourceRoot>
|
||||||
|
${project.build.directory}/generated-sources/cxf
|
||||||
|
</sourceRoot>
|
||||||
|
<wsdlOptions>
|
||||||
|
<wsdlOption>
|
||||||
|
<wsdl>
|
||||||
|
${basedir}/src/main/resources/wsdl/analyzer.wsdl
|
||||||
|
</wsdl>
|
||||||
|
<packagenames>
|
||||||
|
<packagename>fr.insa.soap.wsdltojava</packagename>
|
||||||
|
</packagenames>
|
||||||
|
</wsdlOption>
|
||||||
|
</wsdlOptions>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>wsdl2java</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39
AnalyseClient/target/classes/wsdl/analyzer.wsdl
Normal file
39
AnalyseClient/target/classes/wsdl/analyzer.wsdl
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Published by JAX-WS RI (https://github.com/eclipse-ee4j/metro-jax-ws). RI's version is JAX-WS RI 2.3.6 git-revision#d201abe. -->
|
||||||
|
<!-- Generated by JAX-WS RI (https://github.com/eclipse-ee4j/metro-jax-ws). RI's version is JAX-WS RI 2.3.6 git-revision#d201abe. -->
|
||||||
|
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.insa.fr/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap.insa.fr/" name="analyzer">
|
||||||
|
<types>
|
||||||
|
<xsd:schema>
|
||||||
|
<xsd:import namespace="http://soap.insa.fr/" schemaLocation="http://localhost:8089/?xsd=1"/>
|
||||||
|
</xsd:schema>
|
||||||
|
</types>
|
||||||
|
<message name="compare">
|
||||||
|
<part name="parameters" element="tns:compare"/>
|
||||||
|
</message>
|
||||||
|
<message name="compareResponse">
|
||||||
|
<part name="parameters" element="tns:compareResponse"/>
|
||||||
|
</message>
|
||||||
|
<portType name="AnalyserChaineWS">
|
||||||
|
<operation name="compare">
|
||||||
|
<input wsam:Action="http://soap.insa.fr/AnalyserChaineWS/compareRequest" message="tns:compare"/>
|
||||||
|
<output wsam:Action="http://soap.insa.fr/AnalyserChaineWS/compareResponse" message="tns:compareResponse"/>
|
||||||
|
</operation>
|
||||||
|
</portType>
|
||||||
|
<binding name="AnalyserChaineWSPortBinding" type="tns:AnalyserChaineWS">
|
||||||
|
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||||
|
<operation name="compare">
|
||||||
|
<soap:operation soapAction=""/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<service name="analyzer">
|
||||||
|
<port name="AnalyserChaineWSPort" binding="tns:AnalyserChaineWSPortBinding">
|
||||||
|
<soap:address location="http://localhost:8089/"/>
|
||||||
|
</port>
|
||||||
|
</service>
|
||||||
|
</definitions>
|
Binary file not shown.
|
@ -0,0 +1,32 @@
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.jws.WebMethod;
|
||||||
|
import javax.jws.WebParam;
|
||||||
|
import javax.jws.WebResult;
|
||||||
|
import javax.jws.WebService;
|
||||||
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
|
import javax.xml.ws.Action;
|
||||||
|
import javax.xml.ws.RequestWrapper;
|
||||||
|
import javax.xml.ws.ResponseWrapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class was generated by Apache CXF 3.4.2
|
||||||
|
* 2024-10-02T17:53:06.830+02:00
|
||||||
|
* Generated source version: 3.4.2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@WebService(targetNamespace = "http://soap.insa.fr/", name = "AnalyserChaineWS")
|
||||||
|
@XmlSeeAlso({ObjectFactory.class})
|
||||||
|
public interface AnalyserChaineWS {
|
||||||
|
|
||||||
|
@WebMethod
|
||||||
|
@Action(input = "http://soap.insa.fr/AnalyserChaineWS/compareRequest", output = "http://soap.insa.fr/AnalyserChaineWS/compareResponse")
|
||||||
|
@RequestWrapper(localName = "compare", targetNamespace = "http://soap.insa.fr/", className = "fr.insa.soap.wsdltojava.Compare")
|
||||||
|
@ResponseWrapper(localName = "compareResponse", targetNamespace = "http://soap.insa.fr/", className = "fr.insa.soap.wsdltojava.CompareResponse")
|
||||||
|
@WebResult(name = "return", targetNamespace = "")
|
||||||
|
public int compare(
|
||||||
|
|
||||||
|
@WebParam(name = "chain", targetNamespace = "")
|
||||||
|
java.lang.String chain
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
import javax.xml.ws.WebEndpoint;
|
||||||
|
import javax.xml.ws.WebServiceClient;
|
||||||
|
import javax.xml.ws.WebServiceFeature;
|
||||||
|
import javax.xml.ws.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class was generated by Apache CXF 3.4.2
|
||||||
|
* 2024-10-02T17:53:06.867+02:00
|
||||||
|
* Generated source version: 3.4.2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@WebServiceClient(name = "analyzer",
|
||||||
|
wsdlLocation = "file:/home/nbillard/eclipse-workspace/AnalyseClient/src/main/resources/wsdl/analyzer.wsdl",
|
||||||
|
targetNamespace = "http://soap.insa.fr/")
|
||||||
|
public class Analyzer extends Service {
|
||||||
|
|
||||||
|
public final static URL WSDL_LOCATION;
|
||||||
|
|
||||||
|
public final static QName SERVICE = new QName("http://soap.insa.fr/", "analyzer");
|
||||||
|
public final static QName AnalyserChaineWSPort = new QName("http://soap.insa.fr/", "AnalyserChaineWSPort");
|
||||||
|
static {
|
||||||
|
URL url = null;
|
||||||
|
try {
|
||||||
|
url = new URL("file:/home/nbillard/eclipse-workspace/AnalyseClient/src/main/resources/wsdl/analyzer.wsdl");
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
java.util.logging.Logger.getLogger(Analyzer.class.getName())
|
||||||
|
.log(java.util.logging.Level.INFO,
|
||||||
|
"Can not initialize the default wsdl from {0}", "file:/home/nbillard/eclipse-workspace/AnalyseClient/src/main/resources/wsdl/analyzer.wsdl");
|
||||||
|
}
|
||||||
|
WSDL_LOCATION = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Analyzer(URL wsdlLocation) {
|
||||||
|
super(wsdlLocation, SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Analyzer(URL wsdlLocation, QName serviceName) {
|
||||||
|
super(wsdlLocation, serviceName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Analyzer() {
|
||||||
|
super(WSDL_LOCATION, SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Analyzer(WebServiceFeature ... features) {
|
||||||
|
super(WSDL_LOCATION, SERVICE, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Analyzer(URL wsdlLocation, WebServiceFeature ... features) {
|
||||||
|
super(wsdlLocation, SERVICE, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Analyzer(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
|
||||||
|
super(wsdlLocation, serviceName, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* returns AnalyserChaineWS
|
||||||
|
*/
|
||||||
|
@WebEndpoint(name = "AnalyserChaineWSPort")
|
||||||
|
public AnalyserChaineWS getAnalyserChaineWSPort() {
|
||||||
|
return super.getPort(AnalyserChaineWSPort, AnalyserChaineWS.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param features
|
||||||
|
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
|
||||||
|
* @return
|
||||||
|
* returns AnalyserChaineWS
|
||||||
|
*/
|
||||||
|
@WebEndpoint(name = "AnalyserChaineWSPort")
|
||||||
|
public AnalyserChaineWS getAnalyserChaineWSPort(WebServiceFeature... features) {
|
||||||
|
return super.getPort(AnalyserChaineWSPort, AnalyserChaineWS.class, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Classe Java pour compare complex type.
|
||||||
|
*
|
||||||
|
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* &lt;complexType name="compare"&gt;
|
||||||
|
* &lt;complexContent&gt;
|
||||||
|
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
|
||||||
|
* &lt;sequence&gt;
|
||||||
|
* &lt;element name="chain" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
|
||||||
|
* &lt;/sequence&gt;
|
||||||
|
* &lt;/restriction&gt;
|
||||||
|
* &lt;/complexContent&gt;
|
||||||
|
* &lt;/complexType&gt;
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "compare", propOrder = {
|
||||||
|
"chain"
|
||||||
|
})
|
||||||
|
public class Compare {
|
||||||
|
|
||||||
|
protected String chain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtient la valeur de la propriété chain.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getChain() {
|
||||||
|
return chain;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Définit la valeur de la propriété chain.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setChain(String value) {
|
||||||
|
this.chain = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Classe Java pour compareResponse complex type.
|
||||||
|
*
|
||||||
|
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* &lt;complexType name="compareResponse"&gt;
|
||||||
|
* &lt;complexContent&gt;
|
||||||
|
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
|
||||||
|
* &lt;sequence&gt;
|
||||||
|
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
|
||||||
|
* &lt;/sequence&gt;
|
||||||
|
* &lt;/restriction&gt;
|
||||||
|
* &lt;/complexContent&gt;
|
||||||
|
* &lt;/complexType&gt;
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "compareResponse", propOrder = {
|
||||||
|
"_return"
|
||||||
|
})
|
||||||
|
public class CompareResponse {
|
||||||
|
|
||||||
|
@XmlElement(name = "return")
|
||||||
|
protected int _return;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtient la valeur de la propriété return.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public int getReturn() {
|
||||||
|
return _return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Définit la valeur de la propriété return.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setReturn(int value) {
|
||||||
|
this._return = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBElement;
|
||||||
|
import javax.xml.bind.annotation.XmlElementDecl;
|
||||||
|
import javax.xml.bind.annotation.XmlRegistry;
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This object contains factory methods for each
|
||||||
|
* Java content interface and Java element interface
|
||||||
|
* generated in the fr.insa.soap.wsdltojava package.
|
||||||
|
* <p>An ObjectFactory allows you to programatically
|
||||||
|
* construct new instances of the Java representation
|
||||||
|
* for XML content. The Java representation of XML
|
||||||
|
* content can consist of schema derived interfaces
|
||||||
|
* and classes representing the binding of schema
|
||||||
|
* type definitions, element declarations and model
|
||||||
|
* groups. Factory methods for each of these are
|
||||||
|
* provided in this class.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlRegistry
|
||||||
|
public class ObjectFactory {
|
||||||
|
|
||||||
|
private final static QName _Compare_QNAME = new QName("http://soap.insa.fr/", "compare");
|
||||||
|
private final static QName _CompareResponse_QNAME = new QName("http://soap.insa.fr/", "compareResponse");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: fr.insa.soap.wsdltojava
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ObjectFactory() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link Compare }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Compare createCompare() {
|
||||||
|
return new Compare();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link CompareResponse }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public CompareResponse createCompareResponse() {
|
||||||
|
return new CompareResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link JAXBElement }{@code <}{@link Compare }{@code >}
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* Java instance representing xml element's value.
|
||||||
|
* @return
|
||||||
|
* the new instance of {@link JAXBElement }{@code <}{@link Compare }{@code >}
|
||||||
|
*/
|
||||||
|
@XmlElementDecl(namespace = "http://soap.insa.fr/", name = "compare")
|
||||||
|
public JAXBElement<Compare> createCompare(Compare value) {
|
||||||
|
return new JAXBElement<Compare>(_Compare_QNAME, Compare.class, null, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link JAXBElement }{@code <}{@link CompareResponse }{@code >}
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* Java instance representing xml element's value.
|
||||||
|
* @return
|
||||||
|
* the new instance of {@link JAXBElement }{@code <}{@link CompareResponse }{@code >}
|
||||||
|
*/
|
||||||
|
@XmlElementDecl(namespace = "http://soap.insa.fr/", name = "compareResponse")
|
||||||
|
public JAXBElement<CompareResponse> createCompareResponse(CompareResponse value) {
|
||||||
|
return new JAXBElement<CompareResponse>(_CompareResponse_QNAME, CompareResponse.class, null, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
@javax.xml.bind.annotation.XmlSchema(namespace = "http://soap.insa.fr/")
|
||||||
|
package fr.insa.soap.wsdltojava;
|
40
Benevolat/.classpath
Normal file
40
Benevolat/.classpath
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
23
Benevolat/.project
Normal file
23
Benevolat/.project
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Benevolat</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
8
Benevolat/.settings/org.eclipse.jdt.core.prefs
Normal file
8
Benevolat/.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
4
Benevolat/.settings/org.eclipse.m2e.core.prefs
Normal file
4
Benevolat/.settings/org.eclipse.m2e.core.prefs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
21
Benevolat/pom.xml
Normal file
21
Benevolat/pom.xml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.ws.soap</groupId>
|
||||||
|
<artifactId>Benevolat</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,20 @@
|
||||||
|
package fr.insa.soap;
|
||||||
|
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
|
||||||
|
import javax.xml.ws.Endpoint;
|
||||||
|
|
||||||
|
public class AnalyserChaineApplication {
|
||||||
|
public static String host="localhost";
|
||||||
|
public static short port=8089;
|
||||||
|
|
||||||
|
public void demarrerService() {
|
||||||
|
String url="http://"+host+":" +port + "/";
|
||||||
|
Endpoint.publish(url, new AnalyserChaineWS());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String [] args) throws MalformedURLException {
|
||||||
|
new AnalyserChaineApplication().demarrerService();
|
||||||
|
System.out.println("Service a demarré");
|
||||||
|
}
|
||||||
|
}
|
14
Benevolat/src/main/java/fr/insa/soap/AnalyserChaineWS.java
Normal file
14
Benevolat/src/main/java/fr/insa/soap/AnalyserChaineWS.java
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
package fr.insa.soap;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.jws.WebMethod;
|
||||||
|
import javax.jws.WebParam;
|
||||||
|
import javax.jws.WebService;
|
||||||
|
|
||||||
|
@WebService(serviceName="analyzer")
|
||||||
|
public class AnalyserChaineWS {
|
||||||
|
@WebMethod(operationName="compare")
|
||||||
|
public int analyser(@WebParam(name="chain") String chaine) {
|
||||||
|
return chaine.length();
|
||||||
|
}
|
||||||
|
}
|
4
Benevolat/target/classes/META-INF/MANIFEST.MF
Normal file
4
Benevolat/target/classes/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Build-Jdk-Spec: 22
|
||||||
|
Created-By: Maven Integration for Eclipse
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#Generated by Maven Integration for Eclipse
|
||||||
|
#Wed Oct 02 16:52:40 CEST 2024
|
||||||
|
artifactId=Benevolat
|
||||||
|
groupId=fr.insa.ws.soap
|
||||||
|
m2e.projectLocation=/home/nbillard/eclipse-workspace/Benevolat
|
||||||
|
m2e.projectName=Benevolat
|
||||||
|
version=0.0.1-SNAPSHOT
|
|
@ -0,0 +1,21 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.ws.soap</groupId>
|
||||||
|
<artifactId>Benevolat</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
Binary file not shown.
BIN
Benevolat/target/classes/fr/insa/soap/AnalyserChaineWS.class
Normal file
BIN
Benevolat/target/classes/fr/insa/soap/AnalyserChaineWS.class
Normal file
Binary file not shown.
46
NumberConversion/.classpath
Normal file
46
NumberConversion/.classpath
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="target/generated-sources/cxf">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
23
NumberConversion/.project
Normal file
23
NumberConversion/.project
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>NumberConversion</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
8
NumberConversion/.settings/org.eclipse.jdt.core.prefs
Normal file
8
NumberConversion/.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
4
NumberConversion/.settings/org.eclipse.m2e.core.prefs
Normal file
4
NumberConversion/.settings/org.eclipse.m2e.core.prefs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
54
NumberConversion/pom.xml
Normal file
54
NumberConversion/pom.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.soap</groupId>
|
||||||
|
<artifactId>NumberConversion</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<cxf.version>3.4.2</cxf.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-codegen-plugin</artifactId>
|
||||||
|
<version>${cxf.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<configuration>
|
||||||
|
<sourceRoot>
|
||||||
|
${project.build.directory}/generated-sources/cxf
|
||||||
|
</sourceRoot>
|
||||||
|
<wsdlOptions>
|
||||||
|
<wsdlOption>
|
||||||
|
<wsdl>
|
||||||
|
${basedir}/src/main/resources/wsdl/numberconversion.wsdl
|
||||||
|
</wsdl>
|
||||||
|
<packagenames>
|
||||||
|
<packagename>fr.insa.soap.wsdltojava</packagename>
|
||||||
|
</packagenames>
|
||||||
|
</wsdlOption>
|
||||||
|
</wsdlOptions>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>wsdl2java</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
19
NumberConversion/src/main/java/NumberConversionTester.java
Normal file
19
NumberConversion/src/main/java/NumberConversionTester.java
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
import fr.insa.soap.wsdltojava.NumberConversion;
|
||||||
|
import fr.insa.soap.wsdltojava.NumberConversionSoapType;
|
||||||
|
|
||||||
|
|
||||||
|
public class NumberConversionTester {
|
||||||
|
public static void main(String [] args) throws MalformedURLException{
|
||||||
|
final String adresse="https://www.dataaccess.com/webservicesserver/numberconversion.wso";
|
||||||
|
final URL url = URI.create(adresse).toURL();
|
||||||
|
final NumberConversion service = new NumberConversion(url);
|
||||||
|
final NumberConversionSoapType port = service.getPort(NumberConversionSoapType.class);
|
||||||
|
BigInteger test = new BigInteger("412342");
|
||||||
|
System.out.println("We call " + test + " " + port.numberToWords(test));
|
||||||
|
}
|
||||||
|
}
|
110
NumberConversion/src/main/resources/wsdl/numberconversion.wsdl
Normal file
110
NumberConversion/src/main/resources/wsdl/numberconversion.wsdl
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://www.dataaccess.com/webservicesserver/" name="NumberConversion" targetNamespace="http://www.dataaccess.com/webservicesserver/">
|
||||||
|
<types>
|
||||||
|
<xs:schema elementFormDefault="qualified" targetNamespace="http://www.dataaccess.com/webservicesserver/">
|
||||||
|
<xs:element name="NumberToWords">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="ubiNum" type="xs:unsignedLong"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumberToWordsResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="NumberToWordsResult" type="xs:string"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumberToDollars">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="dNum" type="xs:decimal"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumberToDollarsResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="NumberToDollarsResult" type="xs:string"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
|
</types>
|
||||||
|
<message name="NumberToWordsSoapRequest">
|
||||||
|
<part name="parameters" element="tns:NumberToWords"/>
|
||||||
|
</message>
|
||||||
|
<message name="NumberToWordsSoapResponse">
|
||||||
|
<part name="parameters" element="tns:NumberToWordsResponse"/>
|
||||||
|
</message>
|
||||||
|
<message name="NumberToDollarsSoapRequest">
|
||||||
|
<part name="parameters" element="tns:NumberToDollars"/>
|
||||||
|
</message>
|
||||||
|
<message name="NumberToDollarsSoapResponse">
|
||||||
|
<part name="parameters" element="tns:NumberToDollarsResponse"/>
|
||||||
|
</message>
|
||||||
|
<portType name="NumberConversionSoapType">
|
||||||
|
<operation name="NumberToWords">
|
||||||
|
<documentation>Returns the word corresponding to the positive number passed as parameter. Limited to quadrillions.</documentation>
|
||||||
|
<input message="tns:NumberToWordsSoapRequest"/>
|
||||||
|
<output message="tns:NumberToWordsSoapResponse"/>
|
||||||
|
</operation>
|
||||||
|
<operation name="NumberToDollars">
|
||||||
|
<documentation>Returns the non-zero dollar amount of the passed number.</documentation>
|
||||||
|
<input message="tns:NumberToDollarsSoapRequest"/>
|
||||||
|
<output message="tns:NumberToDollarsSoapResponse"/>
|
||||||
|
</operation>
|
||||||
|
</portType>
|
||||||
|
<binding name="NumberConversionSoapBinding" type="tns:NumberConversionSoapType">
|
||||||
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="NumberToWords">
|
||||||
|
<soap:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
<operation name="NumberToDollars">
|
||||||
|
<soap:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<binding name="NumberConversionSoapBinding12" type="tns:NumberConversionSoapType">
|
||||||
|
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="NumberToWords">
|
||||||
|
<soap12:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
<operation name="NumberToDollars">
|
||||||
|
<soap12:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<service name="NumberConversion">
|
||||||
|
<documentation>The Number Conversion Web Service, implemented with Visual DataFlex, provides functions that convert numbers into words or dollar amounts.</documentation>
|
||||||
|
<port name="NumberConversionSoap" binding="tns:NumberConversionSoapBinding">
|
||||||
|
<soap:address location="https://www.dataaccess.com/webservicesserver/numberconversion.wso"/>
|
||||||
|
</port>
|
||||||
|
<port name="NumberConversionSoap12" binding="tns:NumberConversionSoapBinding12">
|
||||||
|
<soap12:address location="https://www.dataaccess.com/webservicesserver/numberconversion.wso"/>
|
||||||
|
</port>
|
||||||
|
</service>
|
||||||
|
</definitions>
|
4
NumberConversion/target/classes/META-INF/MANIFEST.MF
Normal file
4
NumberConversion/target/classes/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Build-Jdk-Spec: 22
|
||||||
|
Created-By: Maven Integration for Eclipse
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#Generated by Maven Integration for Eclipse
|
||||||
|
#Tue Oct 08 14:51:58 CEST 2024
|
||||||
|
artifactId=NumberConversion
|
||||||
|
groupId=fr.insa.soap
|
||||||
|
m2e.projectLocation=/home/nbillard/eclipse-workspace/NumberConversion
|
||||||
|
m2e.projectName=NumberConversion
|
||||||
|
version=0.0.1-SNAPSHOT
|
|
@ -0,0 +1,54 @@
|
||||||
|
<project xmlns="https://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>fr.insa.soap</groupId>
|
||||||
|
<artifactId>NumberConversion</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<cxf.version>3.4.2</cxf.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.ws</groupId>
|
||||||
|
<artifactId>jaxws-rt</artifactId>
|
||||||
|
<version>2.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.cxf</groupId>
|
||||||
|
<artifactId>cxf-codegen-plugin</artifactId>
|
||||||
|
<version>${cxf.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<configuration>
|
||||||
|
<sourceRoot>
|
||||||
|
${project.build.directory}/generated-sources/cxf
|
||||||
|
</sourceRoot>
|
||||||
|
<wsdlOptions>
|
||||||
|
<wsdlOption>
|
||||||
|
<wsdl>
|
||||||
|
${basedir}/src/main/resources/wsdl/numberconversion.wsdl
|
||||||
|
</wsdl>
|
||||||
|
<packagenames>
|
||||||
|
<packagename>fr.insa.soap.wsdltojava</packagename>
|
||||||
|
</packagenames>
|
||||||
|
</wsdlOption>
|
||||||
|
</wsdlOptions>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>wsdl2java</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
BIN
NumberConversion/target/classes/NumberConversionTester.class
Normal file
BIN
NumberConversion/target/classes/NumberConversionTester.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
110
NumberConversion/target/classes/wsdl/numberconversion.wsdl
Normal file
110
NumberConversion/target/classes/wsdl/numberconversion.wsdl
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://www.dataaccess.com/webservicesserver/" name="NumberConversion" targetNamespace="http://www.dataaccess.com/webservicesserver/">
|
||||||
|
<types>
|
||||||
|
<xs:schema elementFormDefault="qualified" targetNamespace="http://www.dataaccess.com/webservicesserver/">
|
||||||
|
<xs:element name="NumberToWords">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="ubiNum" type="xs:unsignedLong"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumberToWordsResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="NumberToWordsResult" type="xs:string"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumberToDollars">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="dNum" type="xs:decimal"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="NumberToDollarsResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="NumberToDollarsResult" type="xs:string"/>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
|
</types>
|
||||||
|
<message name="NumberToWordsSoapRequest">
|
||||||
|
<part name="parameters" element="tns:NumberToWords"/>
|
||||||
|
</message>
|
||||||
|
<message name="NumberToWordsSoapResponse">
|
||||||
|
<part name="parameters" element="tns:NumberToWordsResponse"/>
|
||||||
|
</message>
|
||||||
|
<message name="NumberToDollarsSoapRequest">
|
||||||
|
<part name="parameters" element="tns:NumberToDollars"/>
|
||||||
|
</message>
|
||||||
|
<message name="NumberToDollarsSoapResponse">
|
||||||
|
<part name="parameters" element="tns:NumberToDollarsResponse"/>
|
||||||
|
</message>
|
||||||
|
<portType name="NumberConversionSoapType">
|
||||||
|
<operation name="NumberToWords">
|
||||||
|
<documentation>Returns the word corresponding to the positive number passed as parameter. Limited to quadrillions.</documentation>
|
||||||
|
<input message="tns:NumberToWordsSoapRequest"/>
|
||||||
|
<output message="tns:NumberToWordsSoapResponse"/>
|
||||||
|
</operation>
|
||||||
|
<operation name="NumberToDollars">
|
||||||
|
<documentation>Returns the non-zero dollar amount of the passed number.</documentation>
|
||||||
|
<input message="tns:NumberToDollarsSoapRequest"/>
|
||||||
|
<output message="tns:NumberToDollarsSoapResponse"/>
|
||||||
|
</operation>
|
||||||
|
</portType>
|
||||||
|
<binding name="NumberConversionSoapBinding" type="tns:NumberConversionSoapType">
|
||||||
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="NumberToWords">
|
||||||
|
<soap:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
<operation name="NumberToDollars">
|
||||||
|
<soap:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<binding name="NumberConversionSoapBinding12" type="tns:NumberConversionSoapType">
|
||||||
|
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<operation name="NumberToWords">
|
||||||
|
<soap12:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
<operation name="NumberToDollars">
|
||||||
|
<soap12:operation soapAction="" style="document"/>
|
||||||
|
<input>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</input>
|
||||||
|
<output>
|
||||||
|
<soap12:body use="literal"/>
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
<service name="NumberConversion">
|
||||||
|
<documentation>The Number Conversion Web Service, implemented with Visual DataFlex, provides functions that convert numbers into words or dollar amounts.</documentation>
|
||||||
|
<port name="NumberConversionSoap" binding="tns:NumberConversionSoapBinding">
|
||||||
|
<soap:address location="https://www.dataaccess.com/webservicesserver/numberconversion.wso"/>
|
||||||
|
</port>
|
||||||
|
<port name="NumberConversionSoap12" binding="tns:NumberConversionSoapBinding12">
|
||||||
|
<soap12:address location="https://www.dataaccess.com/webservicesserver/numberconversion.wso"/>
|
||||||
|
</port>
|
||||||
|
</service>
|
||||||
|
</definitions>
|
Binary file not shown.
|
@ -0,0 +1,113 @@
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
import javax.xml.ws.WebEndpoint;
|
||||||
|
import javax.xml.ws.WebServiceClient;
|
||||||
|
import javax.xml.ws.WebServiceFeature;
|
||||||
|
import javax.xml.ws.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Number Conversion Web Service, implemented with Visual DataFlex, provides functions that convert numbers into words or dollar amounts.
|
||||||
|
*
|
||||||
|
* This class was generated by Apache CXF 3.4.2
|
||||||
|
* 2024-10-08T14:41:29.112+02:00
|
||||||
|
* Generated source version: 3.4.2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@WebServiceClient(name = "NumberConversion",
|
||||||
|
wsdlLocation = "file:/home/nbillard/eclipse-workspace/NumberConversion/src/main/resources/wsdl/numberconversion.wsdl",
|
||||||
|
targetNamespace = "http://www.dataaccess.com/webservicesserver/")
|
||||||
|
public class NumberConversion extends Service {
|
||||||
|
|
||||||
|
public final static URL WSDL_LOCATION;
|
||||||
|
|
||||||
|
public final static QName SERVICE = new QName("http://www.dataaccess.com/webservicesserver/", "NumberConversion");
|
||||||
|
public final static QName NumberConversionSoap = new QName("http://www.dataaccess.com/webservicesserver/", "NumberConversionSoap");
|
||||||
|
public final static QName NumberConversionSoap12 = new QName("http://www.dataaccess.com/webservicesserver/", "NumberConversionSoap12");
|
||||||
|
static {
|
||||||
|
URL url = null;
|
||||||
|
try {
|
||||||
|
url = new URL("file:/home/nbillard/eclipse-workspace/NumberConversion/src/main/resources/wsdl/numberconversion.wsdl");
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
java.util.logging.Logger.getLogger(NumberConversion.class.getName())
|
||||||
|
.log(java.util.logging.Level.INFO,
|
||||||
|
"Can not initialize the default wsdl from {0}", "file:/home/nbillard/eclipse-workspace/NumberConversion/src/main/resources/wsdl/numberconversion.wsdl");
|
||||||
|
}
|
||||||
|
WSDL_LOCATION = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberConversion(URL wsdlLocation) {
|
||||||
|
super(wsdlLocation, SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberConversion(URL wsdlLocation, QName serviceName) {
|
||||||
|
super(wsdlLocation, serviceName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberConversion() {
|
||||||
|
super(WSDL_LOCATION, SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberConversion(WebServiceFeature ... features) {
|
||||||
|
super(WSDL_LOCATION, SERVICE, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberConversion(URL wsdlLocation, WebServiceFeature ... features) {
|
||||||
|
super(wsdlLocation, SERVICE, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NumberConversion(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
|
||||||
|
super(wsdlLocation, serviceName, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* returns NumberConversionSoapType
|
||||||
|
*/
|
||||||
|
@WebEndpoint(name = "NumberConversionSoap")
|
||||||
|
public NumberConversionSoapType getNumberConversionSoap() {
|
||||||
|
return super.getPort(NumberConversionSoap, NumberConversionSoapType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param features
|
||||||
|
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
|
||||||
|
* @return
|
||||||
|
* returns NumberConversionSoapType
|
||||||
|
*/
|
||||||
|
@WebEndpoint(name = "NumberConversionSoap")
|
||||||
|
public NumberConversionSoapType getNumberConversionSoap(WebServiceFeature... features) {
|
||||||
|
return super.getPort(NumberConversionSoap, NumberConversionSoapType.class, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* returns NumberConversionSoapType
|
||||||
|
*/
|
||||||
|
@WebEndpoint(name = "NumberConversionSoap12")
|
||||||
|
public NumberConversionSoapType getNumberConversionSoap12() {
|
||||||
|
return super.getPort(NumberConversionSoap12, NumberConversionSoapType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param features
|
||||||
|
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
|
||||||
|
* @return
|
||||||
|
* returns NumberConversionSoapType
|
||||||
|
*/
|
||||||
|
@WebEndpoint(name = "NumberConversionSoap12")
|
||||||
|
public NumberConversionSoapType getNumberConversionSoap12(WebServiceFeature... features) {
|
||||||
|
return super.getPort(NumberConversionSoap12, NumberConversionSoapType.class, features);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.jws.WebMethod;
|
||||||
|
import javax.jws.WebParam;
|
||||||
|
import javax.jws.WebResult;
|
||||||
|
import javax.jws.WebService;
|
||||||
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
|
import javax.xml.ws.RequestWrapper;
|
||||||
|
import javax.xml.ws.ResponseWrapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class was generated by Apache CXF 3.4.2
|
||||||
|
* 2024-10-08T14:41:29.064+02:00
|
||||||
|
* Generated source version: 3.4.2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@WebService(targetNamespace = "http://www.dataaccess.com/webservicesserver/", name = "NumberConversionSoapType")
|
||||||
|
@XmlSeeAlso({ObjectFactory.class})
|
||||||
|
public interface NumberConversionSoapType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the word corresponding to the positive number passed as parameter. Limited to quadrillions.
|
||||||
|
*/
|
||||||
|
@WebMethod(operationName = "NumberToWords")
|
||||||
|
@RequestWrapper(localName = "NumberToWords", targetNamespace = "http://www.dataaccess.com/webservicesserver/", className = "fr.insa.soap.wsdltojava.NumberToWords")
|
||||||
|
@ResponseWrapper(localName = "NumberToWordsResponse", targetNamespace = "http://www.dataaccess.com/webservicesserver/", className = "fr.insa.soap.wsdltojava.NumberToWordsResponse")
|
||||||
|
@WebResult(name = "NumberToWordsResult", targetNamespace = "http://www.dataaccess.com/webservicesserver/")
|
||||||
|
public java.lang.String numberToWords(
|
||||||
|
|
||||||
|
@WebParam(name = "ubiNum", targetNamespace = "http://www.dataaccess.com/webservicesserver/")
|
||||||
|
java.math.BigInteger ubiNum
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the non-zero dollar amount of the passed number.
|
||||||
|
*/
|
||||||
|
@WebMethod(operationName = "NumberToDollars")
|
||||||
|
@RequestWrapper(localName = "NumberToDollars", targetNamespace = "http://www.dataaccess.com/webservicesserver/", className = "fr.insa.soap.wsdltojava.NumberToDollars")
|
||||||
|
@ResponseWrapper(localName = "NumberToDollarsResponse", targetNamespace = "http://www.dataaccess.com/webservicesserver/", className = "fr.insa.soap.wsdltojava.NumberToDollarsResponse")
|
||||||
|
@WebResult(name = "NumberToDollarsResult", targetNamespace = "http://www.dataaccess.com/webservicesserver/")
|
||||||
|
public java.lang.String numberToDollars(
|
||||||
|
|
||||||
|
@WebParam(name = "dNum", targetNamespace = "http://www.dataaccess.com/webservicesserver/")
|
||||||
|
java.math.BigDecimal dNum
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Classe Java pour anonymous complex type.
|
||||||
|
*
|
||||||
|
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* &lt;complexType&gt;
|
||||||
|
* &lt;complexContent&gt;
|
||||||
|
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
|
||||||
|
* &lt;sequence&gt;
|
||||||
|
* &lt;element name="dNum" type="{http://www.w3.org/2001/XMLSchema}decimal"/&gt;
|
||||||
|
* &lt;/sequence&gt;
|
||||||
|
* &lt;/restriction&gt;
|
||||||
|
* &lt;/complexContent&gt;
|
||||||
|
* &lt;/complexType&gt;
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "", propOrder = {
|
||||||
|
"dNum"
|
||||||
|
})
|
||||||
|
@XmlRootElement(name = "NumberToDollars")
|
||||||
|
public class NumberToDollars {
|
||||||
|
|
||||||
|
@XmlElement(required = true)
|
||||||
|
protected BigDecimal dNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtient la valeur de la propriété dNum.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link BigDecimal }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public BigDecimal getDNum() {
|
||||||
|
return dNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Définit la valeur de la propriété dNum.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link BigDecimal }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setDNum(BigDecimal value) {
|
||||||
|
this.dNum = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Classe Java pour anonymous complex type.
|
||||||
|
*
|
||||||
|
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* &lt;complexType&gt;
|
||||||
|
* &lt;complexContent&gt;
|
||||||
|
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
|
||||||
|
* &lt;sequence&gt;
|
||||||
|
* &lt;element name="NumberToDollarsResult" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
|
||||||
|
* &lt;/sequence&gt;
|
||||||
|
* &lt;/restriction&gt;
|
||||||
|
* &lt;/complexContent&gt;
|
||||||
|
* &lt;/complexType&gt;
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "", propOrder = {
|
||||||
|
"numberToDollarsResult"
|
||||||
|
})
|
||||||
|
@XmlRootElement(name = "NumberToDollarsResponse")
|
||||||
|
public class NumberToDollarsResponse {
|
||||||
|
|
||||||
|
@XmlElement(name = "NumberToDollarsResult", required = true)
|
||||||
|
protected String numberToDollarsResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtient la valeur de la propriété numberToDollarsResult.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getNumberToDollarsResult() {
|
||||||
|
return numberToDollarsResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Définit la valeur de la propriété numberToDollarsResult.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setNumberToDollarsResult(String value) {
|
||||||
|
this.numberToDollarsResult = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlSchemaType;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Classe Java pour anonymous complex type.
|
||||||
|
*
|
||||||
|
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* &lt;complexType&gt;
|
||||||
|
* &lt;complexContent&gt;
|
||||||
|
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
|
||||||
|
* &lt;sequence&gt;
|
||||||
|
* &lt;element name="ubiNum" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/&gt;
|
||||||
|
* &lt;/sequence&gt;
|
||||||
|
* &lt;/restriction&gt;
|
||||||
|
* &lt;/complexContent&gt;
|
||||||
|
* &lt;/complexType&gt;
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "", propOrder = {
|
||||||
|
"ubiNum"
|
||||||
|
})
|
||||||
|
@XmlRootElement(name = "NumberToWords")
|
||||||
|
public class NumberToWords {
|
||||||
|
|
||||||
|
@XmlElement(required = true)
|
||||||
|
@XmlSchemaType(name = "unsignedLong")
|
||||||
|
protected BigInteger ubiNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtient la valeur de la propriété ubiNum.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link BigInteger }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public BigInteger getUbiNum() {
|
||||||
|
return ubiNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Définit la valeur de la propriété ubiNum.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link BigInteger }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setUbiNum(BigInteger value) {
|
||||||
|
this.ubiNum = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Classe Java pour anonymous complex type.
|
||||||
|
*
|
||||||
|
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* &lt;complexType&gt;
|
||||||
|
* &lt;complexContent&gt;
|
||||||
|
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
|
||||||
|
* &lt;sequence&gt;
|
||||||
|
* &lt;element name="NumberToWordsResult" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
|
||||||
|
* &lt;/sequence&gt;
|
||||||
|
* &lt;/restriction&gt;
|
||||||
|
* &lt;/complexContent&gt;
|
||||||
|
* &lt;/complexType&gt;
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlType(name = "", propOrder = {
|
||||||
|
"numberToWordsResult"
|
||||||
|
})
|
||||||
|
@XmlRootElement(name = "NumberToWordsResponse")
|
||||||
|
public class NumberToWordsResponse {
|
||||||
|
|
||||||
|
@XmlElement(name = "NumberToWordsResult", required = true)
|
||||||
|
protected String numberToWordsResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtient la valeur de la propriété numberToWordsResult.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* possible object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public String getNumberToWordsResult() {
|
||||||
|
return numberToWordsResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Définit la valeur de la propriété numberToWordsResult.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link String }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setNumberToWordsResult(String value) {
|
||||||
|
this.numberToWordsResult = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
|
||||||
|
package fr.insa.soap.wsdltojava;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlRegistry;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This object contains factory methods for each
|
||||||
|
* Java content interface and Java element interface
|
||||||
|
* generated in the fr.insa.soap.wsdltojava package.
|
||||||
|
* <p>An ObjectFactory allows you to programatically
|
||||||
|
* construct new instances of the Java representation
|
||||||
|
* for XML content. The Java representation of XML
|
||||||
|
* content can consist of schema derived interfaces
|
||||||
|
* and classes representing the binding of schema
|
||||||
|
* type definitions, element declarations and model
|
||||||
|
* groups. Factory methods for each of these are
|
||||||
|
* provided in this class.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@XmlRegistry
|
||||||
|
public class ObjectFactory {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: fr.insa.soap.wsdltojava
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ObjectFactory() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link NumberToWords }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public NumberToWords createNumberToWords() {
|
||||||
|
return new NumberToWords();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link NumberToWordsResponse }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public NumberToWordsResponse createNumberToWordsResponse() {
|
||||||
|
return new NumberToWordsResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link NumberToDollars }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public NumberToDollars createNumberToDollars() {
|
||||||
|
return new NumberToDollars();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of {@link NumberToDollarsResponse }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public NumberToDollarsResponse createNumberToDollarsResponse() {
|
||||||
|
return new NumberToDollarsResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.dataaccess.com/webservicesserver/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
|
||||||
|
package fr.insa.soap.wsdltojava;
|
41
RestProject/.classpath
Normal file
41
RestProject/.classpath
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
37
RestProject/.project
Normal file
37
RestProject/.project
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>RestProject</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
13
RestProject/.settings/.jsdtscope
Normal file
13
RestProject/.settings/.jsdtscope
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src/main/webapp"/>
|
||||||
|
<classpathentry excluding="**/node_modules/*|**/*.min.js|**/bower_components/*" kind="src" path="target/m2e-wtp/web-resources"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="hide" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||||
|
<classpathentry kind="output" path=""/>
|
||||||
|
</classpath>
|
4
RestProject/.settings/org.eclipse.core.resources.prefs
Normal file
4
RestProject/.settings/org.eclipse.core.resources.prefs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
10
RestProject/.settings/org.eclipse.jdt.core.prefs
Normal file
10
RestProject/.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=17
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=17
|
4
RestProject/.settings/org.eclipse.m2e.core.prefs
Normal file
4
RestProject/.settings/org.eclipse.m2e.core.prefs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
10
RestProject/.settings/org.eclipse.wst.common.component
Normal file
10
RestProject/.settings/org.eclipse.wst.common.component
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
<wb-module deploy-name="RestProject">
|
||||||
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<property name="context-root" value="RestProject"/>
|
||||||
|
<property name="java-output-path" value="/RestProject/target/classes"/>
|
||||||
|
</wb-module>
|
||||||
|
</project-modules>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faceted-project>
|
||||||
|
<fixed facet="wst.jsdt.web"/>
|
||||||
|
<installed facet="jst.web" version="2.5"/>
|
||||||
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
|
<installed facet="java" version="17"/>
|
||||||
|
</faceted-project>
|
|
@ -0,0 +1 @@
|
||||||
|
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1 @@
|
||||||
|
Window
|
2
RestProject/.settings/org.eclipse.wst.validation.prefs
Normal file
2
RestProject/.settings/org.eclipse.wst.validation.prefs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
disabled=06target
|
||||||
|
eclipse.preferences.version=1
|
92
RestProject/pom.xml
Normal file
92
RestProject/pom.xml
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>fr.insa.rest</groupId>
|
||||||
|
<artifactId>RestProject</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>RestProject</name>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>RestProject</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<configuration>
|
||||||
|
<source>17</source>
|
||||||
|
<target>17</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- <plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.3.1</version>
|
||||||
|
</plugin> -->
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jersey</groupId>
|
||||||
|
<artifactId>jersey-bom</artifactId>
|
||||||
|
<version>${jersey.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jersey.containers</groupId>
|
||||||
|
<artifactId>jersey-container-servlet-core</artifactId>
|
||||||
|
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
|
||||||
|
<!-- artifactId>jersey-container-servlet</artifactId -->
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jersey.inject</groupId>
|
||||||
|
<artifactId>jersey-hk2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- uncomment this to get JSON support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jersey.media</groupId>
|
||||||
|
<artifactId>jersey-media-json-binding</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.archetypes/jersey-quickstart-webapp -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jersey.archetypes</groupId>
|
||||||
|
<artifactId>jersey-quickstart-webapp</artifactId>
|
||||||
|
<version>4.0.0-M1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.servlet</groupId>
|
||||||
|
<artifactId>jakarta.servlet-api</artifactId>
|
||||||
|
<version>5.0.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>org.glassfish.jersey.media</groupId>
|
||||||
|
<artifactId>jersey-media-json-binding</artifactId>
|
||||||
|
</dependency> -->
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-json-jackson -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
<properties>
|
||||||
|
<jersey.version>4.0.0-M1</jersey.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<war.mvn.plugin.version>3.4.0</war.mvn.plugin.version>
|
||||||
|
</properties>
|
||||||
|
</project>
|
|
@ -0,0 +1,18 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
public class Binome {
|
||||||
|
private String nom;
|
||||||
|
private String prenom;
|
||||||
|
public String getPrenom() {
|
||||||
|
return prenom;
|
||||||
|
}
|
||||||
|
public void setPrenom(String prenom) {
|
||||||
|
this.prenom = prenom;
|
||||||
|
}
|
||||||
|
public String getNom() {
|
||||||
|
return nom;
|
||||||
|
}
|
||||||
|
public void setNom(String nom) {
|
||||||
|
this.nom = nom;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.Consumes;
|
||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.PUT;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.PathParam;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.QueryParam;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
|
||||||
|
@Path("comparator")
|
||||||
|
public class Comparator {
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String sayHello() {
|
||||||
|
return "Bonjour";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("longeur/{chaine}")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public int getLongeur(@PathParam("chaine") String chaine) {
|
||||||
|
return chaine.length();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("longeurDouble")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public int getLongeurDouble(@QueryParam("chaine") String chaine) {
|
||||||
|
return chaine.length() * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PUT
|
||||||
|
@Path("/{idEtudiant}")
|
||||||
|
@Consumes(MediaType.TEXT_PLAIN)
|
||||||
|
public int updateEtudiant(@PathParam("idEtudiant") int id) {
|
||||||
|
System.out.println("mise à jour réussie!");
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class Etudiant {
|
||||||
|
private int id;
|
||||||
|
private String nom;
|
||||||
|
private String prenom;
|
||||||
|
|
||||||
|
private Binome binome;
|
||||||
|
|
||||||
|
private Stage stage;
|
||||||
|
private ArrayList<Link> links = new ArrayList<Link>();
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
public ArrayList<Link> getLinks() {
|
||||||
|
return links;
|
||||||
|
}
|
||||||
|
public Stage getStage() {
|
||||||
|
return stage;
|
||||||
|
}
|
||||||
|
public void setStage(Stage stage) {
|
||||||
|
this.stage = stage;
|
||||||
|
}
|
||||||
|
public String getNom() {
|
||||||
|
return nom;
|
||||||
|
}
|
||||||
|
public void setNom(String nom) {
|
||||||
|
this.nom = nom;
|
||||||
|
}
|
||||||
|
public String getPrenom() {
|
||||||
|
return prenom;
|
||||||
|
}
|
||||||
|
public void setPrenom(String prenom) {
|
||||||
|
this.prenom = prenom;
|
||||||
|
}
|
||||||
|
public Binome getBinome() {
|
||||||
|
return binome;
|
||||||
|
}
|
||||||
|
public void setBinome(Binome binome) {
|
||||||
|
this.binome = binome;
|
||||||
|
}
|
||||||
|
public void addLink(String uri, String rel, String methode) {
|
||||||
|
Link newLink = new Link();
|
||||||
|
newLink.setUri(uri);
|
||||||
|
newLink.setRel(rel);
|
||||||
|
newLink.setMethode(methode);
|
||||||
|
links.add(newLink);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.Consumes;
|
||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.POST;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.core.Context;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import jakarta.ws.rs.core.UriInfo;
|
||||||
|
|
||||||
|
@Path("etudiant")
|
||||||
|
public class EtudiantRessource {
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public Etudiant getEtudiant(@Context UriInfo uriInfo) {
|
||||||
|
Etudiant etudiant = new Etudiant();
|
||||||
|
etudiant.setNom("N");
|
||||||
|
etudiant.setPrenom("G");
|
||||||
|
etudiant.addLink(getUriforSelf(uriInfo, etudiant), "self", "GET");
|
||||||
|
etudiant.addLink(getUriforStage(uriInfo), "Stage", "GET");
|
||||||
|
return etudiant;
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/{idEtudiant}")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
public void addEtudiant(Etudiant etudNouv) {
|
||||||
|
System.out.println("Ajout de l'étudiant " + etudNouv.getNom() + " " + etudNouv.getPrenom() + " réussie !");
|
||||||
|
System.out.println("Son binome est " + etudNouv.getBinome().getPrenom() + " " + etudNouv.getBinome().getNom());
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getUriforStage(UriInfo uriInfo) {
|
||||||
|
String url = uriInfo.getBaseUriBuilder()
|
||||||
|
.path(StageRessource.class)
|
||||||
|
.build(null)
|
||||||
|
.toString();
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
private String getUriforSelf(UriInfo uriInfo, Etudiant etudiant) {
|
||||||
|
String url = uriInfo.getBaseUriBuilder()
|
||||||
|
.path(EtudiantRessource.class)
|
||||||
|
.path(Long.toString(etudiant.getId()))
|
||||||
|
.build(null)
|
||||||
|
.toString();
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
}
|
26
RestProject/src/main/java/fr/insa/rest/RestProject/Link.java
Normal file
26
RestProject/src/main/java/fr/insa/rest/RestProject/Link.java
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
public class Link {
|
||||||
|
private String uri;
|
||||||
|
private String rel;
|
||||||
|
private String methode;
|
||||||
|
|
||||||
|
public String getUri() {
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
public void setUri(String uri) {
|
||||||
|
this.uri = uri;
|
||||||
|
}
|
||||||
|
public String getRel() {
|
||||||
|
return rel;
|
||||||
|
}
|
||||||
|
public void setRel(String rel) {
|
||||||
|
this.rel = rel;
|
||||||
|
}
|
||||||
|
public String getMethode() {
|
||||||
|
return methode;
|
||||||
|
}
|
||||||
|
public void setMethode(String methode) {
|
||||||
|
this.methode = methode;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Root resource (exposed at "myresource" path)
|
||||||
|
*/
|
||||||
|
@Path("myresource")
|
||||||
|
public class MyResource {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method handling HTTP GET requests. The returned object will be sent
|
||||||
|
* to the client as "text/plain" media type.
|
||||||
|
*
|
||||||
|
* @return String that will be returned as a text/plain response.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String getIt() {
|
||||||
|
return "Got it!";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
public class Stage {
|
||||||
|
private int evaluation;
|
||||||
|
private String competences;
|
||||||
|
private int annee;
|
||||||
|
|
||||||
|
public int getEvaluation() {
|
||||||
|
return evaluation;
|
||||||
|
}
|
||||||
|
public void setEvaluation(int evaluation) {
|
||||||
|
this.evaluation = evaluation;
|
||||||
|
}
|
||||||
|
public String getCompetences() {
|
||||||
|
return competences;
|
||||||
|
}
|
||||||
|
public void setCompetences(String competences) {
|
||||||
|
this.competences = competences;
|
||||||
|
}
|
||||||
|
public int getAnnee() {
|
||||||
|
return annee;
|
||||||
|
}
|
||||||
|
public void setAnnee(int annee) {
|
||||||
|
this.annee = annee;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package fr.insa.rest.RestProject;
|
||||||
|
|
||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
|
||||||
|
@Path("stage")
|
||||||
|
public class StageRessource {
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public Stage getStage(int idEtudiant) {
|
||||||
|
Stage stage = new Stage();
|
||||||
|
stage.setEvaluation(16);;
|
||||||
|
stage.setCompetences("SOA, Rest");
|
||||||
|
stage.setAnnee(2024);
|
||||||
|
return stage;
|
||||||
|
}
|
||||||
|
}
|
18
RestProject/src/main/webapp/WEB-INF/web.xml
Normal file
18
RestProject/src/main/webapp/WEB-INF/web.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- This web.xml file is not required when using Servlet 3.0 container,
|
||||||
|
see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html -->
|
||||||
|
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>Jersey Web Application</servlet-name>
|
||||||
|
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>jersey.config.server.provider.packages</param-name>
|
||||||
|
<param-value>fr.insa.rest.RestProject</param-value>
|
||||||
|
</init-param>
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>Jersey Web Application</servlet-name>
|
||||||
|
<url-pattern>/webapi/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
</web-app>
|
10
RestProject/src/main/webapp/index.jsp
Normal file
10
RestProject/src/main/webapp/index.jsp
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h2>Jersey RESTful Web Application!</h2>
|
||||||
|
<p><a href="webapi/myresource">Jersey resource</a></p>
|
||||||
|
<p><a href="webapi/comparator">Comparator </a></p>
|
||||||
|
<p><a href="webapi/etudiant">Etudiant </a></p>
|
||||||
|
<p>Visit <a href="http://jersey.java.net">Project Jersey website</a></p>
|
||||||
|
for more information on Jersey!
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
RestProject/target/classes/fr/insa/rest/RestProject/Binome.class
Normal file
BIN
RestProject/target/classes/fr/insa/rest/RestProject/Binome.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
RestProject/target/classes/fr/insa/rest/RestProject/Link.class
Normal file
BIN
RestProject/target/classes/fr/insa/rest/RestProject/Link.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
RestProject/target/classes/fr/insa/rest/RestProject/Stage.class
Normal file
BIN
RestProject/target/classes/fr/insa/rest/RestProject/Stage.class
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Build-Jdk-Spec: 22
|
||||||
|
Created-By: Maven Integration for Eclipse
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#Generated by Maven Integration for Eclipse
|
||||||
|
#Wed Nov 06 09:23:58 CET 2024
|
||||||
|
artifactId=RestProject
|
||||||
|
groupId=fr.insa.rest
|
||||||
|
m2e.projectLocation=/home/nbillard/eclipse-workspace/RestProject
|
||||||
|
m2e.projectName=RestProject
|
||||||
|
version=0.0.1-SNAPSHOT
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue