Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

webservice help  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ame trying to expose some API's as a web-service.
The approach I am following is :
1) JWSDP_1.0 (Java Web Service Developer Pack, can run on any j2ee server)- JAX-RPC approach
2) xrpcc tool (comes with JWSDP)- generates stubs, ties and WSDL file using the config.xml file, interface file and implementation file.

I have tried to expose the service with primitive types and String as a parameter as well return type. Runs fine.
But I am facing problem for Classes.(Vector, HashTable....UserDefined class etc as an argument and return type).

For Vector as a return type, error is :
[echo] Running xrpcc for the server....D:\DAM/lib/contmgmt.jar :\DAM/lib/logger.jar :\DAM/lib/errorhandler.jar
[exec] error: invalid type for JAX-RPC structure: java.util.Vector
[exec] 1 error
[exec] Result: 1

So I modified the config.xml file required for xrpcc tool like this :

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="">
<rmi name="TestService1" targetNamespace="" typeNamespace="">
<service name="TestService1" packageName="net.etouch.contmgmt.dam">
<interface name="net.etouch.contmgmt.dam.ContIF" servantName="net.etouch.contmgmt.dam.ContentManager"/>
<!-- Addition here -->
<typeMapping encodingStyle="">
<entry schemaType="ns1:java.util.Vector" javaType="java.util.Vector"

I have supplied here the VecorSerializerFactory class from apache 'axis' project. But this class is not as per the jwsdp specs as its giving error. b'cos this class is using its own interfaces, classes and not implementing javax.xml.rpc.encoding.Serializer.
We want to implement the (de)serialiser classes for above stated classes (Vector, HashTable .. Employee etc) which will implement javax.xml.rpc.encoding.Serializer interface. We did not get any sample java code where javax....Serializer interface is implemented. Searched for sample code as we didn't know what is required in method implementations though its an application specific implementation.

Is there any way to do this?

pls help....


Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.265 / Virus Database: 137 - Release Date: 7/18/2001
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!