String op1name = op1.getName().getLocalPart();
String intf1name = op1.getWsdlInterface().getName().toString();
String op2name = op2.getName().getLocalPart();
String intf2name = op2.getWsdlInterface().getName().toString();
if(op1name.equals(op2name) == false)
throw new JBossWSToolsException(op1name + " does not match with " + op2name);
if( intf1name.equals(intf2name) == false)
throw new JBossWSToolsException(intf1name + " does not match with " + intf2name);
WSDLInterfaceOperationInput[] inputs1 = op1.getInputs();
WSDLInterfaceOperationInput[] inputs2 = op2.getInputs();
int lenin1 = inputs1.length;
for (int i = 0; i < lenin1; i++)
{
WSDLInterfaceOperationInput input1 = inputs1[i];
WSDLInterfaceOperationInput input2 = inputs2[i];
if(validateInputParts(input1, input2) == false)
throw new JBossWSToolsException("Validation of input parts failed:" + input1.getElement());
}
//Now the return type
WSDLInterfaceOperationOutput[] outputs1 = op1.getOutputs();
WSDLInterfaceOperationOutput[] outputs2 = op2.getOutputs();
int lenout = outputs1.length;
if(lenout != outputs2.length)
throw new JBossWSToolsException("Length of operation outputs do not match");
for (int i = 0; i < lenout; i++)
{
WSDLInterfaceOperationOutput out1 = outputs1[i];
WSDLInterfaceOperationOutput out2 = outputs2[i];
if(validateOutputParts(out1, out2) == false)
throw new JBossWSToolsException("Validation of output parts failed:" + out1);
}
return true;
}