wsdlLoc = WSDLUtil.appendWSDLQuary(this.gfacURL);
}
if (wsdlLoc == null) {
String message = "The location of the Generic Factory is not specified.";
throw new XBayaException(message);
}
if(!wsdlLoc.startsWith("https")){
throw new XBayaException("The GFac url is expected to support https but got:"+wsdlLoc);
}
try {
this.creator = new SecureGFacCreator(wsdlLoc, this.secureInvoker);
} catch (URISyntaxException e) {
String message = "The location of the Generic Factory is in a wrong format";
this.notifier.invocationFailed(message, e);
throw new XBayaException(message, e);
}
if (this.creator == null) {
String message = "Cannot find the location of the Generic Factory in the WSDL";
throw new XBayaException(message);
}
if (this.portTypeQName == null) {
try {
Iterable portTypes = this.abstractDefinitions.getPortTypes();
WsdlPortType portType = (WsdlPortType) portTypes.iterator()
.next();
String portTypeName = portType.getPortTypeName();
String targetNamespace = this.abstractDefinitions
.getTargetNamespace();
this.portTypeQName = new QName(targetNamespace, portTypeName);
} catch (RuntimeException e) {
String message = "Error in finding QName of the service in the WSDL";
this.notifier.invocationFailed(message, e);
throw new XBayaException(message, e);
}
}
invokableWSDL = this.creator
.createService(this.portTypeQName);