OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

obix-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Send a write request get a error "Cannot translate"


Test code
——————————
ObixSession session = new ObixSession(new Uri("http://192.168.1.102"), "admin", "");
Obj obj = session.read(new Uri("/obix/config/TestPoint/B1"));
System.out.println(obj.getDisplayName());
if(obj.isBool()) {
    System.out.println(obj.getBool());//display false
    obj.setBool(true);
}
obj = session.write(obj);
System.out.println(obj.getDisplayName());


Console message
——————————————
-- Compile: obix.Bool: /obix/def/control:BooleanWritable /obix/def/control:BooleanPoint obix:Point -> obix$0
null
false
<?xml version="1.0" encoding="UTF-8"?>
<err href=""http://192.168.1.102/obix/config/TestPoint/B1/" class="">http://192.168.1.102/obix/config/TestPoint/B1/" display="Cannot translate: &lt;bool href="" href="http://192.168.1.102/obix/config/TestPoint/B1/&#x27" class="">http://192.168.1.102/obix/config/TestPoint/B1/&#x27; val=&#x27;true&#x27; is=&#x27;/obix/def/control:BooleanWritable /obix/def/control:BooleanPoint obix:Point&#x27; display=&#x27;false {ok} @ def&#x27; icon=&#x27;/ord?module://icons/x16/control/booleanPoint.png&#x27; range=&#x27;/obix/config/TestPoint/B1/out/~bool&#x27;&gt;"/>
Exception in thread "main" obix.net.ErrException: Cannot translate: <bool href=''" class="">http://192.168.1.102/obix/config/TestPoint/B1/' val='true' is='/obix/def/control:BooleanWritable /obix/def/control:BooleanPoint obix:Point' display='false {ok} @ def' icon='/ord?module://icons/x16/control/booleanPoint.png' range='/obix/config/TestPoint/B1/out/~bool'>
at obix.net.ObixSession.send(ObixSession.java:435)
at obix.net.ObixSession.write(ObixSession.java:209)
at test.Test.main(Test.java:18)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]