wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
WSDLDefinition resolved = null;
try {
resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
} catch (ContributionRuntimeException e) {
ContributionResolveException ce = new ContributionResolveException(e.getCause());
error("ContributionResolveException", wsdlDefinition, ce);
}
if (resolved != null && !resolved.isUnresolved()) {
wsdlDefinition.setDefinition(resolved.getDefinition());
wsdlDefinition.setLocation(resolved.getLocation());
wsdlDefinition.setURI(resolved.getURI());
wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
wsdlDefinition.setUnresolved(false);
WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
if (portType != null) {
// Introspect the WSDL portType and validate
// the input/output messages.
List<OperationImpl> operations = portType.getElement().getOperations();
for (OperationImpl operation : operations) {
if (operation.getInput() != null && operation.getInput().getMessage() == null) {
ContributionResolveException ce = new ContributionResolveException("WSDL binding operation input name " + operation.getInput().getName() + " does not match with PortType Definition");
error("ContributionResolveException", wsdlDefinition, ce);
}
if (operation.getOutput() != null && operation.getOutput().getMessage() == null) {
ContributionResolveException ce = new ContributionResolveException("WSDL binding operation output name " + operation.getOutput().getName() + " does not match with PortType Definition");
error("ContributionResolveException", wsdlDefinition, ce);
}
}
// Introspect the WSDL portType and add the resulting
// WSDLInterface to the resolver
try {
wsdlDefinition.setDefinition(portType.getDefinition());
wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
wsdlInterface.setWsdlDefinition(wsdlDefinition);
resolver.addModel(wsdlInterface);
} catch (ContributionRuntimeException e) {
ContributionResolveException ce = new ContributionResolveException(e.getCause());
error("ContributionResolveException", wsdlDefinition, ce);
} catch (InvalidInterfaceException e) {
ContributionResolveException ce = new ContributionResolveException(e);
error("ContributionResolveException", wsdlDefinition, ce);
//throw ce;
}
}
else {