While Santiago's need may be different than what I write here, but the need is 
move to ASN.1 specification from encoder code, backwards is rare, but not so 
rare. I've come across situations where people have had to do this to 
reverse-engineer the specification (because the original specification is not 
available -- for whatever reason). This is darn painful though, if you do it 
purely from code, unless you are already pretty familiar with the code. It is 
easier to do this reverse engineering, if you have the ability to sniff the 
packets off the wire, and try decoding by hand... However, my experience is 
limited to BER. With PER, given my extremely limited knowledge of it, decoding 
it without spec is (near) impossible.

Just my 2 cents.

thanks & best regards,
Banibrata Dutta

Telecom Solution Architect
Hewlett-Packard, CMS WW Alliances
Ph: +91 80 25166462 (W) | +91 9972177466 (M) | TZ: GMT+5:30 | Bangalore, India.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lev 
Walkin
Sent: Tuesday, June 09, 2009 8:18 PM
To: Santiago Conde
Cc: [email protected]
Subject: Re: [Asn1] PER encoding of java hierarchy


Tell us what are you trying to achieve?

If you want some interop over sockets, Java has some standard
classes to do that, no ASN.1 is required.

If you are trying to interact with existing ASN.1 based peers, you
should already have a precise definition for the ASN.1 variant used
by the peer.

So I am a bit puzzled by your intention to code PER for the existing
Java classed. What is the real purpose?

Santiago Conde wrote:
> Hi
> 
> Thanks for the suggestions but, if I'm not wrong, the compilers work in such 
> a way that you write the ASN syntax and you get the java classes. 
> 
> My situation is the reverse one. I have a set of java classes and I don't 
> know how to write the ASN syntax. And this is where my ignorance arise; I 
> don't know how to put in ASN form the structure that I already have.
> 
> Anyway, I'll look for some compiler that could help me with this.
> 
> Thanks again
> 
> Santiago Conde
> Senior Programmer
> Kinamik Data Integrity, SL
> c/ Diputació 238, Àtic 5ª
> 08007 Barcelona
> Tel. + 34 931 835 814
> Fax + 34 933 041 681
> 
> -----Original Message-----
> From: Conrad Sigona [mailto:[email protected]] 
> Sent: martes, 09 de junio de 2009 12:50
> To: Santiago Conde
> Cc: [email protected]
> Subject: Re: [Asn1] PER encoding of java hierarchy 
> 
>> I'm a newbie to ASN.1 and I'm trying to do a java implementation using 
>> PER encoding rules.
>>
>> There are several points that I don't completely understand but the 
>> first thing I'd like to get clear is how can I encode objects that 
>> belong to a hierarchy tree.
>>
>> In my understanding I need to code the specific class type somewhere so, 
>> when I deserialize the object, I can use the right instantiation 
>> procedure. Can this be done using a CHOICE element? Would be a SEQUENCE 
>> with some extension marker in it?
>>
>> Sorry if I'm mixing or misunderstaning the way ASN.1 works. Any help 
>> would be greatly appreciated.
> 
> Dear Mr. Conde:
> 
> I presume you are not writing your own ASN.1 syntax, but are working with 
> an existing specification. I also presume that you do not seek to write a 
> general PER encoder, but one specific to the ASN.1 specification you wish 
> to implement.
> 
> If I am right, permit me to suggest that you use an ASN.1 compiler to 
> convert the ASN.1 syntax to Java and which offers a Java API to access the 
> data. You will find free packages and commercial (with license fee) 
> packages. Among the members of this asn1.org group are some people who 
> work for the companies that write ASN.1 compilers. It is, however, against 
> asn1.org policy for us to recommend particular packages.
> _______________________________________________
> Asn1 mailing list
> [email protected]
> http://lists.asn1.org/mailman/listinfo/asn1
> 

_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to