On Fri, 31 Oct 2003, S�ren Neigaard wrote:
> But somehow this is not engough wheh its the return type of the method
> is a bean with a array of beans inside?? Have you ever done excatly
> this?
I started using axis four days ago, so I am a real newbie :) Here is the
wsdd-entry for one of my test-services:
<service name="Distributor" provider="java:RPC">
<parameter name="className" value="mytest.TestService"/>
<parameter name="allowedMethods" value="getFirstDistributor"/>
<beanMapping qname="myNS:Distributor" xmlns:myNS="urn:BeanService"
languageSpecificType="java:mytes.stubs.IDistributor"/>
<beanMapping qname="myNS:Customer" xmlns:myNS="urn:BeanService"
languageSpecificType="java:mytes.stubs.ICustomer"/>
</service>
The method "getFirstDistributor" returns an object of an class that
implements IDistributor interface. IDistributor contains set&get for an
array of ICustomer objects.
On the client side I manually use Call.registerTypeMapping to map
"Distributor" and "Customer" to client side copies of the IDistributor and
ICustomer.
QName qn = new QName("urn:BeanService", "Distributor");
call.registerTypeMapping(Distributor.class,qn,
new BeanSerializerFactory(Distributor.class, qn),
new BeanDeserializerFactory(Distributor.class, qn));
..and the same for Customer.
It is working, but I do not know if it is the correct way to do things :)
- Tore.