Generating JAX-RPC Web Services

JAX-RPC is a Java API for XML-based RPC (Remote Procedure Calling protocol). It facilitates RPC over the Internet allowing XML formatted parameters to be passed to remote services and allowing XML formatted values to be returned.

If the Web service implementation type is JAX-RPC, PowerDesigner uses the JAX-RPC model for implementation. JAX-RPC defines RPC type invocation for Web Services but it is limited to simple message formats. You can use very complex Objects/XML mapping.

Using the JAX-RPC model implies to:


  • Generate the Web Service Java class and interface code

  • Compile the Web Service Java class and interface

  • Run a JAX-RPC tool to generate server side artifacts and client side proxy to handle the Web Service

  • Package all the compiled code, WSDL and deployment descriptor in a .WAR file

  • Deploy the .WAR file in a server that supports JAX-RPC

To Use JAX-RPC, you can use the Java Web Services Developer Pack (JWSDP) 1.1 or higher from Sun or other application servers that support the JAX-RPC model. You can download JWSDP from http://java.sun.com/webservices/.

To generate server side code and client proxy for JAX-RPC, if you use JWSDP, you can use the wscompile.bat tool. For other JAX-RPC compatible implementations, please refer to the documentation. To invoke the wscompile.bat tool from PowerDesigner, you have to define an environment variable WSCOMPILE in the Variables category located in the General Options windows ( Tools > General Options ). The WSCOMPILE variable should indicate the full path of the wscompile.bat file. To run wscompile.bat, the jaxrpc-api.jar file must be in your CLASSPATH environment variable. You can also define a JAVACLASSPATH variable in PowerDesigner to define the classpath specific to PowerDesigner, in this case the JAVACLASSPATH variable replaces the CLASSPATH environment variable

To deploy JAX-RPC Web service components, you need an application server or a Servlet container that supports JAX-RPC. JWSDP ships with Apache Tomcat that supports JAX-RPC

  1. Select Language > Generate Java Code .
  2. Select a directory where you want to generate the code.
  3. In the Tasks tab, to generate server side code, select the command WSDL: Compile and PackageWeb Service Server-Side Code into an archive. To generate client proxy, select the command WSDL: Compile and PackageWeb Service Client Proxy into an archive.

    These commands will compile the Java classes generated by PowerDesigner, run the WSCOMPILE tool and create a .WAR file.



  4. Click OK.

If you have a server like Apache Tomcat that supports JAX-RPC, you can add a profile and use the deployment command to deploy the generated .WAR file directly into the server.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com