I found the solution - at least it worked for me
it looks something like this
1) When the extension is registerd, create a Fault resource for "myFaultType";
When the task should fail - use the ExtendedFault -->
ExtendedFault extendedFault = new ExtendedFault();
LocalizedMethodFault localizedMethodFault = new LocalizedMethodFault();
vimPort.setTaskState(taskInfo.getTask(), TaskInfoState.ERROR, null, localizedMethodFault);
so that seems to work
Could someone verify this - or should it be done another way?
The way you have done is correct, i usually does this..
LocalizedMethodFault fault = new LocalizedMethodFault();
ManagedObjectNotFound monf = new ManagedObjectNotFound();
task.setTaskState(taskInfo.getTask(), TaskInfoState.ERROR, null, fault)