Friday 31 August 2007

* Axis2( version 1.2) + Eclipse + OSGI Simple example - Part 2

* Axis2( version 1.2) + Eclipse + OSGI Simple example - Part 2

Part 2 request a precondition of Part 1.
This part does not include Axis2 option. It discribes how osgi is working under web application.

Axis2( version 1.2) + Eclipse + OSGI Simple example - Part 2

Thursday 30 August 2007

* Axis2( version 1.2) + Eclipse + OSGI Simple example - Part 1

First step to understand how Axis2 and OSGI is working

This is simple example only about osgi programming.
You can understand servlet and access way in osgi programming.

Please download or open the below

Axis2( version 1.2) + Eclipse + OSGI Simple example - Part 1

Sunday 26 August 2007

Axis2 + Tomcat tutorial link

http://wso2.org/library/tutorials --> This is working under Axis2 (version 1.2 and plugin 1.2)
http://wso2.org/library/1719 - Part 1
http://wso2.org/library/1986 - part 2

If you use Axis2 (version 1.3 and plugin 1.3 , please review below message)
(From above example (Developing web services using apache axis2 eclipse plugins - Part 1))

* Step2 - number 8
> To add jar files (right click from project > prperties > Add JARs > select TemperatureWebService > lib > and all jar file include "activation.jar" file

* Step2 - number 9 (This is under Axis2 plugin 1._3 and Eclipse 3.3 AllinOne version)
Please change the source
from "TemperatureConverterTemperatureConverterSOAPllPortStub"
to "TemperatureConverterStub"

==> Please below TemperatureConverterServiceClient.java


http://www.eclipse.org/webtools/community/tutorials/TopDownAxis2WebService/td_tutorial.html

http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html



============ TemperatureConverterServiceClient.java ===================
package ws.example;

import java.rmi.RemoteException;
import org.apache.axis2.AxisFault;

public class TemperatureConverterServiceClient {

public static void main(String[] args){
TemperatureConverterStub stub;

try {
double c_value = 32;
stub = new TemperatureConverterStub("http://localhost:8080/axis2/services/TemperatureConverter");
TemperatureConverterStub.C2FConvertion c2f = new TemperatureConverterStub.C2FConvertion();

c2f.setCValue(c_value);

TemperatureConverterStub.C2FConvertionResponse res = stub.c2FConvertion(c2f);
System.out.println("c value : "+c_value+"\tResult : "+res.get_return());

TemperatureConverterStub.F2CValue f2c = new TemperatureConverterStub.F2CValue();
f2c.setFValue(res.get_return());

TemperatureConverterStub.F2CValueResponse resl = stub.f2CValue(f2c);
System.out.println("F value : "+res.get_return()+"\tResult : "+resl.get_return());
} catch (AxisFault e){
e.printStackTrace();
} catch (RemoteException e){
e.printStackTrace();
}
}
}

Thursday 23 August 2007

Axis1 simple example

Apache Axis is an implementation of the SOAP ("Simple Object Access Protocol")
submission to W3C.

SOAP (Simple Object Access Protocol)
WSDL (Web Service Description Langauge)
WSDD (Web Service Deployment Descriptor)

1. Apache Tomcat 4.1 Over , Full Version
Check http://localhost:8080
If you need any library , please copy it to c:\tomcat\common\lib\
* set up enviroment value
set CATALINA_HOME=c:\tomcat

2. JDK : over JDK 1.4

* Set up classpath
set CLASSPATH=.;c:\jdk15\lib\tools.jar;c:\tomcat\common\lib\servlet-api.jar;
Add libraries (ex JDBC ...)

set JAVA_HOME=c:\jdk15
set PATH=c:\jdk15\bin;

3. ANT (option) : ant

http://ant.apache.org (down) ant 1.6.2
* set up classpath
set ANT_HOME=c:\ant
set PATH=c:\ant\bin;
copy C:\tomcat\server\lib\catalina-ant.jar files into c:\ant\lib\
if you need any library such as junit or xml libraries, please copy it into c:\ant\lib\

4. AXIS (Version 1.1) : http://ws.apache.org/axis/ , http://ws.apache.org/axis/releases.html

set AXIS_HOME=c:\axis
set AXIS_LIB=%AXIS_HOME%\lib
set AXISCLASSPATH=%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery.jar;
%AXIS_LIB%\commons-logging.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;
%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar;
%AXIS_LIB%\wsdl4j.jar
set CLASSPATH=%CLASSPATH%;%AXISCLASSPATH%
etc :
you can download xml-apis.jar and xercesImpl.jar from http://xml.apache.org/

5. connect between axis and tomcat
copy axis directory from c:\axis\webapps\axis\ to c:\tomcat\webapps\axis

6. Test

Start Tomcat
http://localhost:8080/axis
* Test libraries
http://localhost:8080/axis/happyaxis.jsp
From this page, you can see missing jar files. Please download from web and copy it into
c:\tomcat\webapps\axis\lib\

Check http://localhost:8080/axis/happyaxis.jsp page again

7. SOAP test

http://localhost:8080/axis/services/Version?method=getVersion


- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-
Apache Axis version: 1.1 Built on Jun 13, 2003 (09:19:43 EDT)




8. AdminClient test

Move C:\axis\samples\stock
Open dos command and type below line
java org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd

comfirm deploy, if you have any error , it is from classpath problem. so please check classpath again.

check deploy is ok or not
http://localhost:8080/axis/servlet/AxisServlet
you will see below page
urn:xmltoday-delayed-quotes (wsdl)
test
getQuote

9. Client test
Open dos command
Move C:\axis\
type below line
java samples.stock.GetQuote -lhttp://localhost:8080/axis/servlet/AxisServlet -uuser1 -wpass1 XXX
or
java -cp %AXISCLASSPATH% samples.stock.GetQuote -lhttp://localhost:8080/axis/servlet/AxisServlet -uuser1 -wpass1 XXX
or
Go to C:\axis\samples\stock
Open GetQuote.java and delete "package samples.stock " line
javac GetQuote.java

goto C:\axis\
java GetQuote -lhttp://localhost:8080/axis/servlet/AxisServlet -uuser1 -wpass1 XXX

You will see XXX: 5525

10. order for programm

a. implement "Interface" and Class for Server side
b. Create WSDL from implemented class
c. create deploy.wsdd file from WSDL file
d. deploy webservice from deploy.wsdd file and update server-config.wsdd
e. create client-side class

11. program flow





12. example

java Interface, Implement
go to c:\test\
create 2 files

//begin - HelloIF.java
package webservice.hello;
public interface HelloIF extends java.rmi.Remote {
public String hello(java.lang.String name) throws java.rmi.RemoteException;
}
//end - HelloIF.java

//begin - HelloImpl.java
package webservice.hello;
public class HelloImpl implements HelloIF {
public HelloImpl() {
}
public String hello(String name) {
System.out.println(name);
return "hi " + name;
}
}
//end - HelloImpl.java


compile

javac -d . HelloImpl.java

If there is error.
c:\test>javac -d . HelloIF.java
c:\test>javac -d . HelloImpl.java

HelloImpl.class and HelloIF.class under c:\test\webservice/hello
(If you can not compile , please use eclipse. because we need only 2 class files with folder)

copy (webservice)folder into C:\Tomcat\webapps\axis\WEB-INF\classes

* Create WSDL file

c:\test>java org.apache.axis.wsdl.Java2WSDL -o c:\test\webservice\hello\Hello.wsdl
-l http://localhost:8080/axis/services/Hello -n http://hello.webservice -pwebservice.hello
http://hello.webservice webservice.hello.HelloIF

Java2WSDL parameter (http://ws.apache.org/axis/java/reference.html)

-o file path and wsdl locationi to create
-l URL for connecting from URL Client
-n Namespace : WSDL target NameSpace
-p package Name space and mapping with namespace Target inerface name


[check Hello.wsdl file from c:\test\webservice\hello]

.......


* Create deploy.wsdd file and create Client-side java class

c:\test>java org.apache.axis.wsdl.WSDL2Java -o c:\test\webservice\hello\
-d Application -s c:\test\webservice\hello\Hello.wsdl

webservice/hello directory is created under c:\test\webservice\hello
deploy.wsdd - the file to deploy in web server
HelloIF.java
HelloIFService.java
HelloIFServiceLocator.java
HelloSoapBindingImpl.java
HelloSoapBindingStub.java
undeploy.wsdd - the file to undeploy in web server

Parameter
-o directory path for wsdd file and class files
-d install area of scope - Application, Request , Session
-s create wsdd file
Target wsdl file path


[deploy.wsdd - update]

wsdd file is created from wsdl file so it does not set up what is real implement class.
So you should update that part
from webservice.hello.HelloSoapBindingImpl to webservice.hello.HelloImpl

deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
...
......
...
parameter name="className" value="webservice.hello.HelloImpl"/>
...
......
...
parameter name="allowedMethods" value="hello"/>
parameter name="scope" value="Application"/>
/service>
/deployment>


*deploy service
Go to C:\test\webservice\hello\webservice\hello
java org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd

[checking deply]
http://localhost:8080/axis/servlet/AxisServlet
'Hello' Serviec (display)


* undeploy service

java org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService undeploy.wsdd

[Checking undeploy service]
http://localhost:8080/axis/servlet/AxisServlet
'Hello' service (disappear)

*deploy service
Go to C:\test\webservice\hello\webservice\hello
java org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd

[checking deply]
http://localhost:8080/axis/servlet/AxisServlet
'Hello' Serviec (display)

* confirm WSDL from web
http://localhost:8080/axis/services/Hello?wsdl

14. implement client

create client side to access

crate below file and copy to c:\tomcat\webapps\axis\


[HelloClient.jsp]

%@ page contentType="text/html; charset=utf-8" language="java"
import="java.net.MalformedURLException,
java.net.URL,
java.rmi.RemoteException,
javax.xml.namespace.QName,
javax.xml.rpc.ServiceException,
org.apache.axis.client.Call,
org.apache.axis.client.Service" %>
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
title>test web service : Hello World!/title>
/head>
body>
%
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL("http://localhost:8080/axis/services/Hello?wsdl"));
call.setOperationName(new QName("http://soapinterop.org/", "hello"));
String returnValue = (String)call.invoke(new Object[]{"! your name"});
out.println(returnValue);
%>
/body>
/html>





http://localhost:8080/axis/HelloClient.jsp

hi ! your name - (if you can see this message, you are success until here.)


14. second example

There are faster way
after you crate java file and change jws files(change file extenstion from java to jws)

please refer to c:\tomcat\webapps\axis\WEB-INF\web.xml

Please create below file under c:\tomcat\webapps\axis\
[ HelloWorldService.jws]

public class HelloWorldService
{
public String HelloWorld(String data)
{
return "Hello World! You sent the string '" + data + "'.";
}
}

* Access to below address
http://localhost:8080/axis/HelloWorldService.jws
you will see
========================
There is a Web Service here
Click to see the WSDL
=======================
It address there are html page install,
try call HelloWorld method

http://localhost:8080/axis/HelloWorldService.jws?method=HelloWorld&data=Hi+my+name+is+rrr

you received the XML as a result for calling method


* now implement client with java

create below java file in anywhere
[ HelloWorldClient.java]

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class HelloWorldClient
{
public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException
{
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL("http://debianbox:8080/axis/HelloWorldService.jws"));
call.setOperationName(new QName("http://soapinterop.org/", "HelloWorld"));
String returnValue = (String)call.invoke(new Object[]{"My name is rrr."});
System.out.println(returnValue);
}
}

