If you install JWSDP with tomcat-50-jwsdp, all of the samples and required files in JWSDP are copied into it. Let's have a look at them making use of NetBeans "Favorite" window. It"s good because we can see them in treed form...

We have jaxrpc folder and under it samples forlder. And the sample "HelloWorld" is located under samples folder. To create our customized web service project, the best location is here!

Why? That was the mystery of an empty tomcat.xml file...
![]()
the "CCF file(jaxrpc-HelloWorld.xml)" is located in tomcat50-jwsdp/conf/Catalina/localhost. If you don't see it, try after starting tomcat50-jwsdp once.

And see what is written in this file...
<Context path="/jaxrpc-HelloWorld" docBase="../jaxrpc/samples/HelloWorld/jaxrpc-HelloWorld.war" debug="0">.....
Because Tomcat reads this docBase , there is no need to copy the war product to tomcat/webapp folder. As for MyHelloService project, all we have to do is to make jaxrpc-MyHelloWorld.xml here, modifying like this.
<Context path="/jaxrpc-MyHelloWorld" docBase="../jaxrpc/samples/MyHelloWorld/jaxrpc-MyHelloWorld.war" debug="0"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="jwsdp_log." suffix=".txt" timestamp="true"/> </Context> |
(jaxrpc-MyHellWorld.xml)
Because customized projects are to be created at the same location of the sample, we only have to modify bulid.properies file of a custom project for the container name and tomcat.root like this:
container=tomcat
tomcat.root=/tomcat50-jwsdp
I suppose that, in order to build a web service in bottom-up procedure, it would be better to create server and client project separatory. The former create the WSDL file and the latter read it, so they need different config.xml files. Let's talk about that in detail later, now first of all we create the server project with the following structure:

