I am using Objective System Inc(http://www.obj-sys.com/products/asn1c/index.php) ASN.1 Compiler
and the specification file(cdr_spec.asn) generated Java source code. The CDRS are enecoded based on format BER(Basic Encoding Rule)
Command to generate Java source:
./asn1c cdr_spec.asn -java -ber -reader -print -getset -pkgname com.testpkg
The source is generated:
ASN1C Compiler, Version 6.4.5
Copyright (c) 1997-2011 Objective Systems, Inc. All Rights Reserved.
Registered to: XXXXXX
Parsing ASN.1 definitions..
Generating Java source files for module XXX-XXX..
When I decode the first CDR file, it parses 3 lines only, the CDR file is supposed to contain more than 100 lines, so it is partially decoded.
When I try decoding another CDR file, it is failed when decoding CDR file and gave me such error:
com.objsys.asn1j.runtime.Asn1MissingRequiredException: ASN.1 decode error @ offset 832:
SEQUENCE or SET is missing a required element.
10:11:30.394 [main] ERROR com.testpkg.Test - ASN.1 decode error @ offset 832:
SEQUENCE or SET is missing a required element.
My ASN.1 specification file does not have any syntax error when I use tool checking its syntax.
Can anyone who knows ASN.1 well help me about this?