Misra’s blog

Creating Web services using the J2EE 1.4

Posted by mtwinkle on April 13, 2007

http://java.sun.com/developer/technicalArticles/J2EE/j2ee_ws/
http://developers.sun.com/sw/building/codesamples/jax-rpc/
http://java.sun.com/webservices/interop/reference/tutorial/doc/Examples_glassfish6.html

1. Design and Code the Service Endpoint Interface
What is Endpoint interface?
Ans. In which you declare the methods that a web service remote client may invoke on the service.

Endpoint interface must:
* It extends the java.rmi.Remote interface
* It does not have constant declarations such as public static final
* Its methods throw the java.rmi.RemoteException (or one of its subclasses)
* Its method parameters and return data types are supported JAX-RPC types

2. Implement the Service Endpoint Interface

Steps:
1. Create folders D:\sun\AppServer\apps\build
2. apps directory contains the .java files, and the build directory contains the .class
Compile:
prompt> javac -d build Math*.java
The -d option instructs the compiler to write the output .class files into the build directory:
3. Write a Configuration File config.xml
This file tells “wscompile” to create a WSDL file with the following information:

* The service name is MyFirstService.
* The WSDL namespace is urn:Foo.
* The classes for the service are in the math package under the build directory.
* The service endpoint interface is math.MathFace.

Download jws-dp (Java web services developer pack)
http://java.sun.com/webservices/downloads/previous/webservicespack.jsp
/jaxrpc/bin/wscompile

Add the jaxrpc/bin directory to your PATH environment variable.
**************
cls
echo off
echo Set up for JAX-RPC start……..
set JAXRPC_HOME=C:\Program Files\tomcat50-jwsdp\jaxrpc\
set PATH=%PATH%;%JAXRPC_HOME%\bin
echo Set up for JAX-RPC completed successsfully!!
**************
D:\sun\AppServer\apps>
wscompile -define -mapping build/mapping.xml -d build -nd build -classpath build config.xml

Start Tomcat:
C:\Program Files\tomcat50-jwsdp\bin

Check if the sever started successfully:
http://localhost:8080/

Download SDK from
http://java.sun.com/javaee/downloads/index.jsp

WAR File Creation using deploytool
Start the DeployTool by running the deploytool.bat file from the /bin/

8 Responses to “Creating Web services using the J2EE 1.4”

  1. hey I was quite impressed with the setup you used with this weblog. I use blogs my self so very good job. definatly adding to bookmarks. 96798

  2. tax tips said

    Constructive criticism is usually looked upon as becoming politically incorrect. 955083

  3. Really informative and wonderful bodily structure of content material material , now that’s user friendly (:. 986019

  4. page said

    Right after study several with the content material inside your internet web site now, and i also truly significantly like your way of blogging. I bookmarked it to my bookmark site list and are checking back soon. Pls take a appear at my internet page also and inform me how you feel. 897995

  5. Real instructive and wonderful anatomical structure of articles , now that’s user pleasant (:. 210840

  6. Often the Are usually Weight reduction plan is unquestionably an low-priced and flexible weight-reduction plan product modeled on individuals seeking out shed some pounds combined with at some point maintain a far healthier your life. la weight loss 267046

  7. tablet applications…

    I’m impressed, I need to say. Really not often do I encounter a blog that’s each educative and entertaining, and let me tell you, you have hit the nail on the head. Your concept is excellent; the difficulty is one thing that not enough persons are talk…

  8. Some genuinely wonderful weblog posts on this internet internet site , regards for contribution. 668811

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: