Quantcast
Channel: VMware Communities: Message List - vSphere Management SDK
Viewing all articles
Browse latest Browse all 2052

The variable String of the fault message in customized task can not be substituted in web client 5.1

$
0
0

I registered a customized Task to my web client Extension with the task id: com.test.my_task.

After that, I also registered the Extension Fault for this Task, the content of the fault.vmsg is as below:

com.test.my_fault.summary = " This is a test fault message for task,detail: {data.message}".

 

To use this customized task and fault, I called the API setTaskState():

VimPortType.setTaskState(task, TaskInfoState.ERROR, null, localizedMethodFault);

the param "task" is ManagedObjectRefrence of the Task, and the content of the param "localizedMethodFault" is as below:

 

LocalizedMethodFault localizedMethodFault = new LocalizedMethodFault();

ExtendedFault extendedFault = new ExtendedFault();

KeyValue keyValue = new KeyValue();

keyValue.setKey("message");

keyValue.setValue("the detail message for test");

extendedFault.getData().add(keyValue);

extendedFault.setFaultTypeId("com.test.my_fault");

localizedMethodFault.setFault(extendedFault);

 

Then I do a test in web client 5.1, 5.5 and 6.0, the results is:

In the web client 5.5 and 6.0, my customized Task and Fault message show up in the Task Console,and the String {data.message} is replaced by "the detail message for test".

But in the web client 5.1, the String {data.message} of the customized Fault message is not be replaced.

 

The API is vSphere Management SDK 5.1.

 

Could anyone help me solve this confused problem?

 

Thank you very much


Viewing all articles
Browse latest Browse all 2052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>