Author |
Message
|
crazy4j |
Posted: Mon Apr 18, 2011 7:34 pm Post subject: PCF Inquire Authority Service Required Parameters |
|
|
Newbie
Joined: 18 Apr 2011 Posts: 6
|
I try to get Authority Service information through PCF java api,the following is my code:
Code: |
this.request = new PCFMessage(MQConstants.MQCMD_INQUIRE_AUTH_SERVICE);
this.request.addParameter(MQConstants.MQIACF_AUTH_SERVICE_ATTRS,MQConstants.MQIACF_ALL);
this.responses = agent.send(this.request);
|
but there is an exception MQRCCF_PARM_COUNT_TOO_SMALL:
com.ibm.mq.pcf.PCFException: MQJE001: 完成代码为“2”,原因为“3019”。
at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:241)
at com.crazy4j.monitor.AuthorityService.a(AuthorityService.java:27)
at com.crazy4j.monitor.AuthorityService.main(AuthorityService.java:4
how can I modify my code to get it work fine? thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 19, 2011 2:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The error says that you did not specify a required parameter.
But the documentation says that you specified the only required parameter.
So either it is a bug in the documentation or a bug in the java implementation of the PCF library.
try adding
Code: |
this.request.addParameter(MQConstants.MQCACF_SERVICE_COMPONENT,null); |
That will perform the same action you have requested, and may resolve the issue.
You might have to use an empty string instead of null. |
|
Back to top |
|
 |
crazy4j |
Posted: Tue Apr 19, 2011 8:16 pm Post subject: |
|
|
Newbie
Joined: 18 Apr 2011 Posts: 6
|
thanks mqjeff,I will try latter and post the result. Thanks again~  |
|
Back to top |
|
 |
crazy4j |
Posted: Tue Apr 19, 2011 9:35 pm Post subject: |
|
|
Newbie
Joined: 18 Apr 2011 Posts: 6
|
as you said, i add the following code in my program
Code: |
this.request.addParameter(MQConstants.MQCACF_SERVICE_COMPONENT,"*");
|
nomater the value is "*" , "" or others, there is still the same exception.
e.getLocalizedMessage() = MQJE001: 完成代码为“2”,原因为“3019”。
@Error ResonCode = MQRCCF_PARM_COUNT_TOO_SMALL
com.ibm.mq.pcf.PCFException: MQJE001: 完成代码为“2”,原因为“3019”。
at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:241)
at com.crazy4j.monitor.AuthorityService.a(AuthorityService.java:2
at com.crazy4j.monitor.AuthorityService.main(AuthorityService.java:49) |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 20, 2011 4:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
This seems to be a bug in the PCF libraries, or a failure in documentation.
I'd suggest opening a PMR... |
|
Back to top |
|
 |
crazy4j |
Posted: Sat May 07, 2011 1:46 am Post subject: |
|
|
Newbie
Joined: 18 Apr 2011 Posts: 6
|
mqjeff wrote: |
This seems to be a bug in the PCF libraries, or a failure in documentation.
I'd suggest opening a PMR... |
I do this job as following:
Code: |
this.request = new PCFMessage(MQConstants.MQCMD_INQUIRE_AUTH_SERVICE);
this.request.addParameter(MQConstants.MQIACF_AUTH_SERVICE_ATTRS,
new int[]{MQConstants.MQIACF_INTERFACE_VERSION,MQConstants.MQIACF_USER_ID_SUPPORT});
|
and it works fine now~ thanks for your help~ |
|
Back to top |
|
 |
|