Hessian is a binary web service protocol.. In our project, performance is a big issue.. So, we are excited by hearing about word binary instead of xml..
At first glance, Hessian seems to lack a lot of good properties that xml web services have.. it is not a standard, it uses its own stnadard and at the client side, you have to put some adapter to deserialize the incoming message from the server (i think??). Besides, as you change the programming language, you have to change the Hessian implementation you are using.. However, performance is a big deal!! So, lets stop complaininng and try !!
http://hessian.caucho.com/
http://java.dzone.com/articles/hessian-web-service-protocol --> this is a hello world hessian example and source code can be downloaded here: http://peat_hal.users.sourceforge.net/HessianExample.zip
This example is a good starting point. It uses Jetty automatically when the servlet is started, so do not bother about deployment.. I noticed that the client side wants to see the interface of the web service at the server side.. Normally, this is carried out by generated artifacts in xml web services..
I am going to try Hessian on complex examples later... It is ok for noww..
24 Nisan 2009 Cuma
Hessian
Etiketler:
binary web service,
hessian,
web service
GWT jaxws, json vs soap problem
I want to deploy soap web services and some gwt client prefers the services in json format for direct json support of gwt, similar to the situation in http://www.mail-archive.com/users@cxf.apache.org/msg03146.html.
Btw, I use jaxws in developing web services, actually metro web service stack.. I am lucky that jaxws supports json (https://jax-ws-commons.dev.java.net/json/) by just annotating the binding type as json.. @BindingType(JSONBindingID.JSON_BINDING)
Therefore, in the worst case I may deploy that gwt client's json services seperately and still use metro ws stack in ws development..
However, I bumped into a better solution :) http://enunciate.codehaus.org/
I first checked if it is dead and happily saw that the latest release is about a month ago :)
Enunciate is a web service deployment framework. The promise is leaving the developer only source code development with metadata (annotations) and taking care of all the other details such as deployment descriptors including interoperability.. Enunciate promises to give multiple endpoints automatically to the deployed web service.
This is a first step blog on enunciate: http://dustinbreese.blogspot.com/2008/01/enunciate.html
Enunciate's own getiing started doc is here: http://enunciate.codehaus.org/getting_started.html
Lets start!
I used apache tomcat 5.0.28 as web server and Eclipse ide.
-created the example wannabecool project as dynamic web project and added tomcat runtime to the project. -copied stuff $ENUNCIATE/samples/wannabecool/src/main/java under my src folder.
-added jars ander $ENUNCIATE/lib to my project to get rid of compile errors.
-copied $ENUNCIATE/samples/wannabecool/build.xml to my project. In that file,I set enunciate.home properly. While running the ant script, I got this error:
BUILD FAILED
/usr/share/myprograms/ECLIPSEHOME/workspace/ganymede-workspace/wannabecool/build.xml:27: java.lang.NoClassDefFoundError: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
So, I downloaded jaxb-xalan-1.5.jar and added to classpath. This fixed the error.
However, the war file did not work under tomcat (http://jira.codehaus.org/browse/ENUNCIATE-212)
So, I tried jetty.. I got the following error at first:
SEVERE: Context initialization failed
Throwable occurred: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalCommonAnnotationProcessor': Initialization of bean failed; nested exception is java.lang.NullPointerException
So, I commented out the following lines in web.xml (it affected the rest part actually) and bingoo :)
Enter http://localhost:8080/wannabecool/ to check.. Wsdl is here: http://localhost:8080/wannabecool/api.wsdl
However, the REST part is currently problematic due to the change in web.xml..
Btw, I use jaxws in developing web services, actually metro web service stack.. I am lucky that jaxws supports json (https://jax-ws-commons.dev.java.net/json/) by just annotating the binding type as json.. @BindingType(JSONBindingID.JSON_BINDING)
Therefore, in the worst case I may deploy that gwt client's json services seperately and still use metro ws stack in ws development..
However, I bumped into a better solution :) http://enunciate.codehaus.org/
I first checked if it is dead and happily saw that the latest release is about a month ago :)
Enunciate is a web service deployment framework. The promise is leaving the developer only source code development with metadata (annotations) and taking care of all the other details such as deployment descriptors including interoperability.. Enunciate promises to give multiple endpoints automatically to the deployed web service.
This is a first step blog on enunciate: http://dustinbreese.blogspot.com/2008/01/enunciate.html
Enunciate's own getiing started doc is here: http://enunciate.codehaus.org/getting_started.html
Lets start!
I used apache tomcat 5.0.28 as web server and Eclipse ide.
-created the example wannabecool project as dynamic web project and added tomcat runtime to the project. -copied stuff $ENUNCIATE/samples/wannabecool/src/main/java under my src folder.
-added jars ander $ENUNCIATE/lib to my project to get rid of compile errors.
-copied $ENUNCIATE/samples/wannabecool/build.xml to my project. In that file,I set enunciate.home properly. While running the ant script, I got this error:
BUILD FAILED
/usr/share/myprograms/ECLIPSEHOME/workspace/ganymede-workspace/wannabecool/build.xml:27: java.lang.NoClassDefFoundError: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
So, I downloaded jaxb-xalan-1.5.jar and added to classpath. This fixed the error.
However, the war file did not work under tomcat (http://jira.codehaus.org/browse/ENUNCIATE-212)
So, I tried jetty.. I got the following error at first:
SEVERE: Context initialization failed
Throwable occurred: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalCommonAnnotationProcessor': Initialization of bean failed; nested exception is java.lang.NullPointerException
So, I commented out the following lines in web.xml (it affected the rest part actually) and bingoo :)
Enter http://localhost:8080/wannabecool/ to check.. Wsdl is here: http://localhost:8080/wannabecool/api.wsdl
However, the REST part is currently problematic due to the change in web.xml..
18 Nisan 2009 Cumartesi
GWT : "wrong ELF class: ELFCLASS32" Error in x64 Linux machine
When I tried to run my web application through eclipse debugger (in hosted mode), I got the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/share/myprograms/ECLIPSEHOME/eclipse-ganymede/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062334/gwt-linux-1.6.4/libswt-pi-gtk-3235.so (/usr/share/myprograms/ECLIPSEHOME/eclipse-ganymede/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062334/gwt-linux-1.6.4/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32)
However, no problem in Windows XP.
After a bit googling, I bumped into the following sites:
http://code.google.com/p/gwt-examples/wiki/gwtEclipseFaqs#Running_32bit_JVM_for_GWT (Problems With GWT and 64bit JVM section)
http://code.google.com/p/google-web-toolkit/issues/detail?id=134 (comment 39, comment 41)
http://code.google.com/p/google-web-toolkit/issues/detail?id=135 (comment 30)
I have just installed 32 bit jvm and set debug configuration for my app as it, and problem solved :)
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/share/myprograms/ECLIPSEHOME/eclipse-ganymede/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062334/gwt-linux-1.6.4/libswt-pi-gtk-3235.so (/usr/share/myprograms/ECLIPSEHOME/eclipse-ganymede/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062334/gwt-linux-1.6.4/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32)
However, no problem in Windows XP.
After a bit googling, I bumped into the following sites:
http://code.google.com/p/gwt-examples/wiki/gwtEclipseFaqs#Running_32bit_JVM_for_GWT (Problems With GWT and 64bit JVM section)
http://code.google.com/p/google-web-toolkit/issues/detail?id=134 (comment 39, comment 41)
http://code.google.com/p/google-web-toolkit/issues/detail?id=135 (comment 30)
I have just installed 32 bit jvm and set debug configuration for my app as it, and problem solved :)
Etiketler:
gwt,
gwt problem in x64 machine,
gwt troobleshoot
15 Nisan 2009 Çarşamba
GWT Beginner Tutorials - 2
Hi all.. My GWT experience continues and lets see some other documentation:
Google plugin for Eclipse(http://code.google.com/intl/tr-TR/eclipse/) both supports supports google app engine & google web toolkit. User s guide for the plugin is http://code.google.com/intl/tr-TR/eclipse/docs/users_guide.html
To those who wonders what is the relationship bw GAE and GWT, like me:
gwt-windows-1.6.4\samples is a good point for warming up!
to be continued..
13 Nisan 2009 Pazartesi
GWT Beginner Tutorials
Hi everybody! I will use GWT in one of my homework projects and here are some useful beginner tutorials for GWT.
Btw, I am using java, not python..
google app engine getting sterted (an excellent starting point :) ): http://code.google.com/intl/tr-TR/appengine/docs/java/gettingstarted/
google plugin for eclipse: http://code.google.com/intl/tr-TR/appengine/docs/java/tools/eclipse.html, http://code.google.com/intl/tr-TR/eclipse/ (comes bundled with the App Engine and GWT SDKs)
google app engine sdk download : http://code.google.com/intl/tr-TR/appengine/downloads.html
java development server: http://code.google.com/intl/tr-TR/appengine/docs/java/tools/devserver.html
My very first step: (http://code.google.com/intl/tr-TR/appengine/docs/java/gettingstarted/installing.html)
Run the following command on linux:
./appengine-java-sdk-1.2.0/bin/dev_appserver.sh appengine-java-sdk-1.2.0/demos/guestbook/war
This is the command to run java development web server from the commandline. It takes the war location as argument. (war archive files are not supported by the SDK yet, so use a war directory for deployment. )The server can be run from eclipse debugger automatically.
Then examine http://localhost:8080/
Btw, I am using java, not python..
google app engine getting sterted (an excellent starting point :) ): http://code.google.com/intl/tr-TR/appengine/docs/java/gettingstarted/
google plugin for eclipse: http://code.google.com/intl/tr-TR/appengine/docs/java/tools/eclipse.html, http://code.google.com/intl/tr-TR/eclipse/ (comes bundled with the App Engine and GWT SDKs)
google app engine sdk download : http://code.google.com/intl/tr-TR/appengine/downloads.html
java development server: http://code.google.com/intl/tr-TR/appengine/docs/java/tools/devserver.html
My very first step: (http://code.google.com/intl/tr-TR/appengine/docs/java/gettingstarted/installing.html)
Run the following command on linux:
./appengine-java-sdk-1.2.0/bin/dev_appserver.sh appengine-java-sdk-1.2.0/demos/guestbook/war
This is the command to run java development web server from the commandline. It takes the war location as argument. (war archive files are not supported by the SDK yet, so use a war directory for deployment. )The server can be run from eclipse debugger automatically.
Then examine http://localhost:8080/
to be contined..
12 Nisan 2009 Pazar
Vmware
I use vmware for my homework project. So here is some useful links:
Signing Applets
Hi! I want to note down the following to sign applets..
----------------------------------------------------
C:\Users\htarakci>keytool -genkey -alias signAll -keystore abcdefg -keypass abc1
234 -dname "cn=abc" -storepass abc1234
C:\Users\htarakci>jarsigner -keystore abcdefg -storepass abc1234 -keypass abc1234 C:\CENG_DOKTORA\impl\ECLIPSEHOME\workspace-thesis\MOASS-Bio\WebContent\multimediaApplet-0.0.jar signAll
Warning:
The signer certificate will expire within six months.
--------------------------------------------
6 Nisan 2009 Pazartesi
Eclipse Bpel Designer & Apache ODE
Hello everybody! In this record, I give some basic info about Apache ODE and how to integrate ODE with Eclipse through Eclipse Bpel plugin. Since Eclipse Bpel plugin have not published ODE runtime integration yet, this is not straightforward at this moment. Besides, current Eclipse Bpel does not support Eclipse Ganymede, but I use Ganymede in the following case..
Lets begin..
Deploying ODE to tomcat (5.0.28): Download .war distribution of ODE 1.2 from http://www.apache.org/dyn/closer.cgi/ode/apache-ode-war-1.2.zip . Extract the file. Copy ode.war to $CATALINA_HOME/webapps. Start tomcat. Open http://localhost:8080/ode
Deploying processes to ODE: Put the process folders under $CATALINA_HOME/webapps/ode/WEB-INF/processes manually for manual deployment.
ODE Client: As I know, there is no interface for ODE in which I can see deployed processes except axis2 interface, active processes etc. like ActiveBpel. However, ODE provides the api for this. For instance, this is my little ODE Client to see deployed processes:
-----------------------------
package ode.client;
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.ode.axis2.service.ServiceClientUtil;
public class ODEClient {
OMElement listAllProcesses() throws AxisFault {
ServiceClientUtil client = new ServiceClientUtil();
OMElement root = client.buildMessage("listAllProcesses", new String[] {}, new String[] {});
OMElement result = client.send( root, "http://localhost:8080/ode/processes/ProcessManagement");
return result;
}
public static void main(String[] args) {
ODEClient client = new ODEClient();
try {
client.listAllProcesses();
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
-----------------------------
Eclipse & ODE runtime integration: This is not published yet. (http://www.nabble.com/Setup-apache-ODE-runtime-td17848560.html)
However, by following the steps in http://people.apache.org/~vanto/HelloWorld-BPELDesignerAndODE.pdf , it is possible by getting the latest version for the plugin!
Unfortunately, Eclipse Bpel Designer plugin is not available for Ganymede. But, since I get the latest code for the plugin, I can use Eclipse-Ganymede-Rcp instead of Europa.
Different from HelloWorld-BPELDesignerAndODE document, I did the following:
I had problem in viewing http://localhost:8080/ode, however wsdl was ok in http://localhost:8080/ode/processes/HelloWorld?wsdl, so ı didn't care :)
Note on 4/5/9 : I could not view ode since AXIS2_HOME is not defined. When I added this environment variable, it is OK :)
ActiveBpel & ODE Comparison:
http://www.mail-archive.com/ode-dev@incubator.apache.org/msg00825.html
Besides, ODE package structure is very simpler than ActiveBpel.
Some documentation:
http://www.infoq.com/articles/paul-brown-ode
http://ode.apache.org/user-guide.html
My next step may be Intalio. http://www.intalio.com/products/designer/
Lets begin..
Deploying ODE to tomcat (5.0.28): Download .war distribution of ODE 1.2 from http://www.apache.org/dyn/closer.cgi/ode/apache-ode-war-1.2.zip . Extract the file. Copy ode.war to $CATALINA_HOME/webapps. Start tomcat. Open http://localhost:8080/ode
Deploying processes to ODE: Put the process folders under $CATALINA_HOME/webapps/ode/WEB-INF/processes manually for manual deployment.
ODE Client: As I know, there is no interface for ODE in which I can see deployed processes except axis2 interface, active processes etc. like ActiveBpel. However, ODE provides the api for this. For instance, this is my little ODE Client to see deployed processes:
-----------------------------
package ode.client;
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.ode.axis2.service.ServiceClientUtil;
public class ODEClient {
OMElement listAllProcesses() throws AxisFault {
ServiceClientUtil client = new ServiceClientUtil();
OMElement root = client.buildMessage("listAllProcesses", new String[] {}, new String[] {});
OMElement result = client.send( root, "http://localhost:8080/ode/processes/ProcessManagement");
return result;
}
public static void main(String[] args) {
ODEClient client = new ODEClient();
try {
client.listAllProcesses();
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
-----------------------------
Eclipse & ODE runtime integration: This is not published yet. (http://www.nabble.com/Setup-apache-ODE-runtime-td17848560.html)
However, by following the steps in http://people.apache.org/~vanto/HelloWorld-BPELDesignerAndODE.pdf , it is possible by getting the latest version for the plugin!
Unfortunately, Eclipse Bpel Designer plugin is not available for Ganymede. But, since I get the latest code for the plugin, I can use Eclipse-Ganymede-Rcp instead of Europa.
Different from HelloWorld-BPELDesignerAndODE document, I did the following:
- Use eclipse-ganymede-rcp, instead of eclipse-europa-rcp. Otherwise, since the latest code is for ganymede, there will be errors due to version differences.
- Skip part 2.1 if Apache ODE is already installed.
- Skip steps 1 to 8 in part 2.2 since BPEL designer is not available for Ganymede in the update site.
- In step 12 in part 2.2.1, check out all bpel projects under org.eclipse.bpel/plugins.
- Some of the checked out projects were erronous due to lack of some org.eclipse.wst component. So, installed all plugins starting with WST under ganymede update site (uncategorized).
- Some projects were erronous due to lack of org.eclipse.jst.. Install all plugins starting with JST under ganymede update site (uncategorized).
- Delete project org.eclipse.bpel.xpath10.junit since other projects do not depend on it and it mostly consists of unit test.
- For step 16, Open Run Dialog is Europa is analogous to Run Configurations in Ganymede.
I had problem in viewing http://localhost:8080/ode, however wsdl was ok in http://localhost:8080/ode/processes/HelloWorld?wsdl, so ı didn't care :)
Note on 4/5/9 : I could not view ode since AXIS2_HOME is not defined. When I added this environment variable, it is OK :)
ActiveBpel & ODE Comparison:
http://www.mail-archive.com/ode-dev@incubator.apache.org/msg00825.html
Besides, ODE package structure is very simpler than ActiveBpel.
Some documentation:
http://www.infoq.com/articles/paul-brown-ode
http://ode.apache.org/user-guide.html
My next step may be Intalio. http://www.intalio.com/products/designer/
Etiketler:
activebpel,
apache ode,
bpel,
eclipse bpel,
eclipse ganymede,
eclipse plugin,
eclipse rcp
Kaydol:
Kayıtlar (Atom)