compile and run
You will see
Hello World ! you send the string My name is rrr.
from dos command

Tuesday 21 August 2007

Axis2 + Tomcat 6.0

1. Install JDK - jdk 1.5.0_12

2. Install Apache Tomcat : apache-tomcat-6.0.10

3. Install Eclipse : eclipse wtp all-in-one 1.5.3

4. Install tomcatPluginV32

for eclipse plugin : tomcatPluginV32

5. Install Axis2

down - Axis2 1.1.1 - WAR file
http://ftp.kaist.ac.kr/pub/Apache/ws/axis2/1_2/axis2.war
unzip in C:\Apache Software Foundation\Tomcat 6.0\webapps\axis2

6. modify server.xml - but does not need (you can skip this)

Add <Context path="/axis2" ~~~



7. Try to confirm running of Tomcat

access : http://localhost:8080/axis2/

There are 3 links : Services, Validate, Administration

8. Click Services

There are only Version service is running

10. Click Validate link

notify what kind of jar files is running

11. Click Administration

Login information : you can find ID/Password from axis2\WEB-INF\conf\axis2.xml

12. check it and look around

Sunday 19 August 2007

My Javascript Model total data

All javascript file for my creating source

downlaod

Simple OSGI programming example

**** implemented functions

- View OSGI Bundles list
- View selected OSGI Details
- Stop selected OSGI Bundle
- Start selected OSGI bundle

