I see in the case statement that you do not parse opcode c,g,i these are
used to transmit the data that matches the schema. You will receive one
object with
ID for each object in the broker, and they reference the schema they are
from...
These are the object that you then call on.
Make sense?
Carl.
[EMAIL PROTECTED] wrote:
Hi Carl,
Apropos of our conversation over IRC, I am not able to receive the
method response.
First thing is I am not getting the messages sporadically so not sure
about ObjectID. Please let me know about how to get the objectID.
Secondly, if we send the wrong object ID in the Method Request (AM1M)
we should get this status code: value: 1 description:
STATUS_UNKNOWN_OBJECT - objectId not found in the agent
So I am sending a fake one just to see the Method Response AM1m for
"queue" class (as "purge" method in queue does not have arguments so
in this code snippet there are no arguments). So please in your
example snippet, please include the arguments (please use a different
method such as "echo" of "Broker" class) so by this way I can learn
how we pass the arguments in the Method Request... :)
I am sending this,
SAMPLE CODE:
------------------------------
case 5:
mgtclient.opcode="AM1M";
mgtclient.sequenceNo=1000;
// fake objectID for "queue" package -- long objectID
mgtclient.objectID=786767668779789;
// purge method of queue class, there are no arguments for this method
mgtclient.mathodName=”purge";
// there are no arguments
message.clear();
try {
message.put(mgtclient.opcode.getBytes("UTF-8"));
message.putInt(mgtclient.sequenceNo);
encoder.writeUint64(mgtclient.objectID);
encoder.writeStr8(mgtclient.methodName);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
System.out.println("Query Method Request Sent...");
break;
--------------------
I am intending to receive this atleast..
------------------------ // Method Response
case 'm':
int statusCode = decoder.readUint16();
// should be wrong in case of above method request
// value: 1
//description: STATUS_UNKNOWN_OBJECT - objectId not found in the agent
System.out.println("Status code is" + statusCode);
String statusText= decoder.readStr8();
System.out.println("status Text is" + statusText);
break;
-------------------------
For more information, you can find the Management Client on JIRA 955
(i also attached it with this email for your further consideration).
You will not find the above code sample in that program as I attached
code few days ago.
Your quick help can expedite my work progress over this weekend. Thank
you in advance.
Best Regards,
Rahul