There is only "server"folder under "src".
MyHelloImpl.java can be made from HelloImpl.java sample.
package myhello;
public class MyHelloImpl implements MyHelloIF, java.rmi.Remote {
public String sayHelloBack(java.lang.String str) {
String result = "Let me talk about" + str;
System.out.println("In sayHello for WSDL : " + str);
return result;
}
}
|
(MyHelloImpl.java)
MyHelloIF.java was added manually.
package myhello; import java.rmi.Remote; public interface MyHelloIF
extends Remote { } |
(MyHelloIF.java)
config.xml for server is the same as the former document , in the form to create its WSDL file.
The example of this you can see in the document stored in tomcat50-jwsdp/docs folder. Enter from "index.html" and link along "JAX-RPC Version...">"JAX-RPC Tools". You can reach "jaxrpc-tools.html" and how to set config.xml with wscompile task,
Anyway, my config.xml again:
<?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"> <service name="MyHelloService" targetNamespace="http://myhello.noniko.com/wsdl" typeNamespace="http://myhello.noniko.com/types" packageName="myhello"> |
(config.xml for MyHelloWorld project)
jaxrpc-ri file is also need to be customized:
<?xml version="1.0" encoding="UTF-8"?> <webServices xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd" |
(jaxrpc-ri.xml for MyHelloWorld project)
Just adding "My"to every
"Hello" and "my"to every "hello" to the sample
jaxrpc-ri.xml file.
the Namespace "http://myhello.noniko.com" has nothing to do with a
real website URL, unless this web service is exposed in real WWW.
One mystery remains. Look at the following...
wsdl="/WEB-INF/MyHelloWorldService.wsdl"
The word "World"was written
in the sample and I did not touch it. But the resultant wsdl file was named
"HelloService.wsdl ".
And it worked.
Nevertheless, this jaxrpc-ri.xml file was required while building (error when
missing).
Why?...more experiments would be needed to solve this mystery.
The whole build.xml file for the MyHelloService server project is shown here.
This build.xml for server has been simplified as much as I could. First of all, all targets for client has been removed.
The important change from the original sample is:
(1)project's name.
<project name="MyHelloWorld" default="build" basedir=".">
because this name is adopted as the parameter value ${appname}.
(2)urls.
<property name="endpoint"
value="http://localhost:8080/jaxrpc-MyHelloWorld/myhello"/>
<property name="server.port.url" value="http://localhost:8080/jaxrpc-MyHelloWorld/myhello"/>
(3) adding oneclasspath in the <path>...<path> block.
....................
<pathelement location="${ant.jar}"/>
<pathelement path="${samplesbuild}/${appname}/classes/server/"/>
......................
This ${samplesbuild}/${appname} actually means
C:\tomcat50-jwsdp\jaxrpc\build\samples\MyHelloWorld
and this folder is created while building.
(4)generate-server target.
<target name="generate-server" depends="compile-server">
It was found from the former struggle that, to make WSDL file the generate-server target must come after compile-server target.
And I did delete both <ant-call> tasks before and after <wscompile> task. Also, I removed two targets <edit-config> and <unedit-config>.
Because, they are not necessary when the comfig.xml is written in the form of <service>block.
<edit-config> and <unedit-config>
are operation to add temporaly absolute path in the description in comfig.xml
, when it is written in the form of calling a given wsdl file.
Look at the config.xml in HelloWorld sample. You will see the following
description:
<wsdl
location="./etc/HelloWorldService.wsdl"
Then make a little experiment. edit the build.xml file in HelloWorld sample, comment out only <antcall target "unedit-config"> task in <generate-server> target like this...
<target name="generate-server"
depends="prepare">
<antcall target="edit-config">
<param name="config.rpcenc.file" value="${config.rpcenc.file}"/>
</antcall>
<wscompile
.......
</wscompile>
<!-- <antcall target="unedit-config">
<param name="config.rpcenc.file" value="${config.rpcenc.file}"/>
</antcall>-->
</target>
...and then execute generate-server target. This means only <edit-config>target is called, not <unedit-config>. Now, look at the config.xml file! You may find ;
<wsdl
location="C:\tomcat50-jwsdp\jaxrpc\samples\HelloWorld/./etc/HelloWorldService.wsdl"
AH! complicated ! Then, let's execute generate-server again with unedit-config target and come back to our MyHelloWorld project.
(5) compile-server target
Make sure you are now editing build.xml file in MyHelloWorld project.
<target name="compile-server" depends="prepare">
and, though no change from the sample, take a look at the followings:
<javac srcdir="${samples.home}/${appname}/src/server"
destdir="${samplesbuild}/${appname}/classes/server"
${samples.home}/${appnanme} actually means
C:\tomcat50-jwsdp\jaxrpc\samples\MyHelloWorld
srcdir and destdir are located somewhat in a distance....
(6) create-war target
<target name="create-war" depends="generate-server">
and note that in this target ${samplesbuild}/${appname}/classes/server is deleted.
This time tomcat.xml needs no change from the sample. Make sure the CCF file "jaxrpc-MyHelloWorld.xml" is located in c:/tomcat50-jwsdp/conf/Catalina/localhost, then let's start the server!
Can you see jaxrpc-MyHelloWorld service working?

The client project MyHelloWorld-Client was created separately at the same location of the server projects. The structure is..

Sorry, we don't need jaxrpc-ri.xml file this time. I forgot to remove it without using....
All the configuration and build files has been copied from the HelloWolrd project again (those of MyHelloWorld project are too much modified and not suitable fora client project). And, MyHelloService.wsdl has been copied from the resultant jaxrpc-MyHelloWorld.war archive. Using Window XP file browser, you may copy it without extracting the archive.
MyHelloClient.java is created from HelloClient.java...
package myhello; |
config.xml file is much similar to the sample, calling WSDL...
| <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"> <wsdl location="./etc/MyHelloService.wsdl" packageName="myhello" /> </configuration> |
build.xml for client is shown here. This time all the targets for server are removed. The dependency among the targets need not to be changed.
(1) project name is changed and default task is also:
<project name="MyHelloWorldClient" default="run-client" basedir=".">
(2)Sorry, we have to change the urls again.
<property name="endpoint"
value="http://localhost:8080/jaxrpc-MyHelloWorld/myhello"/>
<property name="server.port.url" value="http://localhost:8080/jaxrpc-MyHelloWorld/myhello"/>
(3)Also url is written in the< run-client> target.
<waitfor>
<http url="http://localhost:8080/jaxrpc-MyHelloWorld"/>
</waitfor>
Make sure the jaxrpc-MyHelloWorld service is running and let's execute <run-client> target!

This time the work was much simplified and I feel I could understand JAX-RPC Web Service using JWSDP more deeply. Maybe what was wrong in the first document was that I had been too eager to use NetBeans, forcing to change working location...
Thank you very much Nic for your advice to improve the way.
@