downlaod(for eclipse)

simple dom example (for ...)

******* example xml type *****

<?xml version="1.0" encoding="UTF-8" ?>
<bundles>
<bundle>
<id>0</id>
<bundleName>OSGi System Bundle</bundleName>
<symbolicName>org.eclipse.osgi</symbolicName>
<version>3.3.0.v20070530</version>
<status>actived</status>
</bundle>
<bundle>
<id>50</id>
<bundleName>HTTP Service</bundleName>
<symbolicName>org.eclipse.equinox.http</symbolicName>
<version>1.0.100.v20061218</version>
<status>actived</status>
</bundle>
</bundles>

*********** Javascript Dom part ********
<script type="text/javascript">
function clickButton() {
sendRequest(load_xmlFile, 'action=GetBundlesInfo&sig=1', 'GET', 'MyTest3', true, true);
}

function load_xmlFile(oj) {
var xmlDoc = oj.responseXML;
var xmlText = oj.responseText;
//alert(xmlText);
var node_bundle = xmlDoc.getElementsByTagName("bundle");
var node_bundleName = null;
var bundleName = null;
for (var i = 0; i < node_bundle.length ; i++) {
node_bundleName = node_bundle[i].getElementsByTagName("bundleName");
bundleName = node_bundleName[0].firstChild.nodeValue;
alert(bundleName);
}
//var nodes = xmlDoc.getElementsByTagName("testdata");
//alert(nodes[0].firstChild.nodeValue);
}
</script>


