[SNMP4J] VariableBinding XML serialization not supported

Pavel Orehov pavel.orehov at gmail.com
Mon Jul 2 17:26:21 CEST 2007


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> 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
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
>



More information about the SNMP4J mailing list