axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Unewisse" <kai.unewi...@innovations.de>
Subject RE:RE: Does AXIS provide serializers/deserializers for nested javabeans?
Date Fri, 13 Jun 2003 07:59:17 GMT
Hi Naresh,

One thing about your Bean classes is, that it should be a public class ...

looks fine, but how looks the variable qn and qn1 ?

My Code looks like :

private QName qn   = new QName("urn:BeanService", "innerbean");
private QName qn1 = new QName("urn:BeanService", "outerbean");


Register ist the same, except I show the package structure :

call.registerTypeMapping(inner.class, qn,
                      new
org.apache.axis.encoding.ser.BeanSerializerFactory(myprograms.complexdatatyp
e.inner.class, qn),
                      new
org.apache.axis.encoding.ser.BeanDeserializerFactory(myprograms.complexdatat
ype.inner.class, qn));

Completly the same :

<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 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?

            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;
          }

      }

Mime
View raw message