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
package org.wso2; | |
public class MyTest1 { | |
public int getMyValues(int x){ | |
return x*3; | |
} | |
} |
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
package org.wso2; | |
import java.rmi.RemoteException; | |
import org.apache.axis2.AxisFault; | |
import org.wso2.MyTest1Stub.GetMyValues; | |
public class MyTest1 { | |
public static void main(String[] args) throws RemoteException { |
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
package org.wso2; | |
import java.rmi.RemoteException; | |
import org.apache.axis2.AxisFault; | |
import org.wso2.MyTest1Stub.GetMyValues; | |
public class MyTest1 { | |
public static void main(String[] args) throws RemoteException { |
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
package org.wso2; | |
import java.rmi.RemoteException; | |
import org.apache.axis2.AxisFault; | |
import org.apache.axis2.Constants; | |
import org.apache.axis2.context.ConfigurationContext; | |
import org.apache.axis2.context.ConfigurationContextFactory; | |
import org.apache.axis2.transport.http.HTTPConstants; | |
import org.apache.axis2.transport.http.HttpTransportProperties; |
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
package org.wso2.advanceREST; | |
import javax.xml.bind.annotation.XmlRootElement; | |
@XmlRootElement | |
public class User { | |
private String Name; | |
private int age; | |
public User(){ |
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
package org.wso2.advanceREST; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.ws.rs.Consumes; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.POST; | |
import javax.ws.rs.PUT; | |
import javax.ws.rs.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
@POST | |
@Path("{userName}") | |
@Produces(MediaType.APPLICATION_JSON) | |
@Consumes(MediaType.APPLICATION_JSON) | |
public User addNewUser(@PathParam("userName") String anUserName, User anUser){ | |
System.out.println(anUser.getName()); | |
System.out.println(anUserName); | |
return anUser; | |
} |
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
<dependency> | |
<groupId>org.glassfish.jersey.media</groupId> | |
<artifactId>jersey-media-moxy</artifactId> | |
</dependency> |
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
<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>org.wso2</groupId> | |
<artifactId>org.wso2.carbon.test1</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>bundle</packaging> | |
<name>WSO2 Carbon - Test1</name> |
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
<%@ page language="java" contentType="text/html; charset=UTF-8" | |
pageEncoding="UTF-8"%> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Insert title here</title> | |
</head> | |
<body> | |
<h1>Hello world Lahiru</h1> |
OlderNewer