if (((Contract)contract).getInterfaceContract(wsBinding) == null) {
// can happen if incorrect component service name
fatal(monitor, "MissingInterfaceContract", wsBinding, component.getName(), contract.getName());
}
InterfaceContract icontract = wsBinding.getBindingInterfaceContract();
if (icontract == null) {
icontract = ((Contract)contract).getInterfaceContract(wsBinding).makeUnidirectional(false);
if (icontract instanceof JavaInterfaceContract) {
ModelResolver resolver = component instanceof ResolverExtension ?
((ResolverExtension)component).getModelResolver() : null;
icontract = createWSDLInterfaceContract(
(JavaInterfaceContract)icontract,
requiresSOAP12(wsBinding),
resolver,
dataBindings,
wsdlFactory,
xsdFactory,
monitor);
} else {
try {
//TUSCANY-2316 Cloning the Interface Contract to avoid overriding data binding information
icontract = (InterfaceContract)icontract.clone();
} catch (Exception e) {
//ignore
}
}
wsBinding.setBindingInterfaceContract(icontract);
}
// TODO - fix up the conversational flag and operation sequences in case the contract has come from WSDL
// as we don't yet support requires="conversational" or sca:endConversation annotations
// in WSDL interface descriptions (see section 1.5.4 of the Assembly Specification V1.0)
if (contract.getInterfaceContract().getInterface() != null ) {
icontract.getInterface().setConversational(contract.getInterfaceContract().getInterface().isConversational());
for (Operation operation : icontract.getInterface().getOperations()){
Operation serviceOperation = null;
for (Operation tmpOp : contract.getInterfaceContract().getInterface().getOperations()){
if (operation.getName().equals(tmpOp.getName())) {
serviceOperation = tmpOp;