******* inner HTML id ******
<div id="workformListDivIdSub'+workformUser_Id+'" style="display:none">

........
document.getElementById("workformListDivId").style.display = "block";
document.getElementById("workformListDivId").innerHTML = htmlTag;

Ajax example for communicating with service side

Requested file :

* test.html - main html test page
* echo.php - php file as a source for display
* jslb_ajax.js - ajax component javascript file

******* jslb_ajax.js ***********
Download jslb_ajax.js

******* echo.php *****
<?php

//get Post request
$data = $_POST['data'];
$data = "receive ".$data." value now.";

// HTML entity (change < to ....)
$data = htmlspecialchars($data, 0, "UTF-8");

// URI encoding
$data = rawurlencode($data);

// setup UTF-8 for output
mb_http_output ('UTF-8');

// output
echo($data);
?>


**** test.html ****
<!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">
<script language="Javascript" src="jslb_ajax.js" charset="utf-8"></script>
<script type="text/javascript">
function clickButton() {
sendRequest(load_xmlFile, '&data=abcd', 'POST', './echo.php', true, true);
}

function load_xmlFile(oj) {
var xmlDoc = oj.responseXML;
var nodes = xmlDoc.getElementsByTagName("testdata");
alert(nodes[0].firstChild.nodeValue);
}
</script>
<title>Test page</title>
</head>
<body>
<br>
<form>
<input type="button" value="send abcd to server side" onclick="clickButton()">
</form>
</body>
</html>

