eclipse ganymede etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
eclipse ganymede etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

23 Haziran 2009 Salı

more notes on Jbossws + Eclipse


Unfortunately, i did not notice that the client stubs were generated by Axis2 not jax-ws (wsit runtime). Therefore, the solution is still incomplete :(

Now, extra steps are:
  • download jboss tools from http://www.jboss.org/tools/download/stable/3_0_GA.html (i downloaded all plugins part, the first part..)
  • install the plugins on eclipse ganymede by extracting the zip and copying plugins and features folders in the extracted package to your eclipse folder 
  • install stp (soa tools project) plugin to eclipse via software updates. the update site is http://download.eclipse.org/stp/updates/ganymede/
  • window --> preferences --> web services --> Jbossws preferences  : add ... /jbossws-metro-bin-dist/output/deploy-jboss500
  •  restart eclipse
Now the environment seems ready..  however, there exists problems that i can not overcome :( for instance while generating a bottom up web service using the jbossws runtime, i get the following error:
error: Could not find class file for com.example.Eval
1 error
Error: Could not generate. (use --show-traces to see full traces)
Error: Wsgen invocation failed. Try the '-verbose' switch for more information

i could not solve the error :(
however, this post is just to note down the preparation of the eclipse environment for web service development :)

some notes on Jbossws + Eclipse

I want to make effective use of metro web service stack and eclipse ide (together). Netbeans support for jaxws is excellent but i have a limitation that all code will be developped with eclipse, so lets move..


My environment is Eclipse Ganymede + Jboss 5.0.0. app. server + Sun jdk on x64 linux machine (open suse).

The steps:
1) Download and install Jboss 5.0.0


3) In jbossws package (extracted) copy ant.properties.example as ant.properties

4) change the server location as follows (appropriately):
jboss500.home=/usr/share/myprograms/ECLIPSEHOME/ECLIPSEHOME/server/jboss-5.0.0.GA

5) execute ant deploy-jboss500 command. ant must be installed and the command must be executed inside the package structure(since build.xml is at that path..)
at this point, jbossws is installed at jboss app server..
btw, jboss server does not work properly with ibm jdk, so use sun jdk instead..

6) open eclipse and add the jboss v5.0 server you installed jbossws on top of.
while trying to do this this error message may appear:
 Missing classpath entry /home/hilal.tarakci/ECLIPSEHOME/server/jboss-5.0.0.GA/server/default/lib/mail.jar
This is due to this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=257823
One of the workarounds: copy mail.jar from jboss-5.0.0.GA/common/lib to /jboss-5.0.0.GA/server/default/lib.
i started the server for test purpose and got the following warning:
11:52:49,509 WARN  [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/home/hilal.tarakci/ECLIPSEHOME/server/jboss-5.0.0.GA/server/default/deployers/jbossws.deployer/jaxb-xjc.jar/1.0/
javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/home/hilal.tarakci/ECLIPSEHOME/server/jboss-5.0.0.GA/server/default/deployers/jbossws.deployer/jaxb-xjc.jar/1.0/",type=SubDeployment already registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
i just ignored the warning..

7) create a dynamic web project with jboss v5 as target runtime. 

8) add the sample TestWs.java to the project. (The sample code is at JBossWs Code sample with annotations: (TestWs.java)  part at http://www.javabeat.net/articles/40-creating-webservice-using-jboss-and-eclipse-europa-2.html )


10) start jboss inside eclipse. deploy the created project (by adding project to the server.)
Doing this, the following error may appear if project workspace and eclipse are on seperate disks:
Publish failed using Ant publisher
  Could not replace with temp file /tmp/tmp27108.MF.
So, put them on the same disk..

the deployed web service should appear in this list: http://localhost:8080/jbossws/services and wsdl at http://127.0.0.1:8080/JbossWsEval/TestWs?wsdl
Now, it is time to create a client for this web service. 

12) create another dynamic web project, this will include client. right click the project and select new Web Service Client (under Web Services) enter the above wsdl as service definition.
the generated stubs are under src.

13) a sample client code is as follows:
import java.rmi.RemoteException;

import com.test.dhanago.TestWs;
import com.test.dhanago.TestWsProxy;

public class TheClient {
public static void main(String[] args) {
try {
TestWsProxy aProxy = new TestWsProxy();
TestWs service = aProxy.getTestWs();
System.out.println(service.greet(" Stranger"));
} catch (RemoteException e) {
e.printStackTrace();
}
}
}

If this java app prints "Hello Stranger" , then fine :)

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
Bağlantı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.
Currently, all the projects must be error-free :) Continue with step 16 in part 2.2.2.
  • For step 16, Open Run Dialog is Europa is analogous to Run Configurations in Ganymede.
It seems that it supports ODE 1.0, but it did also worked with ODE 1.2 :)

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/

27 Mart 2009 Cuma

Subversive plugin installation for Eclipse Ganymede on suse 11 x64

This maybe a trivial task, but it stole so much time from me !! So, lets note what works:
1.) Add the following update sites:
http://download.eclipse.org/technology/subversive/0.7/update-site/ * Subversive plug-in update site
http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ * Subversive SVN Connectors update site
2.) Select the boxes except the ones under (Subversive site) and (polarion...) in the following picture:
Hibernate

PS. It works for Eclipse Europa on the same environment.