protected void validateWsdl2(HttpSoapProviderMarshaler marshaler) throws
org.apache.woden.WSDLException, IOException, DeploymentException {
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
DescriptionElement descElement = reader.readWSDL(wsdl.getURL().toString());
Description desc = descElement.toComponent();
org.apache.woden.wsdl20.Service svc;
if (getService() != null) {
svc = desc.getService(getService());
if (svc == null) {
throw new DeploymentException("Could not find service '" + getService() + "' in wsdl");
}
} else if (desc.getServices().length == 1) {
svc = desc.getServices()[0];
setService(svc.getName());
} else {
throw new DeploymentException("If service is not set, the WSDL must contain a single service definition");
}
Endpoint endpoint;