4 Replies Latest reply on Oct 17, 2002 11:40 AM by gernot

    Bean mapping with  javabean inside a javabean

    Oriol Newbie

      Hello everybody!

      I'm working with jboss 3.2.0 and I have a problem with a deserialization of a javabean. My javaBean has an other javabean inside. The exception in the client is:

      [java] (client.Call ? ) Exception:
      [java] java.lang.NullPointerException
      [java] at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Un
      own Source)
      [java] at org.apache.axis.encoding.DeserializationContextImpl.startElem
      t(Unknown Source)
      [java] java.lang.NullPointerException
      [java] at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Sour
      )
      [java] at org.apache.axis.message.MessageElement.publishToHandler(Unkno
      Source)
      [java] at org.apache.axis.encoding.DeserializerImpl.startElement(Unknow
      Source)
      [java] at org.apache.axis.encoding.DeserializationContextImpl.startElem
      t(Unknown Source)
      [java] at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Sour
      )
      [java] at org.apache.axis.message.MessageElement.publishToHandler(Unkno
      Source)
      [java] at org.apache.axis.encoding.DeserializerImpl.startElement(Unknow
      Source)
      [java] at org.apache.axis.encoding.DeserializationContextImpl.startElem
      t(Unknown Source)
      [java] at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Sour
      )
      [java] at org.apache.axis.message.MessageElement.publishToHandler(Unkno
      Source)
      [java] at org.apache.axis.message.RPCElement.deserialize(Unknown Source

      [java] at org.apache.axis.message.RPCElement.getParams(Unknown Source)
      [java] at org.apache.axis.client.Call.invoke(Unknown Source)
      [java] at org.apache.axis.client.Call.invoke(Unknown Source)
      [java] at org.apache.axis.client.Call.invoke(Unknown Source)
      [java] at hero.client.soap.SoapClient.main(SoapClient.java:70)

      This is my registration of type mapping:

      QName qn = new QName( "urn:Bean", "UserLightValue" );
      QName pk = new QName( "urn:Bean", "UserPK" );
      call.registerTypeMapping(UserLightValue.class, qn,
      new org.apache.axis.encoding.ser.BeanSerializerFactory(UserLightValue.class, qn),
      new org.apache.axis.encoding.ser.BeanDeserializerFactory(UserLightValue.class, qn));
      call.registerTypeMapping(UserPK.class, pk,
      new org.apache.axis.encoding.ser.BeanSerializerFactory(UserPK.class, pk),
      new org.apache.axis.encoding.ser.BeanDeserializerFactory(UserPK.class, pk));



      Thanks