AJax example for reading xml file

Requested file :

* test.html - main html test page
* test.xml - xml file as a source for reading
* jslb_ajax.js - ajax component javascript file

******** test.xml *******
<?xml version="1.0" encoding="UTF-8"?>
<testdata> this is the text source part </testdata>

******* jslb_ajax.js ***********
download ajax component

***** test.html ******
<!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">
<script language="Javascript" src="jslb_ajax.js" charset="utf-8"></script>
<script type="text/javascript">
function clickButton() {
sendRequest(load_xmlFile, '', 'GET', 'test.xml', true, true);
}

function load_xmlFile(oj) {
var xmlDoc = oj.responseXML;
var nodes = xmlDoc.getElementsByTagName("testdata");
alert(nodes[0].firstChild.nodeValue);
}
</script>
<title>Test page</title>
</head>
<body>
<br>
<form>
<input type="button" value="read test.xml and display it" onclick="clickButton()">
</form>
</body>
</html>

Sunday 12 August 2007

Simple URL Object example

import java.net.*;

class testURL {
public static void main(String args[]) throws MalformedURLException {
URL testURL1 = new URL("http://help.blogger.com/bin/static.py?page=start.cs");
// create cs URL object
System.out.println("Protocal : " + testURL1.getProtocol());
System.out.println("Port: " + testURL1.getPort());
System.out.println("Host: " + testURL1.getHost());
System.out.println("File(include full location): " + testURL1.getFile());
System.out.println("full URL: " + testURL1.toExternalForm());
}
}

Tuesday 7 August 2007

Memory Hipe

Create below bat file

@echo OFF

set JAVA_OPTIONS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n

"%JAVA_HOME%"\bin\java %JAVA_OPTIONS% -Xmx256m -jar org.eclipse.osgi_3.2.2.R32x_v20070118.jar -console

********** Or create enviroment value **********
JAVA_OPTION / -Xmx256m


===== There is another option for it ======================

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=15&t=000785

You can increase heap size for tomcat by setting an environment variable for that
1. right click on My Computer icon
2. click properties option
3. click advanced tab
4. click Environment Variables button
5. click New button under System Variables
6. type JAVA_OPTS in the Variable Name box
7. type -Xms512m -Xmx128m in the variable value box
8. click Ok and then Ok and then Ok
enjoy …

++++++++++++ incluses heap size of Tomcat +++++++++++++++++

http://www.chemaxon.com/jchem/doc/admin/tomcat.html

Summary
1. Right button click from "my computer" in window explore
2. Click property
3. click advance tab
4. click Enviroment variable
5. create classpath variable
6. variable name > "CATALINA_OPTS"
variable value > "-server -Xmx128m"



3.1 Recommended JVM options
There are two important Java options which should be set for Tomcat.
Maximum heap size: this is the maximum amount of heap memory the Java Virtual Machine (JVM)
is allowed to allocate.
In the case of most JVMs, the default setting of the maximum heap size is 64MB.
You can increase the maximum heap size of applications by setting the -Xmx JVM parameter.
For example -Xmx1024m allows maximum 1GB (1024MB) heap to be allocated for the JVM.

Note: it is recommended to specify a considerably lower value than the amount
of physical RAM in your system,
so the operating system and other applications will also have enough space.
Otherwise the swap memory of the operating system will be used,
which can result in high disk activity, and reduced system performance.

Server mode: server mode instructs the JVM to perform more extensive run-time optimization.
Right after startup it means a slightly slower execution,
but after the JVM had enough time to optimize the code,
the execution will be considerably faster.

3.2 Setting JVM options for Tomcat

