diff --git a/eatsnowsoap/docker-compose.yml b/eatsnowsoap/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..38113685e120855365fc21a8406474daa7f9a87a --- /dev/null +++ b/eatsnowsoap/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' +services: + soap-db: + image: mysql:latest + ports: + - "3307:3306" + volumes: + - ./db:/docker-entrypoint-initdb.d + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: eatsnow-soap-service + MYSQL_USER: user + MYSQL_PASSWORD: password + soap-app: + build: . + image: app:latest + ports: + - "8020:8020" \ No newline at end of file diff --git a/eatsnowsoap/dockerfile b/eatsnowsoap/dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..10fc77d1d146c243815525eb761ab729793e611e --- /dev/null +++ b/eatsnowsoap/dockerfile @@ -0,0 +1,12 @@ +FROM maven:3.8-openjdk-11-slim + +WORKDIR /app + +COPY src ./src +COPY pom.xml . +COPY target ./target +COPY .env /app/.env + +RUN mvn clean install -X + +CMD ["mvn", "exec:java"] \ No newline at end of file diff --git a/eatsnowsoap/pom.xml b/eatsnowsoap/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..523b5f2a8442116b2951426b7ef36327817c7bfe --- /dev/null +++ b/eatsnowsoap/pom.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.eatsnowsoap</groupId> + <artifactId>eatsnowsoap</artifactId> + <version>1.0-SNAPSHOT</version> + + <properties> + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>4.5.13</version> + </dependency> + + <dependency> + <groupId>io.github.cdimascio</groupId> + <artifactId>dotenv-java</artifactId> + <version>2.2.0</version> + </dependency> + + <dependency> + <groupId>com.sun.xml.ws</groupId> + <artifactId>jaxws-rt</artifactId> + <version>2.3.4</version> + </dependency> + + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>8.0.30</version> + </dependency> + + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + <version>4.4.13</version> + </dependency> + + <dependency> + <groupId>io.github.cdimascio</groupId> + <artifactId>dotenv-java</artifactId> + <version>2.2.0</version> + </dependency> + + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <version>4.0.1</version> + <scope>provided</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <goals> + <goal>java</goal> + </goals> + </execution> + </executions> + <configuration> + <mainClass>com.eatsnowsoap.services.Main</mainClass> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/eatsnowsoap/src/main/java/com/eatsnowsoap/services/Main.java b/eatsnowsoap/src/main/java/com/eatsnowsoap/services/Main.java new file mode 100644 index 0000000000000000000000000000000000000000..4a41a3c20fdd9cb2f1c0d72279326ea58cd69c2c --- /dev/null +++ b/eatsnowsoap/src/main/java/com/eatsnowsoap/services/Main.java @@ -0,0 +1,13 @@ +package com.eatsnowsoap.services; +import javax.xml.ws.Endpoint; + +public class Main { + public static void main(String[] args) { + try { + Endpoint.publish("http://0.0.0.0:8020/ws/review", new EatsnowService()); + System.out.println("Service is running at http://0.0.0.0:8020/ws/review"); + } catch (Exception e) { + System.out.println("Something Wrong"); + } + } +} \ No newline at end of file