Title: Nachricht
Hi,
 
I have a big problem to work with an bean that hold another beans in an ArrayList.
 
The bean-class looks like this:
 
public class PersonBean {
 
    private String uid;
    private String nachname;
    private String vorname;
    private String geburtsdatum;
    private ArrayList attribut;
    private ArrayList anschrift;
    private ArrayList telefon;
    private ArrayList email;
   
....
 
}
 
attribut, anschrift, telefon and email are another bean-classes. I tried in my test-client to call the service, after I register the serializer and desializer:
 
   QName person = new QName("urn:PersonBeanService", "PersonBean");
            call.registerTypeMapping(PersonBean.class, person,
                    new BeanSerializerFactory(PersonBean.class, person),
                    new BeanDeserializerFactory(PersonBean.class, person));
           
            QName email = new QName("urn:EMailService", "EMail");
            call.registerTypeMapping(EMail.class, email,
                    new BeanSerializerFactory(EMail.class, email),
                    new BeanDeserializerFactory(EMail.class, email));
           
            QName anschrift = new QName("urn:AnschriftService", "Anschrift");
            call.registerTypeMapping(Anschrift.class, anschrift,
                    new BeanSerializerFactory(Anschrift.class, anschrift),
                    new BeanDeserializerFactory(Anschrift.class, anschrift));
           
            QName telefon = new QName("urn:TelefonService", "Telefon");
            call.registerTypeMapping(Telefon.class, telefon,
                    new BeanSerializerFactory(Telefon.class, telefon),
                    new BeanDeserializerFactory(Telefon.class, telefon));
           
            QName attribut = new QName("urn:AttributService", "Attribut");
            call.registerTypeMapping(Attribut.class, attribut,
                    new BeanSerializerFactory(Attribut.class, attribut),
                    new BeanDeserializerFactory(Attribut.class, attribut));
 
and in the deploy-descriptor:
 

<beanMapping qname="myNS:PersonBean" xmlns:myNS="urn:PersonBeanService" languageSpecificType="java:psv.beans.PersonBean"/>

<beanMapping qname="myNS:EMail" xmlns:myNS="urn:EMailService" languageSpecificType="java:psv.beans.EMail"/>

<beanMapping qname="myNS:Telefon" xmlns:myNS="urn:TelefonService" languageSpecificType="java:psv.beans.Telefon"/>

<beanMapping qname="myNS:Anschrift" xmlns:myNS="urn:AnschriftService" languageSpecificType="java:psv.beans.Anschrift"/>

<beanMapping qname="myNS:Attribut" xmlns:myNS="urn:AttributService" languageSpecificType="java:psv.beans.Attribut"/>

 

Before I tried to work with the ArrayLists in my personbean (i tried this, because it should be possible that a person have more than one adress, email, telefon and attributs) it works fine.

Has anybody an idea, how i can get this new personbean containing another beans to work? Or isnĀ“t that case possible to send with one call over the wire? Have I to split my call on the client side in person, adress, telefon, email, attribute and put the parts together on the service-side?

Thanks for your help,
Michael

 

 

 
 

Reply via email to