Windows running Tomcat 5 and later : Go to the "Apache Tomcat 5.0" folder in the Start Menu.
Start the "Configure Tomcat application".
Note: the configuration can only be started when Tomcat is not running.
Select the "Java VM" tab in the configuration dialog.
You will see some pre-defined lines in the "Java Options" test box.
Append your Java options at the bottom of the option list. For example,
to set server mode and allow 512MB of heap memory, append the following:
-server
-Xmx400m

Windows running Tomcat 4.1 or earlier :
place the Java options into the CATALINA_OPTS environment variable.
To do this, run Control Panel / System, select Environment Variables and
create the CATALINA_OPTS variable,
and set the desired option, for example "-server -Xmx400m".
Linux : place the Java options into the CATALINA_OPTS environment variable.
For example: "-server -Xmx400m".

sample ant file

<?xml version="1.0" encoding="UTF-8"?>
<project name="myTest" default="all">
<property name="title" value="myTest"/>
<property name="debug" value="true"/>
<property name="jar.name" value="myTest.jar"/>
<property name="libs.location" value="lib"/>
<path id="project.classpath">
<pathelement location="."/>
<pathelement location="${libs.location}/framework.jar"/>
<pathelement location="${libs.location}/servlet.jar"/>
<pathelement location="${libs.location}/http_all-2.0.0.jar"/>
</path>
<target name="all" depends="init,compile,jar"/>
<target name="init">
<mkdir dir="./classes"/>
</target>
<target name="compile">
<echo>${libs.location}</echo>
<javac destdir= "./classes" debug = "on">
<src path= "./src"/>
<classpath refid = "project.classpath"/>
</javac>
</target>
<target name="jar">
<jar basedir = "./classes"
jarfile = "${jar.name}"
compress = "true"
includes = "**/*"
manifest = "./META-INF/MANIFEST.MF"
/>
</target>
<target name="clean">
<delete dir = "./classes"/>
</target>
</project>



******************************************************************************

<?xml version="1.0"?>
<project name="MyPrinterWorkspace" default="all">

<property name="services" value="../MyPrinterWorkspace"/>
<property name="libs" value="./lib"/>

<path id="project.classpath">
<pathelement location="."/>
<pathelement location="${libs}/framework.jar"/>
<pathelement location="${libs}/servlet.jar"/>
<pathelement location="${libs}/http_all-2.0.0.jar"/>
<pathelement location="${libs}/himalaya-bundle.jar"/>
<pathelement location="./SESPControls.jar"/>
<pathelement location="./com.samsung.dpd.everest.core_0.2.0.u2a.jar"/>
<pathelement location="./com.samsung.dpd.everest.portability_0.2.0.u1aRC2.jar"/>
</path>

<target name="all" depends="init,compile,jar"/>

<target name="init">
<mkdir dir="./classes"/>
</target>

<target name="compile">
<javac destdir= "./classes" debug = "on">
<src path= "./src"/>
<classpath refid = "project.classpath"/>
</javac>
</target>

<target name="jar">
<jar basedir = "./classes"
jarfile = "./myprinterworkspace.jar"
compress = "true"
includes = "**/*"
manifest = "./META-INF/MANIFEST.MF"
/>
</target>

<target name="clean">
<delete dir = "./classes"/>
</target>

</project>

Monday 6 August 2007

dependence package information

- MyPrinterWorkspace (copy folder from cc - label : SESP_Rel_S2.1_HQ)

- Create Plug-in

- Import copied MyPrinterWorkspace folder

- needed jar file
* should be located in package folder and link by Window > Preference > Plug-In Development > Target Platform >
Add (button) > File System > link in jar file folder

