Hi,
 
  Our application has to support only java. Can anyone let me know what are the criteria to be satisfied If I have  to write a Serializer and Deserializer for ArrayList? Thanks for the same

 
On 2/3/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
If you plan to support interoperability with any language other than Java (or even any SOAP engine other then Axis), you should not expose Java Collections through your WSDL interface. You should convert them to arrays.

Anne


On 2/3/06, Nayana Hegde <[EMAIL PROTECTED] > wrote:
Hi,
 
The following is the class which I have exposed as a webservice.
 
public class Test {

 public ArrayList getArrayList(){
  ArrayList list = new ArrayList();
  TestObject obj = new TestObject();
  obj.setName("First");
  list.add(obj);
  TestObject obj1 = new TestObject();
  obj1.setName("Second");
  list.add(obj1);
  return list;
 }
 public HashMap getMap(){
  HashMap map = new HashMap();
  map.put("First","First");
  map.put("Second","First");
  return map;
 }
}
 
Now when I access the method getArrayList in the client side it is getting resolved as an Object array instead of an ArrayList but when I access the getMap() it is getting resolved correctly. Can you let me know the reason for the above? Is there any configuration changes that have to be done for the above to work. 1.2beta3 1009 August 17 2004.
 
<service name="Test" provider="java:RPC">
    <parameter name="className" value="com.db.cc.Test"/>
    <parameter name="allowedMethods" value="*"/>  
    <parameter name="load-on-startup" value="true"/>
    <parameter name="activateOnStartup" value="true"/> 
    <beanMapping languageSpecificType="java: com.db.cc.object.TestObject" qname="ns4:TestObject" xmlns:ns4="urn:object.cc.db.com"/>
  </service>
 
 
Thanks and Regards,
Nayana


Reply via email to