tnemrap
(Michael Parment)
December 29, 2016, 7:30pm
1
When I am trying this:
var String message = Door_Lock_Event_En.state.toString
sendHttpGetRequest("http://192.168.192.61:5005/kok/say/" + URLEncoder::encode(message, 'UTF-8') +"/Joanna/50")
I receive this:
The name 'encode(<XFeatureCallImplCustom>,<XStringLiteralImpl>)' cannot be resolved to an item or type.
What is the problem?
/mike
watou
(John Cocula)
December 29, 2016, 7:57pm
2
Do you have
import java.net.URLEncoder
near the top of your .rules file?
1 Like
tnemrap
(Michael Parment)
December 29, 2016, 9:39pm
4
Sorry
I am still receiving this error message.
2016-12-29 22:38:25.112 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule 'Lock Changed': The name '<XIfExpressionImpl> || <XBinaryOperationImplCustom>' cannot be resolved to an item or type.
tnemrap
(Michael Parment)
December 30, 2016, 2:03pm
5
What i want to do is to URLEncode what I have in item Door_Lock_Event_En,
one example is “The SmartLock Huvudentre has been unlocked from the inside.”
Before I send it with sendHttpGetRequest.
/Mike
watou
(John Cocula)
December 30, 2016, 2:08pm
6
We would have to see the rule code that is the cause of this different log message.
tnemrap
(Michael Parment)
December 30, 2016, 4:18pm
7
With this I get it to work.
val urlmessage = URLEncoder::encode(Door_Lock_Event_En.state.toString, 'UTF-8')
sendHttpGetRequest("http://192.168.192.61:5005/kok/say/" + urlmessage +"/Joanna/50")
/Mike
3 Likes
Rene
(Rene Auberger)
November 4, 2023, 7:15pm
8
Although this thread is nearly 7 years old, it just helped me to correctly encode text for a call of Fully Kiosk Browser’s remote admin functions which are invoked via http So thanks for sharing your solution.