Search code examples
convertersasn.1decodercdr

Asn.1 development tools, CDR convert to XML using Java


I try to decode CDR file to convert it to XML

I've installed Java Compiler on my PC. I used this link http://www.asnlab.org/asndt/overview.html

I tried to decode my CDR file, but it is not working properly.

It show first 19 records correctly, and then it gives me error, I tried 2 different CDR files. And both of them shows only 19 records.

1st file gives me this error:

Record 20 org.asnlab.asndt.runtime.error.AsnRuntimeException: Can not invoke method 'valueOf()' 794995 at org.asnlab.asndt.runtime.conv.ReflectionEnumeratedConverter.toObject(ed:40) at org.asnlab.asndt.runtime.type.EnumeratedType.I(mc:126) at org.asnlab.asndt.runtime.type.ImplicitType.I(xc:152) at org.asnlab.asndt.runtime.type.SetType.I(gb:191) at org.asnlab.asndt.runtime.type.SetType.I(gb:158) at org.asnlab.asndt.runtime.type.ImplicitType.I(xc:152) at org.asnlab.asndt.runtime.type.ChoiceType.I(hc:183) at org.asnlab.asndt.runtime.type.SequenceType.I(xb:221) at org.asnlab.asndt.runtime.type.SequenceType.I(xb:46) at org.asnlab.asndt.runtime.type.ImplicitType.I(xc:152) at org.asnlab.asndt.runtime.type.AsnType.I(bb:354) at org.asnlab.asndt.runtime.type.ByteBuffer.decode(fc:18) at org.asnlab.asndt.runtime.type.AsnType.decode(bb:338) at Test.main(Test.java:20)

And 2nd file gives me this error:

Record 20 org.asnlab.asndt.runtime.error.InvalidTagException 229505 at org.asnlab.asndt.runtime.type.AsnType.I(bb:369) at org.asnlab.asndt.runtime.type.ByteBuffer.decode(fc:18) at org.asnlab.asndt.runtime.type.AsnType.decode(bb:338) at Test.main(Test.java:20)

I dont understand is it problem with my ASN.1 definition or not?


Solution

  • This question is best asked of the vendor of the ASN.1 Tool you are using. Another possibility is to try other ASN.1 Tools such as one of those listed at the ITU-T ASN.1 Project page (http://www.itu.int/ITU-T/asn1/links/index.htm). There is also the free online ASN.1 Compiler and Encoder/Decoder you could try at http://asn1-playground.oss.com. This free online tool can give you a detailed analysis of your CDR to give you an idea of what is wrong.