you are correct, turn logging on on the broker. if you request is mull
formed, the error will get logged in the
broker log.
Carl.
[EMAIL PROTECTED] wrote:
Hi Carl,
Thanks for your email.
This is already done over the weekend and left you an offline on IRC. :)
But I am not receiving the Method Response (AM1m) of my Method Request
(AM1M) from the broker. ("this is the main problem")
I have three questions:
1. For method names in the class (e.g. "purge" in the "queue" class)
dont have any argument name so will we just send the method name
"purge" in this case ..in the the Method Request (AM1M).. no argument
2. In the setter methods while translating the attribute (property and
stastic attributes) into MBeans, you mentined that in setMethod() e.g.
setName() for RW (Read/Write).. we will create the AM1M method request
& send to the broker for any change...
But the format of this request is
+-----+-----+-----+-----+-----------------------+
| 'A' | 'M' | '1' | 'M' | seq |
+-----+-----+-----+-----+-----------------------+
| objectId (uint64) |
+-----------------------------------------------+
| methodName (str8) |
+-----------------------------------------------+------------------------+
| input and bidirectional argument values (in schema order) |
+------------------------------------------------------------------------+
What will i pass in the methodName (str8)... for example, we can pass
"purge" in case of "queue" package? What can i pass for setter methods ?
3. Moreover, I dont know how to send the arguments in the Method
Request... so please give me an example (if possible)... it will
really help me.. you can take "echo" method from the "broker" class by
this way I can learn how we pass the arguments in the Method
Request... :)
Thanks in advance. Have a nice time.
BR,
Rahul
On Jul 21 2008, Carl Trieloff wrote:
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