diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..fc1175799238cbdacf0807f2b1fc213e6cd28ebf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea +.vscode +temp +target \ No newline at end of file diff --git a/docs/images/schema.png b/docs/images/schema.png new file mode 100644 index 0000000000000000000000000000000000000000..861c90b729d69c3f71aae52036d172de44495fb2 Binary files /dev/null and b/docs/images/schema.png differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca4de951c5703404073620a2bfb6f91efa7f043a --- /dev/null +++ b/pom.xml @@ -0,0 +1,159 @@ +<?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.letterpaw</groupId> + <artifactId>letterpaw-soap-service</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>letterpaw-soap-service</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> + <jaxws.version>2.3.3</jaxws.version> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.13.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.sun.xml.ws</groupId> + <artifactId>jaxws-rt</artifactId> + <version>${jaxws.version}</version> + </dependency> + <dependency> + <groupId>javax.xml.ws</groupId> + <artifactId>jaxws-api</artifactId> + <version>2.3.1</version> + </dependency> + <!-- MySQL JDBC driver --> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>8.0.28</version> + </dependency> + <dependency> + <groupId>com.sun.net.httpserver</groupId> + <artifactId>http</artifactId> + <version>20070405</version> + </dependency> + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20220924</version> + </dependency> + </dependencies> + + <build> + <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> + <plugins> + <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <version>3.1.0</version> + </plugin> + <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>3.0.2</version> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.22.1</version> + </plugin> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <version>3.0.2</version> + </plugin> + <plugin> + <artifactId>maven-install-plugin</artifactId> + <version>2.5.2</version> + </plugin> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.8.2</version> + </plugin> + <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle --> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <version>3.7.1</version> + </plugin> + <plugin> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>3.0.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>3.3.1</version> + <configuration> + <warSourceDirectory>src/main/webapp</warSourceDirectory> + <failOnMissingWebXml>false</failOnMissingWebXml> <!-- Jika Anda tidak memiliki web.xml --> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.tomcat.maven</groupId> + <artifactId>tomcat7-maven-plugin</artifactId> + <version>2.2</version> + <executions> + <execution> + <configuration> + <!-- Specify the WSDL URL here --> +<!-- <wsdlUrls>--> +<!-- <wsdlUrl>http://localhost:8081/userpremiumservice?wsdl</wsdlUrl>--> +<!-- </wsdlUrls>--> +<!-- <packageName>com.soapservice.client</packageName>--> +<!-- <keep>true</keep>--> + <archive> + <manifest> + <mainClass>com.letterpaw.soap.Main</mainClass> + </manifest> + </archive> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>8</source> + <target>8</target> + </configuration> + </plugin> + + </plugins> + + <finalName>soap-service</finalName> + </build> + +</project> diff --git a/src/main/java/com/letterpaw/soap/Main.java b/src/main/java/com/letterpaw/soap/Main.java new file mode 100644 index 0000000000000000000000000000000000000000..d2f39c09c8bdb429baeeeaf318ba9784d15bbc2f --- /dev/null +++ b/src/main/java/com/letterpaw/soap/Main.java @@ -0,0 +1,17 @@ +package com.letterpaw.soap; + +import com.letterpaw.soap.publisher.UserPremiumServicePublisher; + +import javax.xml.ws.Endpoint; + +public class Main { + public static void main(String[] args) { + try { + UserPremiumServicePublisher userPremiumServicePublisher = new UserPremiumServicePublisher(); + userPremiumServicePublisher.publish(); + System.out.println("Server is starting"); + } catch(Exception e) { + System.out.println("Something's wrong!"); + } + } +}