How to execute Overloaded operations?
simonmd opened this issue · 3 comments
Hi
I've been able to execute operations that take no arguments, eg:
http://10.0.1.11:8080/jolokia/exec/dcm4chee.archive:name=MoveScu,service=Queue/listAllMessages()
and with one argument:
But I am unable to call the operation if it takes more than one argument. I get:
{"error_type"=>"java.lang.IllegalArgumentException", "error"=>"java.lang.IllegalArgumentException : Operation echo on MBean dcm4chee.archive:service=ECHOService is overloaded. Signatures found: (java.lang.String),(java.lang.String),(java.lang.String,java.lang.Integer), (org.dcm4chex.archive.ejb.interfaces.AEDTO,java.lang.Integer), (java.lang.String,java.lang.String,int,java.lang.String,int). Use a signature when specifying the operation."
What would be the correct way to call this operation?
Many thanks!
MBEAN_NAME = ... # Your MBean name
attr_values = ... # Your values of the arguments
signatures = [
'java.lang.String',
'java.lang.String',
'int',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'java.lang.String',
'boolean',
'boolean'
]
jolokia.execute(MBEAN_NAME,
"addAE(#{signatures.join(',')})",
attr_values)
I have seen that you try to implements apis for dcm4chee. I implemented one before but it has not been open source yet. If you have interest in my one and have time to help me on it. I am very glad to give you an account for it.
Cool! My Ruby skills are limited, but I'll be glad to contribute any way I can.
I've created an account for you on my private gitlab server. You will receive an email from it.
You can visit it directly from http://gitlab.menglifang.org/stepping-stones/dcm4chee.
BTW, the comments of dcm4chee are written in Chinese, I will rewrite them in English in the next few days.