[SNMP4J] VariableBinding XML serialization not supported
Frank Fock
fock at agentpp.com
Mon Jul 2 18:59:29 CEST 2007
Hi Pavel,
Not exposing the internal Vector was a purposive
decision. In SNMP4J for example, the Vector will
be replaced by an ArrayList generic.
To serialize and deserialize a PDU using the
XMLEncode/Decoder, you can write appropriate
delegators as suggested by
http://java.sun.com/products/jfc/tsc/articles/persistence4
Best regards,
Frank
Pavel Orehov wrote:
> Hi,
>
> I am talking about java.beans.XMLDecoder.
>
> I am trying to serialize PDU and not all field serialized because not
> all fields have getter and setter public functions. For example in PDU
> class there is a variableBindings Vector member that has only getter and
> NOT setter. Since that XMLDecoder can't serialize this member. After I
> added the setter everything works fine, but I should to change the
> snmp4j source code.
>
> I think that all fields that exposed in toString functions should also
> be exposed for serialization - be public or have public getter and setter.
>
>
>
> Thanks,
> Pavel
>
>
>
> On 7/2/07, *Frank Fock* <fock at agentpp.com <mailto:fock at agentpp.com>> wrote:
>
> Hi Pavel,
>
> I guess you are talking about JDK XML serialization, right?
> Then it is a problem of that serialization feature.
> VariableBinding implements Serializable and that is all
> we can do.
>
> Best regards,
> Frank
>
> Pavel Orehov wrote:
> > Hi,
> >
> > I am working with snmp4j 1.8.2 version and I get an error message
> when
> > trying to serialize PDUv1 to XML - "OperationNotSupported for
> SNMPv1 PDUs
> > Continuing ...". However I see that PDU is serialized without
> > VariableBinding[]. So I understand that VariableBinding[] not
> supported for
> > XMl serialization.
> >
> > Are you planning to add this feature for full XML serialization
> if PDU ?
> >
> > If not why ? Is there are some difficult problems that I don't
> see now ?
> >
> > Thanks,
> > Pavel
> > _______________________________________________
> > SNMP4J mailing list
> > SNMP4J at agentpp.org <mailto:SNMP4J at agentpp.org>
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
>
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list