From 462f64dbda4bba6ba3747f0383b73b4c92da26a6 Mon Sep 17 00:00:00 2001 From: Patient NTUMBA <passyntumba@gmail.com> Date: Tue, 24 Apr 2018 14:51:21 +0200 Subject: [PATCH] Update VSB master project and fixing bugs protocols binding --- .../vsb/artifact/generators/Generator.java | 49 +++++-- vsb-manager-api/pom.xml | 2 +- .../vsb/manager/api/VsbManager.java | 29 ++-- .../src/main/resources/pom-gm-coap.xml | 1 - .../src/main/resources/pom-gm-dpws.xml | 6 +- .../src/main/resources/pom-gm-mqtt.xml | 132 +----------------- .../src/main/resources/pom-gm-rest.xml | 105 -------------- .../{pom-of-war.xml => pom-gm-soap-war.xml} | 67 +++++++-- .../vsb/manager/VsbManagerTest.java | 13 +- .../resources/gidl/{gidl.gidl => gidl_1.gidl} | 7 +- .../src/test/resources/gidl/gidl_2.gidl | 14 ++ 11 files changed, 140 insertions(+), 285 deletions(-) rename vsb-manager-api/src/main/resources/{pom-of-war.xml => pom-gm-soap-war.xml} (79%) rename vsb-manager-api/src/test/resources/gidl/{gidl.gidl => gidl_1.gidl} (86%) create mode 100644 vsb-manager-api/src/test/resources/gidl/gidl_2.gidl diff --git a/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/Generator.java b/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/Generator.java index e7247f86..5e29354c 100644 --- a/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/Generator.java +++ b/bc-generators/artifact-generators/src/main/java/eu/chorevolution/vsb/artifact/generators/Generator.java @@ -17,7 +17,13 @@ import eu.chorevolution.vsb.gmdl.utils.enums.ProtocolType; public class Generator { private JavaArchive archive; - public Generator(){} + private ProtocolType busProtocol; + private Class<?> bc = null; + public Generator(ProtocolType busProtocol){ + + this.busProtocol = busProtocol; + + } public void compileGeneratedClasses(Class[] classesOptions){ @@ -25,31 +31,45 @@ public class Generator { RunTimeCompiler compiler = new RunTimeCompiler(sourceFilesPath,Constants.generatedCodePath,classesOptions); compiler.compile(); File sourceDir = new File(sourceFilesPath); + for(File f: sourceDir.listFiles()){ + + if(f.getName().endsWith("java")){ + + f.delete(); + } + + } PathResolver.setClassPath(Constants.generatedCodePath); + if(this.busProtocol != ProtocolType.SOAP) { + + + try { + + bc = Class.forName(Constants.target_namespace + ".BindingComponentMain"); + + } catch (ClassNotFoundException e){ + + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } } public VsbOutput generateWar(WarGenerator warGenerator, ProtocolType busProtocol){ - warGenerator.addArchive(archive); VsbOutput vsbOutput = warGenerator.generate(busProtocol == ProtocolType.SOAP); return vsbOutput; } public byte[] generateJar(JarGenerator jarGenerator){ - - Class<?> bc = null; - try { - - bc = Class.forName(Constants.target_namespace + ".BindingComponentMain"); - - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } archive = ShrinkWrap.create(JavaArchive.class); - archive.addPackage(bc.getPackage()); + if(bc != null) { + + archive.addPackage(bc.getPackage()); + } archive.addPackage(eu.chorevolution.vsb.gmdl.tools.serviceparser.gidl.ParseGIDL.class.getPackage()); archive.addPackage(eu.chorevolution.vsb.gmdl.tools.serviceparser.gmdl.ParseGMDL.class.getPackage()); archive.addPackage(eu.chorevolution.vsb.gmdl.utils.Operation.class.getPackage()); @@ -60,8 +80,7 @@ public class Generator { archive.addPackage(eu.chorevolution.vsb.artifact.generators.WarGenerator.class.getPackage()); archive.addPackage(eu.chorevolution.vsb.bc.setinvaddrservice.BaseService.class.getPackage()); archive.addPackage(eu.chorevolution.vsb.gm.protocols.Manageable.class.getPackage()); - archive - .addPackage(eu.chorevolution.vsb.gmdl.tools.serviceparser.ServiceDescriptionParser.class.getPackage()); + archive.addPackage(eu.chorevolution.vsb.gmdl.tools.serviceparser.ServiceDescriptionParser.class.getPackage()); jarGenerator.addArchive(archive); return jarGenerator.generate(); diff --git a/vsb-manager-api/pom.xml b/vsb-manager-api/pom.xml index 1442b88e..639940f6 100644 --- a/vsb-manager-api/pom.xml +++ b/vsb-manager-api/pom.xml @@ -104,7 +104,7 @@ <include>pom-gm-mqtt.xml</include> <include>pom-gm-soap.xml</include> <include>pom-gm-websocket.xml</include> - <include>pom-of-war.xml</include> + <include>pom-gm-soap-war.xml</include> </includes> <excludes> <exclude>src/main/resources/target</exclude> diff --git a/vsb-manager-api/src/main/java/eu/chorevolution/vsb/manager/api/VsbManager.java b/vsb-manager-api/src/main/java/eu/chorevolution/vsb/manager/api/VsbManager.java index 59c9feff..c3c80689 100644 --- a/vsb-manager-api/src/main/java/eu/chorevolution/vsb/manager/api/VsbManager.java +++ b/vsb-manager-api/src/main/java/eu/chorevolution/vsb/manager/api/VsbManager.java @@ -139,6 +139,7 @@ public class VsbManager{ * * @return boolean */ + public boolean deleteGeneratedFiles() { @@ -274,6 +275,7 @@ public class VsbManager{ String gm_websocket_pomxl; String gm_mqtt_pomxl; String gm_rest_pomxl; + String gm_soap_war_pomxml; if (STARTING_FROM_JAR){ @@ -283,6 +285,7 @@ public class VsbManager{ gm_websocket_pomxl = PathResolver.myFilePath(BcManagerRestService.class, "pom-gm-websocket.xml"); gm_rest_pomxl = PathResolver.myFilePath(BcManagerRestService.class, "pom-gm-rest.xml"); gm_mqtt_pomxl = PathResolver.myFilePath(BcManagerRestService.class, "pom-gm-mqtt.xml"); + gm_soap_war_pomxml = PathResolver.myFilePath(BcManagerRestService.class, "pom-gm-soap-war.xml"); } else{ @@ -298,6 +301,8 @@ public class VsbManager{ + File.separator + "resources" + File.separator + "pom-gm-rest.xml"; gm_mqtt_pomxl = new File(".").getAbsolutePath() + File.separator + "src" + File.separator + "main" + File.separator + "resources" + File.separator + "pom-gm-mqtt.xml"; + gm_soap_war_pomxml = new File(".").getAbsolutePath() + File.separator + "src" + File.separator + "main" + + File.separator + "resources" + File.separator + "pom-gm-soap-war.xml"; } @@ -309,15 +314,18 @@ public class VsbManager{ hmapPomXml.put("websocket", gm_websocket_pomxl); hmapPomXml.put("soap", gm_soap_pomxml); hmapPomXml.put("rest", gm_rest_pomxl); + hmapPomXml.put("soapwar", gm_soap_war_pomxml); - Generator generator = new Generator(); + Generator generator = new Generator(busProtocol); VsbOutput vsbOutput = new VsbOutput(); vsbOutput.generatedCodePath = Constants.generatedCodePath; vsbOutput.service_name = Constants.service_name; - if(busProtocol == ProtocolType.SOAP && serviceProtocol == ProtocolType.REST ){ + + if(busProtocol == ProtocolType.SOAP ){ + - warGenerator.addDependencyFiles(hmapPomXml.get("soap")); + warGenerator.addDependencyFiles(hmapPomXml.get("soapwar")); Class[] classesOptions = new Class[]{ BcManagerRestService.class, BcGmSubcomponent.class, BcGmSubcomponent.class, BcWebsocketSubcomponent.class, BcRestSubcomponent.class, @@ -354,7 +362,6 @@ public class VsbManager{ vsbOutput.bc_manager_servlet_port = Constants.bc_manager_servlet_port; vsbOutput.printer_service_port = Constants.printer_service_port; vsbOutput.subcomponent_port = Constants.subcomponent_port; - } jarGenerator.setBusProtocol(this.busProtocol); jarGenerator.setServiceProtocol(this.serviceProtocol); @@ -403,17 +410,17 @@ public class VsbManager{ soapGenerator.generatePOJOAndEndpoint(); soapGenerator.generateWSDL(); - }else { - + } + generateBindingComponentClass(gmServiceRepresentation, busProtocol); + if(busProtocol != ProtocolType.SOAP) { generateBindingComponentMainClass(); } - generateBindingComponentClass(gmServiceRepresentation, busProtocol); - + } - private void copyInterfaceDescription(String interfaceDescription) { + private void copyInterfaceDescription(String interfaceDescription){ try { @@ -435,8 +442,7 @@ public class VsbManager{ } } - private static void generateBindingComponentClass(GmServiceRepresentation gmServiceRepresentation, - ProtocolType busProtocol) { + private static void generateBindingComponentClass(GmServiceRepresentation gmServiceRepresentation,ProtocolType busProtocol){ String configTemplatePath = ""; JSONParser parser = new JSONParser(); @@ -805,7 +811,6 @@ public class VsbManager{ e.printStackTrace(); } - } private static void generateBindingComponentMainClass(){ diff --git a/vsb-manager-api/src/main/resources/pom-gm-coap.xml b/vsb-manager-api/src/main/resources/pom-gm-coap.xml index 5e3ab3e3..9563822b 100644 --- a/vsb-manager-api/src/main/resources/pom-gm-coap.xml +++ b/vsb-manager-api/src/main/resources/pom-gm-coap.xml @@ -74,7 +74,6 @@ <version>1.0.4</version> </dependency> - <!-- Chorevolution --> <dependency> <groupId>eu.chorevolution.vsb</groupId> diff --git a/vsb-manager-api/src/main/resources/pom-gm-dpws.xml b/vsb-manager-api/src/main/resources/pom-gm-dpws.xml index 3f8f7571..f6a343c8 100644 --- a/vsb-manager-api/src/main/resources/pom-gm-dpws.xml +++ b/vsb-manager-api/src/main/resources/pom-gm-dpws.xml @@ -28,7 +28,6 @@ </plugin> </plugins> </build> - <repositories> <!-- REST library: Restlet --> <repository> @@ -66,14 +65,11 @@ <dependencies> - <!-- <dependency> + <!-- <dependency> <groupId>org.restlet.jse</groupId> <artifactId>org.restlet</artifactId> <version>2.3.1</version> </dependency> --> - - - <dependency> <groupId>eu.chorevolution.vsb.org.ws4d.java</groupId> <artifactId>ws4d-java-se-full-dpws-debug-with-security</artifactId> diff --git a/vsb-manager-api/src/main/resources/pom-gm-mqtt.xml b/vsb-manager-api/src/main/resources/pom-gm-mqtt.xml index 3e1a863a..b1c1f33b 100644 --- a/vsb-manager-api/src/main/resources/pom-gm-mqtt.xml +++ b/vsb-manager-api/src/main/resources/pom-gm-mqtt.xml @@ -28,7 +28,6 @@ </plugin> </plugins> </build> - <repositories> <!-- REST library: Restlet --> <repository> @@ -36,23 +35,6 @@ <name>Public online Restlet repository</name> <url>http://maven.restlet.org</url> </repository> - - <!-- VSB library: eu.chorevolution.vsb <repository> <id>ow2-releases</id> - <url>http://repository.ow2.org/nexus/content/repositories/releases/</url> - <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> - </snapshots> </repository> --> - - <!-- VSB library: eu.chorevolution.vsb - <repository> - <id>ow2-nexus-snapshots</id> - <url>http://repository.ow2.org/nexus/content/repositories/snapshots/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository>--> </repositories> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -64,14 +46,7 @@ </properties> <dependencies> - - - <!-- <dependency> - <groupId>org.restlet.jse</groupId> - <artifactId>org.restlet</artifactId> - <version>2.3.1</version> - </dependency> --> - + <!-- Apache Paho --> <dependency> @@ -126,111 +101,6 @@ </dependency> - <!-- <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-client</artifactId> - <version>1.12</version> - </dependency> - - <dependency> - <groupId>org.glassfish.jersey.core</groupId> - <artifactId>jersey-client</artifactId> - <version>2.21</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - <version>2.6.4</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.6.4</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>2.7.3</version> - </dependency> - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-jxc</artifactId> - <version>2.2.11</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-kernel</artifactId> - <version>${axis2.stable.version}</version> - </dependency> - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb</artifactId> - <version>${axis2.version}</version> - </dependency> - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-transport-http</artifactId> - <version>${axis2.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-transport-local</artifactId> - <version>${axis2.version}</version> - </dependency> - - - <dependency> - <groupId>com.fasterxml.jackson.dataformat</groupId> - <artifactId>jackson-dataformat-xml</artifactId> - <version>2.6.2</version> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxws</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-transports-http</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-transports-http-jetty</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>${jax.ws.rs}</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - <version>${spring.version}</version> - </dependency> --> - - </dependencies> </project> diff --git a/vsb-manager-api/src/main/resources/pom-gm-rest.xml b/vsb-manager-api/src/main/resources/pom-gm-rest.xml index 43813521..c37998ea 100644 --- a/vsb-manager-api/src/main/resources/pom-gm-rest.xml +++ b/vsb-manager-api/src/main/resources/pom-gm-rest.xml @@ -85,111 +85,6 @@ <version>1.1.1</version> </dependency> - <!-- <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-client</artifactId> - <version>1.12</version> - </dependency> - - <dependency> - <groupId>org.glassfish.jersey.core</groupId> - <artifactId>jersey-client</artifactId> - <version>2.21</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - <version>2.6.4</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.6.4</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>2.7.3</version> - </dependency> - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-jxc</artifactId> - <version>2.2.11</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-kernel</artifactId> - <version>${axis2.stable.version}</version> - </dependency> - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-adb</artifactId> - <version>${axis2.version}</version> - </dependency> - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-transport-http</artifactId> - <version>${axis2.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.axis2</groupId> - <artifactId>axis2-transport-local</artifactId> - <version>${axis2.version}</version> - </dependency> - - - <dependency> - <groupId>com.fasterxml.jackson.dataformat</groupId> - <artifactId>jackson-dataformat-xml</artifactId> - <version>2.6.2</version> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxws</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-transports-http</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-transports-http-jetty</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>${jax.ws.rs}</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - <version>${spring.version}</version> - </dependency> --> - - </dependencies> </project> diff --git a/vsb-manager-api/src/main/resources/pom-of-war.xml b/vsb-manager-api/src/main/resources/pom-gm-soap-war.xml similarity index 79% rename from vsb-manager-api/src/main/resources/pom-of-war.xml rename to vsb-manager-api/src/main/resources/pom-gm-soap-war.xml index 9dcc76aa..b949810c 100644 --- a/vsb-manager-api/src/main/resources/pom-of-war.xml +++ b/vsb-manager-api/src/main/resources/pom-gm-soap-war.xml @@ -35,22 +35,25 @@ <url>http://maven.restlet.org</url> </repository> - <!-- VSB library: eu.chorevolution.vsb <repository> <id>ow2-releases</id> - <url>http://repository.ow2.org/nexus/content/repositories/releases/</url> - <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> - </snapshots> </repository> --> - - <!-- VSB library: eu.chorevolution.vsb <repository> <id>ow2-nexus-snapshots</id> <url>http://repository.ow2.org/nexus/content/repositories/snapshots/</url> <releases> - <enabled>true</enabled> + <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> - </repository> --> + </repository> + + + <repository> + <id>jWebSocket-Repo</id> + <name>jWebSocket Repository</name> + <url>http://mvn.jwebsocket.org/</url> + </repository> + + </repositories> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -63,8 +66,52 @@ </properties> <dependencies> - - + + + <!-- MQTT library : mqtt-client --> + <dependency> + <groupId>org.fusesource.mqtt-client</groupId> + <artifactId>mqtt-client</artifactId> + <version>1.10</version> + </dependency> + + <!-- Websocket library: websocket --> + <dependency> + <groupId>org.java-websocket</groupId> + <artifactId>Java-WebSocket</artifactId> + <version>1.3.0</version> + </dependency> + + <!-- DPWS library: ws4d --> + <dependency> + <groupId>eu.chorevolution.vsb.org.ws4d.java</groupId> + <artifactId>ws4d-java-se-full-dpws-debug-with-security</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>eu.chorevolution.vsb.org.ws4d.java</groupId> + <artifactId>ws4d-dpws-stack-se</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>eu.chorevolution.vsb.org.ws4d.java</groupId> + <artifactId>ws4d-dpws-stack-core</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + + <!-- CoAP library: californium --> + <dependency> + <groupId>org.eclipse.californium</groupId> + <artifactId>californium-core</artifactId> + <version>1.0.3</version> + </dependency> + <dependency> + <groupId>org.eclipse.californium</groupId> + <artifactId>californium-osgi</artifactId> + <version>1.0.4</version> + </dependency> + + <!-- REST library: Restlet --> <dependency> <groupId>org.restlet.jse</groupId> <artifactId>org.restlet</artifactId> diff --git a/vsb-manager-api/src/test/java/eu/chorevolution/vsb/manager/VsbManagerTest.java b/vsb-manager-api/src/test/java/eu/chorevolution/vsb/manager/VsbManagerTest.java index 771db7ea..ae6663a4 100644 --- a/vsb-manager-api/src/test/java/eu/chorevolution/vsb/manager/VsbManagerTest.java +++ b/vsb-manager-api/src/test/java/eu/chorevolution/vsb/manager/VsbManagerTest.java @@ -1,7 +1,9 @@ package eu.chorevolution.vsb.manager; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import org.apache.commons.lang.ArrayUtils; import org.junit.Test; import eu.chorevolution.vsb.bc.manager.VsbOutput; @@ -50,7 +52,7 @@ public class VsbManagerTest{ // System.out.println("printer_service_port "+vsbOutput.printer_service_port); // System.out.println("subcomponent_port "+vsbOutput.subcomponent_port); // - String interfaceDescriptionPath = "src/test/resources/gidl/gidl.gidl"; + String interfaceDescriptionPath = "src/test/resources/gidl/gidl_1.gidl"; VsbManager vsbm = new VsbManager(); VsbOutput vsbOutput = vsbm.generateWar(interfaceDescriptionPath,ProtocolType.SOAP, "gidl"); @@ -60,6 +62,15 @@ public class VsbManagerTest{ assertTrue(Integer.valueOf(vsbOutput.service_port) >= Constants.service_port_min_range && Integer.valueOf(vsbOutput.service_port) <= Constants.service_port_max_range); assertTrue(vsbOutput.war instanceof byte[]); assertTrue(vsbOutput.wsdl instanceof byte[]); + + + interfaceDescriptionPath = "src/test/resources/gidl/gidl_2.gidl"; + vsbm = new VsbManager(); + vsbOutput = vsbm.generateWar(interfaceDescriptionPath,ProtocolType.REST, "gidl"); + assertTrue(vsbOutput.jar instanceof byte[]); + assertFalse(ArrayUtils.isEmpty(vsbOutput.jar)); + + //assertTrue(vsbm.deleteGeneratedFiles()); } diff --git a/vsb-manager-api/src/test/resources/gidl/gidl.gidl b/vsb-manager-api/src/test/resources/gidl/gidl_1.gidl similarity index 86% rename from vsb-manager-api/src/test/resources/gidl/gidl.gidl rename to vsb-manager-api/src/test/resources/gidl/gidl_1.gidl index bb429fc0..3fe06633 100644 --- a/vsb-manager-api/src/test/resources/gidl/gidl.gidl +++ b/vsb-manager-api/src/test/resources/gidl/gidl_1.gidl @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<gidl:GIDLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gidl="http://eu.chorevolution/modelingnotations/gidl" hostAddress="http://cho-noauth-srv.e-mixer.com/" protocol="REST"> +<gidl:GIDLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gidl="http://eu.chorevolution/modelingnotations/gidl" hostAddress="127.0.0.1" protocol="REST"> <hasInterfaces role="provider"> - <hasOperations name="publicTransportation" type="two_way_sync" qos="reliable"> - <hasScope name="publicTransportation" verb="GET" uri="services/Rest/newsService.svc/latest"/> + <hasOperations name="temperature" type="two_way_sync" qos="reliable"> + <hasScope name="temperature" verb="GET" uri="temperature"/> <inputData name="request" context="query" media="json"> <hasDataType xsi:type="gidl:ComplexType" name="inputDataType" minOccurs="one" maxOccurs="one"> <hasDataType xsi:type="gidl:SimpleType" name="lat" minOccurs="one" maxOccurs="one" type="double"/> @@ -22,4 +22,3 @@ </hasOperations> </hasInterfaces> </gidl:GIDLModel> - diff --git a/vsb-manager-api/src/test/resources/gidl/gidl_2.gidl b/vsb-manager-api/src/test/resources/gidl/gidl_2.gidl new file mode 100644 index 00000000..a2ccde80 --- /dev/null +++ b/vsb-manager-api/src/test/resources/gidl/gidl_2.gidl @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gidl:GIDLModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gidl="http://eu.chorevolution/modelingnotations/gidl" hostAddress="127.0.0.1" protocol="CoAP"> + <hasInterfaces role="provider"> + <hasOperations name="temperature" type="one_way" qos="reliable"> + <hasScope name="temperature" verb="GET" uri="temperature"/> + <inputData name="request" context="query" media="json"> + <hasDataType xsi:type="gidl:ComplexType" name="inputDataType" minOccurs="one" maxOccurs="one"> + <hasDataType xsi:type="gidl:SimpleType" name="lat" minOccurs="one" maxOccurs="one" type="double"/> + <hasDataType xsi:type="gidl:SimpleType" name="lon" minOccurs="one" maxOccurs="one" type="double"/> + </hasDataType> + </inputData> + </hasOperations> + </hasInterfaces> +</gidl:GIDLModel> -- GitLab