Thursday, June 14, 2007

installing jesstab jess protege

install jess - unzip the file you downloaded (jess71p8.zip) and thats it installed! To run JessTab, copy the jess.jar file from the place you unzipped the file into the Protege_3.1.1/plugins/JessTab folder.

Friday, October 27, 2006

create complex (semantic web) web service that use library - in IBM websphere

make sure required application library jars (jena's for example) are made available in the following place
web project -> WebContent -> lib

otherwise, exception may happen at server side during server start up

In IBM websphere, it seems that the server do NOT use pre-set external JDK, as can be noticed from the server's prompt below:

** Starting the server ***
************ Start Display Current Environment ************
WebSphere Platform 5.1 [BASE 5.1.0.3 cf30412.02] [JDK 1.4.1 b0344.02] running with process name localhost\localhost\server1 and process id 5276
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
user.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
Java Home = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\jre
ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/ext;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/web/help;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime;C:/Program Files/IBM/SQLLIB/java/db2java.zip;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.webservice_5.1.2.3/runtime/worf.jar
Classpath = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/bootstrap.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/j2ee.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/lmproxy.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/urlprotocols.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1.1/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1.1/runtime/wasToolsCommon.jar
Java Library path = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/jre/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;.;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Rational\common;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\CVSNT\;C:\java\jdk1.5.0_04\bin

Solution to solve the following error:
java.lang.NoSuchFieldError: actualValueType at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.convertValidatedDataValue(XSDDatatype.java:370)
This is caused by the system's not using jena's xercesImpl.jar and maybe also other xerces jars.
therefore, because we can see from the prompt that the system is using the following jre
JavaHome = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\jre
We therefore copy all the jars in D:\APIs\Jena-2.4\lib\*.* to JavaHome\lib\endorsed\



Client problem solution:
WS Client generated from WSDL, when run the client, it may report the following error:

java.lang.ExceptionInInitializerErrorat java.lang.Class.forName0(Native Method)at java.lang.Class.forName(Unknown Source)at com.ibm.ws.webservices.engine.encoding.DefaultTypeMappingImpl

I would like to add that when you generate a web service from a WSDL in WSAD 5.1.2 you must also see this problem. This time, it was because the classpath is set to use WAS_50_PLUGINDIR/lib/webservices.jar which translates to D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v5_stub\lib\webservices.jar in both the webapp and the client java app. I corrected this by changing webservices.jar to be picked up from D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\webservices.jar and the problem vanished. I used IBM Java 1.4 successfully (maybe because I am using WSAD5.1.2).



Deploy EAR Web service application in IBM Websphere Application Server:
install the IBM WAS 5.1 - when asking for user ID and password (to start WAS as a service), it means the one that you use to login the windows OS.

Servers --> Application Servers --> server1 --> Process Definition --> Java Virtual Machine --> Generic JVM arguments = -Djava.endorsed.dirs=C:\Progra~1\WebSphere\AppServer\java\jre\lib\endorsed
This is the place that all jars in D:\APIs\Jena-2.4\lib\*.* should be copied into! to override the xercesImpl. Otherwise the following error would be raised at server side when the semantic web service is called:
java.lang.NoSuchFieldError: actualValueType at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.convertValidatedDataValue(XSDDatatype.java:370)

Server configuration bakup:
C:\Program Files\WebSphere\AppServer\bin\backupConfig.bat
C:\Program Files\WebSphere\AppServer\bin\restoreConfig.bat

if can not deploy as Web Service or generate WDSL from the java file, prompting IWAB0398E error in generating WSDL file from java com.ibm.ws.webservices.wsdl.fromJava.Emitter then you need to uninstall Websphere studio application developer , then delete C:\Program Files\IBM\WebSphere Studio, then re-install the WSAD.

-------------------------------

Note that OntRegistry uses protege owl api, which requires jdk 1.5. Make sure you are not using jdk 1.4, otherwise expect the following error:


java.lang.UnsupportedClassVersionError: edu/stanford/smi/protegex/owl/model/impl/DefaultRDFIndividual (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"

Friday, August 04, 2006

204698814
GET: http://www.flickr.com:80/services/rest/?method=flickr.photos.getExif&api_key=8cb51a9e1b0a137ffefaa2c39c3c40b5&photo_id=204698814&secret=04a2410fe49b0df3
Exif of 204698814
Make FUJIFILM
Model FinePix A310
X-Resolution 72/1
Y-Resolution 72/1
Resolution Unit 2
Software Digital Camera FinePix A310 Ver1.00
Date and Time 2003:03:14 22:06:45
YCbCr Positioning 2
Exposure 10/280
Aperture 280/100
Exposure Program 2
ISO Speed 400
Date and Time (Original) 2003:03:14 22:06:45
Date and Time (Digitized) 2003:03:14 22:06:45
Compressed Bits per Pixel 20/10
Shutter Speed 490/100
Aperture 300/100
Brightness 99/100
Exposure Bias 0/100
Maximum Lens Aperture 300/100
Metering Mode 5
Flash 16
Focal Length 570/100
Color Space 65535
Pixel X-Dimension 1024
Pixel Y-Dimension 771
Focal Plane X-Resolution 5263/1
Focal Plane Y-Resolution 5263/1
Focal Plane Resolution Unit 3
Sensing Method 2
Compression 6
Quality NORMAL
Sharpness 3
Flash Mode 2
Flash Strength 0/10
Tag::Fujifilm::0x1023 1405,
1060
Tag::Fujifilm::0x1032 1
Blur Warning 1
By-Line (Author) Picasa 2.0
Tag::IPTC::0x0275
0-0-7fffffff-0
0-0-0-0
0
0
0

Contact
204230634
GET: http://www.flickr.com:80/services/rest/?method=flickr.photos.getExif&api_key=8cb51a9e1b0a137ffefaa2c39c3c40b5&photo_id=204230634&secret=04a2410fe49b0df3
Exif of 204230634
Make Canon
Model Canon EOS 350D DIGITAL
X-Resolution 72/1
Y-Resolution 72/1
Resolution Unit 2
Date and Time 2006:08:01 21:00:19
YCbCr Positioning 2
Exposure 30/1
Aperture 16/1
Exposure Program 4
ISO Speed 100
Date and Time (Original) 2006:08:01 21:00:19
Date and Time (Digitized) 2006:08:01 21:00:19
Shutter Speed -686294017/256
Aperture 524288/65536
Exposure Bias 0/33554432
Metering Mode 5
Flash 16
Focal Length 55/1
Color Space 65535
Pixel X-Dimension 1024
Pixel Y-Dimension 683
Focal Plane X-Resolution 1728000/874
Focal Plane Y-Resolution 1152000/582
Focal Plane Resolution Unit 2
Compression 6
By-Line (Author) Picasa 2.0
Tag::IPTC::0x0275
0-0-7fffffff-0
0-0-0-0
0
0
0

Contact

Thursday, July 13, 2006

some good recorded presentation

Semantic Scholarly Publishing and Discourse: Tools for Modelling Contested Knowledge Domains. Stanford University HCI Program, April 2004 [1 hr webcast] [PPT] [12 min. summary]

Monday, June 19, 2006

paper references on learning

p.p. 9
collaborative learning fosters the development of critical thinking through discussion, clarification of ideas, and evaluation of others’ ideas.

p.p.9
The instructor’s role is not to transmit information, but to serve as a facilitator for learning.


Critical-thinking Items: Items that involve analysis, synthesis, and
evaluation of the concepts.

Drill-and-Practice Items: Items that pertain to factual knowledge and
comprehension of the concepts.


Anuradha A. Gokhale, Collaborative Learning Enhances Critical Thinking, Journal of Technology Education Vol. 7 No. 1, Fall 1995

Monday, June 12, 2006

Eclipse WTP Tomcat axis Web Service

in eclipse
. create a server instance
. switch to J2EE perspective
. create dynamic web project
. "web Content" --> import the wsdl file
. file->new->web service -> top down from wsdl
. make sure the an instance of the server is created and started in eclipse with the web service running
. check the following in web browser
http://localhost:8080/WebServiceTest/services , it should display something as below:

And now... Some Services
AdminService (wsdl)
AdminService
Version (wsdl)
getVersion

. windows->preference->java->Installed JRE->JDK1.5->add External JARs to inlcude activations.jar and mail.jar from jaf and javamail. (this will remove the attachment not supported warning)


P.S. it is not http://localhost:8080/WebServiceTest/ which only returns HTTP Status 404 - /WebServiceTest/


Ref: http://www.eclipse.org/webtools/jst/components/ws/1.5M6/tutorials/TopDownWebService/TopDownWebService.html

Monday, June 05, 2006

create eventSearch Web service and portal client

(lb p32)
WS-I WSDL first approach is used. accordingly the following steps are attmepted for this task.
1. Service specification for WSDL design - Specify service interface.
2. Use Axis tool to generate service code template
H:\>java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true http://www.ecs.soton.ac.uk/~ft/ontology/EventSearch.wsdl
this generate the following server side skeleton (client side is called stub):
Event.java ArrayOfEvent.javaEventSearchIn.java EventSearchOut.javaEventSearchPort.java EventSearchBindingStub.javaEventSearchBindingSkeleton.java EventSearchBindingImpl.javaEventSearchService.java EventSearchServiceLocator.javadeploy.wsdd undeploy.wsdd
3.

Monday, March 13, 2006

Research Activity Profile Management

log research activities in a semantic web way.

Thursday, February 09, 2006

linux commands

# mount and unmount cdrom
as root, eject /dev/hdc will eject the cd-rom
mount /dev/hdc will mount the cd-rom

# how to automate sftp sessions without having to type in the password
http://www.atmos.albany.edu/facstaff/rmctc/ssh2/

# string replacement using comand line stream editor
sed -e 's/35934/39690/g' index.html >index1.html

#command line web browsing and retrivel
-r for recursive, -x for retain directory structure
wget -r -x http://www.google.com

# vncserver setup
vncserver :1 geometry 1280x1024

Tuesday, January 31, 2006

semantic web and p2p reference

the follow paper describes the benifit of p2p and RDF that fit into the democratic network philosophy!
Semantic Web Meta-data for e-Learning – Some Architectural Guidelines

"However, the web has developed into a predominantly client-server based system,
which mainly relies on centralized information handling, something that really
defeats the purpose of Internet technology. Peer-to-peer networks is a way out of
that trap. RDF is also deliberately designed as a peer-to-peer architecture, where
anyone can say anything about anything [5], so it naturally fits into the democratic
network philosophy. In a democratic network, objectivity is defined by consensus,
not by authority. Meta-data needs to be a part of that consensus building process"

Wednesday, November 30, 2005

photo annotation

potential customer:
Newspaper and other media editors


key technology:
Semantic web
Face recognition
search engine

Thursday, November 24, 2005

What is the expected type of semantic web applications?

a tool or service that assists users in manipulating semantically enriched resources based on shared ontology.

Manipulation includes:
  • Model - determine resource models by selecting shared ontology
  • Edit - change
  • Import/Export - Format interpobability
  • Publish - obtain annotated and semantically enriched resources
  • Reuse - Reasoning, search, representation and visualisation

Key features includes:

  • Distributed - the semantic data should be ideally located in different places
  • Inteprobable - if it is a web service, it must follow WS-I.

Key issues includes:

  • Storage
  • Modular and reusable resource processing - e.g., namespace driven resource consumer auto-loading
  • Provenance





Tuesday, November 22, 2005

MCV - Model, Controller and View

Model, View, Controller(MVC) is a a software architecture that separates an application’s data model, user interface, and control logic into three distinct components.

Model: ontology, semantics data such as OWL and RDF triples

Controller: Ruby
http://wiki.rubyonrails.com/rails shows a description of the Rails MCV

View: RHTML - is a set of html with ruby code embedded.

Wednesday, November 16, 2005

Group activity management

meeting schedualer,

agenda management

minutes

sugguesting upcoming conferences and paper commitments

allow follow-up sugguestions and comments

Sunday, November 13, 2005

what might be the interesting resources in PIM?

grocery shopping list: collebrate on the list before weekly shoppings, fully personalised, increasingly efficient with historic items selection and checkboxs, sms or synchronise with mobile, email. post-in printing facility.

bookmark: tagging using topic map

research activity management:

Debt management:

course management:

Proverbs

Friday, November 11, 2005

make a web service client using axis

java org.apache.axis.wsdl.WSDL2Java SimilarSearch.wsdl

will generate a set of helper classes according to the wsdl definition.

then make a client java as below:

/*
* Created on 08-Nov-05
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/

/**
* @author ft
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/

package SimilarSearch;

import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

public class similarSearchClientTester {

public static void main(String[] args) {

// create an instance of our service locator
SimilarSearchServiceLocator locator = new SimilarSearchServiceLocator();

// create an instance or our SoapBindingStub
SimilarSearchBindingStub stub=null;
try {
stub = (SimilarSearchBindingStub) locator.getSimilarSearchPort();
} catch (ServiceException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

SimilarSearchIn in = new SimilarSearchIn();
in.setNumber("ct01003");

// make a call to a method we created in our web service
try {
System.out.println("read to similar search");
SimilarSearchOut out = stub.doSearch(in);
System.out.println("result:"+out.toString());

} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
}

Wednesday, November 02, 2005

useful commands and tips

% java org.apache.axis.client.AdminClient list


deploy a web service:
% java org.apache.axis.client.AdminClient deploy.wsdd
Done processing

display an environment parameter
% echo %classpath%

a new command prompt needs to be reopened each time the "myComputer"->property->"enviroment setting" is changed.

testing a web service from browser:
http://localhost:8080/axis/services/SimilarSearch?method=doSearch&number=ct01001

Friday, October 28, 2005

web service step by step

install apache, axis, see the happy axis page okay. use axis user guide for installation.

Java JDK/JRE 1.5.0_04 (mind that jdk 1.4 may have some Axis_Fault problems)
Tomcat 5.5.9
Axis 1.2

set environment by configure myComputer->property->system env. as follows:

JAVA_HOME C:\Java\jdk1.5.0_04

AXIS_HOME D:\api\axis

AXIS_LIB %AXIS_HOME%\lib

JENA_HOME D:\api\Jena-2.3


AXISCLASSPATH %AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery-0.2.jar; %AXIS_LIB%\commons-logging-1.0.4.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

CLASSPATH .;%JENA_HOME%\lib\antlr.jar;%JENA_HOME%\lib\concurrent.jar;%JENA_HOME%\lib\commons-logging.jar;%JENA_HOME%\lib\icu4j.jar;%JENA_HOME%\lib\jakarta-oro-2.0.5.jar;%JENA_HOME%\lib\jena.jar;%JENA_HOME%\lib\junit.jar;%JENA_HOME%\lib\log4j-1.2.7.jar;%JENA_HOME%\lib\xercesImpl.jar;%JENA_HOME%\lib\xml-apis.jar;%AXISCLASSPATH%;%JAVA_HOME%\lib\tools.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\axis.jar;%AXIS_LIB%\wsdl4j-1.5.1.jar;D:\api\jaf-1.0.2\activation.jar;D:\api\javamail-1.3.3_01\mail.jar;D:\api\xml-security-1_3_0\libs\xmlsec-1.3.0.jar

PATH C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\CVSNT\;C:\java\jdk1.5.0_04\bin

Integrate axis into tomcat: copy D:\api\axis\webapps\axis to C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps

check axis happy-page on http://localhost:8080/axis/happyaxis.jsp

following the directions on the happy-axis page, get
activation.jar (jaf-1.0.2), http://java.sun.com/products/javabeans/glasgow/jaf.html
mail.jar (javamail-1.3.3_01), http://java.sun.com/products/javamail/downloads/index.html
xmlsec.jar etc(xml-security-1_3_0/lib), http://xml.apache.org/security/dist/java-library/

and put them in classpath. (as shown in the last three items in the classpath above)

stop and restart tomcat server, refresh happy-axis page, which should be error free by now.


then we start with a simple service java file:

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.*;
import java.util.regex.*;
import java.lang.*;

public class WebServiceTest{

public String doTest(String in) throws RemoteException
{

return "input is "+in;
}

}


compile it and copy the result WebServiceTest.class to
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\classes


manually edit deploy.wsdd, as follows:










make sure Tomcat webserver is runing.

Deploy the webservice:
java org.apache.axis.client.AdminClient deploy.wsdd
this will register the class in the axis engine so that they are exposed properly as a web service.
***** make sure you have compiled the WS.java and copy the result WS.class to
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\classes ***.

go to http://localhost:8080/axis/servlet/AxisServlet
the web service should have already been registered there.

so far, the server side is done.
next we need to make a client that calls the web service:

get the web services's WDSL link from http://localhost:8080/axis/servlet/AxisServlet

run java org.apache.axis.wsdl.WSDL2Java , and this will generate a set of helper classes. **** make sure, the wsdl4j.jar is in the classpath, otherwise, WSDL2Java complains Exception in thread "main" java.lang.NoClassDefFoundError: javax.wsdl.Definition

As it seems that the WSDL2Java does not generate a handy proxy file. yet althought IBM websphere developer does generate the proxy java file, its other helpper java files uses ibm's own jars, which is not good. For these, we now need to make good use of both:
1. run IBM Websphere developer 5.1.2. new->web project; new->other->web service client; give it the WSDL link. and follow the wizard, it will generate all helpper java files including a proxy java file. Copy (drag and drop) all the WSDL2java generated helper files to IBM Websphere java source to replace IBM Websphere generated helper java files. change moderate on the packages name, etc.

2. create a tester java file that call the web service by using the proxy java class object:

package localhost;

public class Tester
{
public static void main (String [] args) throws Exception{

//make a service
WSProxy service= new WSProxy();

System.out.println(service.doTest("2222"));

//

}}


Done!

Thursday, May 19, 2005

EleGI exhbition in EC

2005-05-17, EleGI has been chosen and invited by the Europe Commission to the eLearning Conference - Towards a Learning Society which will take place the 19th and 20th of May 2005 in Brussels.

University of Southampton (UoS) is one of the partners in ELEGI to present the exhbition.