com.samsung.dpd.everest.core_0.2.0.u2a.jar
com.samsung.dpd.everest.portability_0.2.0.u1aRC2.jar
com.samsung.dpd.himalaya_0.2.0.u2a.jar
org.eclipse.equinox.http_1.0.100.v20061218.jar
org.eclipse.equinox.log_1.0.100.v20060717.jar
org.eclipse.equinox.servlet.api_1.0.0.v20060717.jar
sespcontrols.jar
com.samsung.dpd.winslow.common_0.1.7.a.jar
com.samsung.dpd.winslow.doctreestream_0.1.5.a.jar
com.samsung.dpd.winslow.jobmanagement_0.1.5.a.jar
com.samsung.dpd.winslow.portabilitysim_0.0.0.a.jar
com.samsung.dpd.winslow.scan_0.1.5.a.jar
com.samsung.dpd.winslow.store_0.1.5.a.jar
com.samsung.dpd.winslow.system_0.1.5.a.jar
com.samsung.dpd.winslow.tiffcomposer_0.1.5.a.jar

- go to Window > Preference > Plug-In Development > Target Platform
only check
com.samsung.dpd.everest.core
com.samsung.dpd.everest.portability
com.samsung.dpd.himalaya
com.samsung.dpd.winslow.common
com.samsung.dpd.winslow.doctreestream
com.samsung.dpd.winslow.jobmanagement
com.samsung.dpd.winslow.portabilitysim
com.samsung.dpd.winslow.scan
com.samsung.dpd.winslow.store
com.samsung.dpd.winslow.system
com.samsung.dpd.winslow.tiffcomposer
javax.servlet
org.eclipse.equinox.http
org.eclipse.equinox.http.servlet
org.eclipse.equinox.log
org.eclipse.osgi
org.eclipse.osgi.services
org.eclipse.osgi.util
SESPControls


- From MANIFEST.MF
- Dependencies > Imported Packages > Add
com.samsung.dpd.Controls,
com.samsung.dpd.everest.core,
com.samsung.dpd.everest.core.basics,
com.samsung.dpd.everest.core.collections,
com.samsung.dpd.everest.core.device,
com.samsung.dpd.everest.core.device.printer,
com.samsung.dpd.everest.core.device.scanner,
com.samsung.dpd.everest.core.device.store,
com.samsung.dpd.everest.core.events,
com.samsung.dpd.everest.core.imagebasics,
com.samsung.dpd.everest.core.jobmanagement,
com.samsung.dpd.everest.core.lifecycle,
com.samsung.dpd.everest.core.mfpbasics,
com.samsung.dpd.everest.core.support,
com.samsung.dpd.everest.core.systembasics,
com.samsung.dpd.everest.core.work,
com.samsung.dpd.everest.core.work.common,
com.samsung.dpd.everest.core.work.printing,
com.samsung.dpd.everest.core.work.retrieving,
com.samsung.dpd.everest.core.work.scanning,
com.samsung.dpd.everest.core.work.storing,
com.samsung.dpd.winslow.common,
javax.servlet;version="2.4.0",
javax.servlet.http;version="2.4.0",
org.osgi.framework;version="1.4.0",
org.osgi.service.http;version="1.2.0"


- Run AS > Open Run Diagram
check all Target Platform

com.samsung.dpd.everest.core
com.samsung.dpd.everest.portability
com.samsung.dpd.himalaya
com.samsung.dpd.winslow.common
com.samsung.dpd.winslow.doctreestream
com.samsung.dpd.winslow.jobmanagement
com.samsung.dpd.winslow.portabilitysim
com.samsung.dpd.winslow.scan
com.samsung.dpd.winslow.store
com.samsung.dpd.winslow.system
com.samsung.dpd.winslow.tiffcomposer
javax.servlet
org.eclipse.equinox.http
org.eclipse.equinox.http.servlet
org.eclipse.equinox.log
org.eclipse.osgi
org.eclipse.osgi.services
org.eclipse.osgi.util
SESPControls

- Click Run

- You will see this console
osgi> ss

