I have successfully used an inner and outer bean using the standard bean
searlizer, however the outer bean needs a setter and getter for the
innerbean

-----Original Message-----
From: Agarwal, Naresh [mailto:[EMAIL PROTECTED]
Sent: Thursday, 12 June 2003 10:48 PM
To: [EMAIL PROTECTED]
Subject: RE: Does AXIS provide serializers/deserializers for nested
javabeans?


Hi Kai
 
thanks for reply..
I tried using BeanSerializer but it's not working..
 
I have declared the bean mapping for both the beans "inner" and "outer" in
wsdd file as follows: 
--------
<beanMapping qname="myNS:innerbean" xmlns:myNS="urn:BeanService"
languageSpecificType="java:myprograms.complexdatatype.inner"/>

<beanMapping qname="myNS:outerbean"
xmlns:myNS="urn:BeanService"languageSpecificType="java:myprograms.complexdat
atype.outer"/>
------
 
I have also registered the type mapping in the client
 
-------
call.registerTypeMapping(inner.class, qn,
                      new
org.apache.axis.encoding.ser.BeanSerializerFactory(inner.class, qn),
                      new
org.apache.axis.encoding.ser.BeanDeserializerFactory(inner.class, qn));
 
  call.registerTypeMapping(outer.class, qn1,
                        new
org.apache.axis.encoding.ser.BeanSerializerFactory(outer.class, qn1),
                        new
org.apache.axis.encoding.ser.BeanDeserializerFactory(outer.class, qn1));
--------
 
Am I missing something?
 
regards,
Naresh Agarwal

-----Original Message-----
From: Kai Unewisse [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 6:22 AM
To: [EMAIL PROTECTED]
Subject: AW: Does AXIS provide serializers/deserializers for nested
javabeans?


HI Naresh,
 
You can use the BeanSerializer. 
 
I am doing something similar. I have a Bean containing a Bean and a Vector
of other Beans and it works fine.   
 
Kai


 
Hi
 
Say "inner" and "outer" are two java beans (see below for their definition)
. "outer" bean contains "inner" bean.
 
Now one of my functions return "outer" bean.  I want to expose this function
as Web Service using AXIS. Do I need to write serializer and deserializer
for this OR I can use the AXIS in-built serializer and deserializer.
 
thanks,
 
Naresh Agarwal
 
------------------------------------------------
 
class inner {
 
    private int Data;
    public inner()
 
    public setData(int d) {
        Data = d;
    }
 
    public int getData() {
        return Data;
    }
 
}
 
class outer {
 
    private int Data;
    private inner in;
 
    public outer()
    public setData(int d) {
        Data = d;
    }
 
    public int getData() {
        return Data;
    }
 
    public setInnerBean(inner i { 
        in = i;
    }
 
    public inner getInnerBean() {
        return in;
    }
 
}

<<attachment: winmail.dat>>

Reply via email to