Posts

Showing posts with the label Oracle OC4J

Deploying Services to OC4J with RESTful support

Image
       OC4J container provide support for RESTful services. OC4J installation comes with web service assembling tool (wsa) which take an extra optional parameter to give REST support. This post explains step by step approach to implement and deply RESTful services to OC4J. 1. Interface Code package demo.service; import java.rmi.Remote; import java.rmi.RemoteException; public interface StringService extends Remote{     public String toUppercase(String str) throws RemoteException;     public String toLowerCase(String str)throws RemoteException; } 2. Implementation for Interface package demo.service; import java.rmi.Remote; import java.rmi.RemoteException; public class StringServiceImpl {     public StringServiceImpl() {     }     public String toUppercase(String str){   ...

Publishing Simple Java class as Web Service using Axis

Image
In Previous post on Axis ( http://ydtech.blogspot.com/2009/06/deploying-apache-axis-to-oracle-oc4j.html ), I have explained how to deploy Axis as a Web Application. Now its time to utilize Axis web service framework. Apache Axis provides a very simple way of publishing any simple java class as Web Service. This post explains it in simple steps. 1. Code your service implementation as a Simple java class. For this example we take example of simple String Conversation Service( lower case to upper case). This is only for demo purpose. Now Our pojo java class would be public class StrConvService {     public StrConvService() {     }     public String invoke(String str){         return str.toUpperCase();     } } 2. Name this file as StrConvService.jws and copy it to <OC4J_Home>/jdev/home/application/<Axis_WebApp_Home>/<webapp> ...

Deploying Apache Axis to Oracle OC4J Application Server

Image
            Apache Axis is a framework processing SOAP message. It gives a very flexible ways of handling SOAP message. It provides very convenient  ways of creating and invoking web services. You can leave overhead of handling SOAP message to axis framework.  Axis is installed as Web Module in any application server, this web module will acts as wrapper Web Service for your simple pojo java classes. Any simple java class will get converted to web service using this Axis Web module. This tutorial explain deploying Axis to OC4j application server. 1. First download Axis archive from http://people.apache.org/dist/axis/nightly/ . 2. Extract the zip file. 3. to deploy Axis as Web App to OC4j , we need to create archive file (war) and then deploy through console. So to create a war file go to command prompt and go to <asxis_home>/webapps/axis/ 4. execute the command    jar –cvf axis-webapp.war ....