java - Implement ASN.1 description -


i wrote asn.1 description

demo-module definitions ::=       -- module-name definitions ::= begin  begin  clientfirstrequest ::= sequence {                      clientint     integer }          serverfirstresponse ::= sequence {                    serverint    integer ,            serverstring     ia5string    }    clientsecondrequest ::= sequence {                      clientstring     ia5string }      serversecondresponse ::= sequence {                    serverresponse     ia5string }      end                                      -- end of module, end required 

i have code send integer server , work perfectly

dataoutputstream dos = new dataoutputstream(_socket.getoutputstream());  dos.writeint(4); 

but tried use asn.1 classes , have problem, tried following code, have error in setvalue method

clientfirstrequest h = new clientfirstrequest();         h.setvalue(4);         beroutputstream bos = new beroutputstream(_socket.getoutputstream());          h.encode(bos); 

enter image description here

this looks question should ask vendor of asn.1 tool using. each asn.1 tool has own way of going values encoded byte stream though resulting byte stream should same asn.1 tools. have not indicated asn.1 tools using.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -