It looks quite perfect, though you can probably simplify and avoid
checking a super-class, unless you can also have for example multiple
PUT operations with intersecting path values or some complex Consumes
expressions...
re returning 0: means you don't mind which method will be selected which
is not your case, but yes, you can default to 0
Cheers, Sergey
On 29/07/13 14:01, John Baker wrote:
This appears to be the answer:
// Check if CXF can make a decision
int cxfResult= super.compare(oper1, oper2);
if (cxfResult != 0)
return cxfResult;
Int result = 0;
String s = … message body.
String target= null;
if (s.startsWith(“banana”))
target= "updateFruit";
else if (s.startsWith(“dog”))
target= "updateAnimal";
if (target!=null) {
if (m1.equals(m2) && m1.equals(target))
result = 0;
else if (m1.equals(target))
result= -1;
else if (m2.equals(target))
result= 1;
else
result= m1.compareTo(m2);
}
return result;