users@jax-rpc.java.net

Handler

From: Baris Harman <barishar_at_YAHOO.COM>
Date: Thu, 26 Sep 2002 02:02:34 -0600

I have a problem in addding one request and one response handler to my jax-rpc service. First of all I am a little bit confused about the role of the xrpcc tool in web service generation.I am using the ant tool for the whole process, from compilation, stub, tie generation, packaging, deploying etc. I may provide the build.xml, and configuration file but for the time being one may understand the point I am doing wrong.

For the server side:
1. ant compile-server: compiling the service definition code
2. ant setup-web-inf: copies the class (interface, implementation and other coded classes) and XML files (web.xml, jaxrpc-ri.xml ) to the build/WEB-INF subdirectory. The package target runs the jar command and bundles the files into a WAR file
3. ant process-war: Reads the dist/xxx-portable.war file as input Gets information from the jaxrpc-ri.xml file that?s inside the xxxportable.war file Generates the tie classes for the service Generates a WSDL file named yyy.wsdl Packages the tie classes, the yyy.wsdl file, and the contents of xxxportable.war file into a deployable WAR file named dist/xxxjaxrpc.war
4. ant deploy: deploys the service.

Now the thing I can not understand is the probable role of the xrpcc tool. In some documents I got the impression that it should be run after compile-server step accepting a configuration file. At that point since I do not have the service deployed the file cannot be of "type" wsdl. So I prepared the following configuration file. and running xrpcc -classpath build/shared -server -keep -d build config2.xml before setup-web-inf. And the handler does not work afterwards.

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
   <service name="StockBroker"
      targetNamespace="http://com.test/wsdl"
      typeNamespace="http://com.test/types"
      packageName="webservices.interoptest.sun">
      <interface name="webservices.interoptest.sun.InteropSunIF"
         servantName="webservices.interoptest.sun.InteropSunImpl"/>

     <handlerChains>
      <chain runAt="server">
       <handler className="ServerHandler">
         <property name="fooServer" value="barServer"/>
       </handler>
      </chain>
 </handlerChains>
   </service>
</configuration>

May anyone say what am I doing???

Thank you in advance

baris