Framework is launched.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.0.v20070530
2 ACTIVE org.eclipse.equinox.http_1.0.100.v20061218
3 ACTIVE org.eclipse.equinox.log_1.0.100.v20060717
14 ACTIVE MyPrinterWorkspace_1.0.0
24 ACTIVE org.eclipse.osgi.services_3.1.200.v20070605
28 ACTIVE org.eclipse.equinox.http.servlet_1.0.0.v20070606
29 ACTIVE org.eclipse.osgi.util_3.1.200.v20070605
31 ACTIVE javax.servlet_2.4.0.v200706111738
32 ACTIVE SESPControls_1.0.0
33 ACTIVE com.samsung.dpd.winslow.portabilitysim_0.0.0.a
34 ACTIVE com.samsung.dpd.winslow.jobmanagement_0.1.5.a
35 ACTIVE com.samsung.dpd.everest.portability_0.2.0.u1aRC2
36 ACTIVE com.samsung.dpd.winslow.system_0.1.5.a
37 ACTIVE com.samsung.dpd.everest.core_0.2.0.u2a
38 ACTIVE com.samsung.dpd.winslow.tiffcomposer_0.1.5.a
39 ACTIVE com.samsung.dpd.himalaya_0.2.0.u2a
40 ACTIVE com.samsung.dpd.winslow.doctreestream_0.1.5.a
41 ACTIVE com.samsung.dpd.winslow.store_0.1.5.a
42 ACTIVE com.samsung.dpd.winslow.scan_0.1.5.a
43 ACTIVE com.samsung.dpd.winslow.common_0.1.7.a


* Kill IIS server
http://localhost/MyPrinterWorkspace
==================================================================================================

- YahooDemo

- Copy all file of YahooDemo

- Create Plug-in

- Import YahooDemo

- Change Activator name : com.samsung.dpd.sesp.samples.yahoodemo.Activator

- - needed jar file
* should be located in package folder and link by Window > Preference > Plug-In Development > Target Platform >
Add (button) > File System > link in jar file folder

org.eclipse.equinox.http_1.0.100.v20061218.jar
org.eclipse.equinox.log_1.0.100.v20060717.jar
org.eclipse.equinox.servlet.api_1.0.0.v20060717.jar


- go to Window > Preference > Plug-In Development > Target Platform
only check

javax.servlet
org.eclipse.equinox.http
org.eclipse.equinox.http.servlet
org.eclipse.equinox.log
org.eclipse.osgi
org.eclipse.osgi.services
org.eclipse.osgi.util

- From MANIFEST.MF
- Dependencies > Imported Packages > Add
javax.servlet;version="2.4.0",
javax.servlet.http;version="2.4.0",
org.osgi.framework;version="1.3.0",
org.osgi.service.http;version="1.2.0"

- Run AS > Open Run Diagram
check all Target Platform

javax.servlet;version="2.4.0",
javax.servlet.http;version="2.4.0",
org.osgi.framework;version="1.3.0",
org.osgi.service.http;version="1.2.0"

- You will see this console
osgi> ss

Framework is launched.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.0.v20070530
2 ACTIVE org.eclipse.equinox.http_1.0.100.v20061218
3 ACTIVE org.eclipse.equinox.log_1.0.100.v20060717
24 ACTIVE org.eclipse.osgi.services_3.1.200.v20070605
28 ACTIVE org.eclipse.equinox.http.servlet_1.0.0.v20070606
29 ACTIVE org.eclipse.osgi.util_3.1.200.v20070605
31 ACTIVE javax.servlet_2.4.0.v200706111738
32 ACTIVE YahooDemo

* Kill IIS server
http://localhost/main.html

eclipse start option

change the short cut option

From :

C:\eclipse\eclipse.exe

******** For assign lots of memory ********
D:\eclipse-rcp-europa-win32\eclipse\eclipse.exe -vmargs -Xms512m -Xmx512m

**** When Eclipse display "Out Of Memory Exception : Heap Space" *****
To :
eclipse [platform options] [-vmargs [Java VM arguments]]

eclipse.exe -vm %JAVA_HOME%\jre\bin\javaw.exe -vmargs -Xmx512M