forked from WebJournal/journaldev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding JavaEE and Spring Batch Projects
- Loading branch information
Pankaj Kumar
committed
Jan 3, 2019
1 parent
5019408
commit aa425ad
Showing
96 changed files
with
3,212 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://xmlns.jcp.org/xml/ns/javaee" | ||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" | ||
id="WebApp_ID" version="3.1"> | ||
<display-name>JAX-RS-HelloWorld</display-name> | ||
|
||
<servlet> | ||
<servlet-name>Jersey REST Service</servlet-name> | ||
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | ||
<init-param> | ||
<param-name>com.sun.jersey.config.property.packages</param-name> | ||
<param-value>com.journaldev.jaxrs.service</param-value> | ||
</init-param> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet-mapping> | ||
<servlet-name>Jersey REST Service</servlet-name> | ||
<url-pattern>/*</url-pattern> | ||
</servlet-mapping> | ||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<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>JAX-RS-HelloWorld</groupId> | ||
<artifactId>JAX-RS-HelloWorld</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.sun.jersey</groupId> | ||
<artifactId>jersey-server</artifactId> | ||
<version>1.19</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.jersey</groupId> | ||
<artifactId>jersey-servlet</artifactId> | ||
<version>1.19</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>src</sourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
<warSourceDirectory>WebContent</warSourceDirectory> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.3</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
15 changes: 15 additions & 0 deletions
15
JavaEE/JAX-RS-HelloWorld/src/com/journaldev/jaxrs/service/TestService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.journaldev.jaxrs.service; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
|
||
@Path("/test") | ||
public class TestService { | ||
|
||
@GET | ||
@Path("/hello/{msg}") | ||
public String sayHello(@PathParam(value="msg") String msg){ | ||
return "Hello "+msg; | ||
} | ||
} |
Binary file added
BIN
+628 Bytes
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/ObjectFactory.class
Binary file not shown.
48 changes: 48 additions & 0 deletions
48
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/ObjectFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
package com.journaldev.jaxws.service; | ||
|
||
import javax.xml.bind.annotation.XmlRegistry; | ||
|
||
|
||
/** | ||
* This object contains factory methods for each | ||
* Java content interface and Java element interface | ||
* generated in the com.journaldev.jaxws.service 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: com.journaldev.jaxws.service | ||
* | ||
*/ | ||
public ObjectFactory() { | ||
} | ||
|
||
/** | ||
* Create an instance of {@link Person } | ||
* | ||
*/ | ||
public Person createPerson() { | ||
return new Person(); | ||
} | ||
|
||
/** | ||
* Create an instance of {@link PersonArray } | ||
* | ||
*/ | ||
public PersonArray createPersonArray() { | ||
return new PersonArray(); | ||
} | ||
|
||
} |
Binary file not shown.
98 changes: 98 additions & 0 deletions
98
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/Person.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
|
||
package com.journaldev.jaxws.service; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
|
||
/** | ||
* <p>Java class for person complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType name="person"> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence> | ||
* <element name="age" type="{http://www.w3.org/2001/XMLSchema}int"/> | ||
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/> | ||
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "person", propOrder = { | ||
"age", | ||
"id", | ||
"name" | ||
}) | ||
public class Person { | ||
|
||
protected int age; | ||
protected int id; | ||
protected String name; | ||
|
||
/** | ||
* Gets the value of the age property. | ||
* | ||
*/ | ||
public int getAge() { | ||
return age; | ||
} | ||
|
||
/** | ||
* Sets the value of the age property. | ||
* | ||
*/ | ||
public void setAge(int value) { | ||
this.age = value; | ||
} | ||
|
||
/** | ||
* Gets the value of the id property. | ||
* | ||
*/ | ||
public int getId() { | ||
return id; | ||
} | ||
|
||
/** | ||
* Sets the value of the id property. | ||
* | ||
*/ | ||
public void setId(int value) { | ||
this.id = value; | ||
} | ||
|
||
/** | ||
* Gets the value of the name property. | ||
* | ||
* @return | ||
* possible object is | ||
* {@link String } | ||
* | ||
*/ | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* Sets the value of the name property. | ||
* | ||
* @param value | ||
* allowed object is | ||
* {@link String } | ||
* | ||
*/ | ||
public void setName(String value) { | ||
this.name = value; | ||
} | ||
|
||
} |
Binary file added
BIN
+885 Bytes
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/PersonArray.class
Binary file not shown.
69 changes: 69 additions & 0 deletions
69
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/PersonArray.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
package com.journaldev.jaxws.service; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
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>Java class for personArray complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType name="personArray"> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence> | ||
* <element name="item" type="{http://service.jaxws.journaldev.com/}person" maxOccurs="unbounded" minOccurs="0"/> | ||
* </sequence> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "personArray", propOrder = { | ||
"item" | ||
}) | ||
public class PersonArray { | ||
|
||
@XmlElement(nillable = true) | ||
protected List<Person> item; | ||
|
||
/** | ||
* Gets the value of the item property. | ||
* | ||
* <p> | ||
* This accessor method returns a reference to the live list, | ||
* not a snapshot. Therefore any modification you make to the | ||
* returned list will be present inside the JAXB object. | ||
* This is why there is not a <CODE>set</CODE> method for the item property. | ||
* | ||
* <p> | ||
* For example, to add a new item, do as follows: | ||
* <pre> | ||
* getItem().add(newItem); | ||
* </pre> | ||
* | ||
* | ||
* <p> | ||
* Objects of the following type(s) are allowed in the list | ||
* {@link Person } | ||
* | ||
* | ||
*/ | ||
public List<Person> getItem() { | ||
if (item == null) { | ||
item = new ArrayList<Person>(); | ||
} | ||
return this.item; | ||
} | ||
|
||
} |
Binary file added
BIN
+1.74 KB
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/PersonService.class
Binary file not shown.
76 changes: 76 additions & 0 deletions
76
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/PersonService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
package com.journaldev.jaxws.service; | ||
|
||
import javax.jws.WebMethod; | ||
import javax.jws.WebParam; | ||
import javax.jws.WebResult; | ||
import javax.jws.WebService; | ||
import javax.jws.soap.SOAPBinding; | ||
import javax.xml.bind.annotation.XmlSeeAlso; | ||
import javax.xml.ws.Action; | ||
|
||
|
||
/** | ||
* This class was generated by the JAX-WS RI. | ||
* JAX-WS RI 2.2.4-b01 | ||
* Generated source version: 2.2 | ||
* | ||
*/ | ||
@WebService(name = "PersonService", targetNamespace = "http://service.jaxws.journaldev.com/") | ||
@SOAPBinding(style = SOAPBinding.Style.RPC) | ||
@XmlSeeAlso({ | ||
ObjectFactory.class | ||
}) | ||
public interface PersonService { | ||
|
||
|
||
/** | ||
* | ||
* @param arg0 | ||
* @return | ||
* returns boolean | ||
*/ | ||
@WebMethod | ||
@WebResult(partName = "return") | ||
@Action(input = "http://service.jaxws.journaldev.com/PersonService/addPersonRequest", output = "http://service.jaxws.journaldev.com/PersonService/addPersonResponse") | ||
public boolean addPerson( | ||
@WebParam(name = "arg0", partName = "arg0") | ||
Person arg0); | ||
|
||
/** | ||
* | ||
* @param arg0 | ||
* @return | ||
* returns boolean | ||
*/ | ||
@WebMethod | ||
@WebResult(partName = "return") | ||
@Action(input = "http://service.jaxws.journaldev.com/PersonService/deletePersonRequest", output = "http://service.jaxws.journaldev.com/PersonService/deletePersonResponse") | ||
public boolean deletePerson( | ||
@WebParam(name = "arg0", partName = "arg0") | ||
int arg0); | ||
|
||
/** | ||
* | ||
* @param arg0 | ||
* @return | ||
* returns com.journaldev.jaxws.service.Person | ||
*/ | ||
@WebMethod | ||
@WebResult(partName = "return") | ||
@Action(input = "http://service.jaxws.journaldev.com/PersonService/getPersonRequest", output = "http://service.jaxws.journaldev.com/PersonService/getPersonResponse") | ||
public Person getPerson( | ||
@WebParam(name = "arg0", partName = "arg0") | ||
int arg0); | ||
|
||
/** | ||
* | ||
* @return | ||
* returns com.journaldev.jaxws.service.PersonArray | ||
*/ | ||
@WebMethod | ||
@WebResult(partName = "return") | ||
@Action(input = "http://service.jaxws.journaldev.com/PersonService/getAllPersonsRequest", output = "http://service.jaxws.journaldev.com/PersonService/getAllPersonsResponse") | ||
public PersonArray getAllPersons(); | ||
|
||
} |
Binary file added
BIN
+2.38 KB
JavaEE/JAX-WS-Client/src/com/journaldev/jaxws/service/PersonServiceImplService.class
Binary file not shown.
Oops, something went wrong.