URL wsdlUrl = getServiceDescriptionImpl().getGeneratedWsdlWrapper().getWSDLLocation();
if (def instanceof WSDLDefinitionWrapper) {
wsdlDefParameter.setValue(def);
} else {
// Create WSDLDefinitionWrapper
WSDLDefinitionWrapper wrap = null;
ConfigurationContext cc = composite.getConfigurationContext();
if (cc != null && cc.getAxisConfiguration() != null) {
wrap = new WSDLDefinitionWrapper(def, wsdlUrl,
cc.getAxisConfiguration());
} else {
// Probably shouldn't get here. But if we do, use
// a memory sensitve wsdl wrapper
wrap = new WSDLDefinitionWrapper(def, wsdlUrl, true, 2);
}
wsdlDefParameter.setValue(wrap);
}
} else if (getServiceDescriptionImpl().getWSDLWrapper() != null) {
//No wsdl composite because wsdl already exists
wsdlLocationParameter.setValue(getAnnoWebServiceWSDLLocation());
Definition def = getServiceDescriptionImpl().getWSDLWrapper().getDefinition();
URL wsdlUrl = getServiceDescriptionImpl().getWSDLWrapper().getWSDLLocation();
if (def instanceof WSDLDefinitionWrapper) {
wsdlDefParameter.setValue(def);
} else {
// Create WSDLDefinitionWrapper
WSDLDefinitionWrapper wrap = null;
ConfigurationContext cc = composite.getConfigurationContext();
if (cc != null && cc.getAxisConfiguration() != null) {
wrap = new WSDLDefinitionWrapper(def, wsdlUrl,
cc.getAxisConfiguration());
} else {
// Probably shouldn't get here. But if we do, use
// a memory sensitve wsdl wrapper
wrap = new WSDLDefinitionWrapper(def, wsdlUrl, true, 2);
}
wsdlDefParameter.setValue(wrap);
}
} else {
//There is no wsdl composite and there is NOT a wsdl definition
wsdlLocationParameter.setValue(null);
wsdlDefParameter.setValue(null);
}
try {
if (wsdlComposite != null) {
axisService.addParameter(wsdlCompositeParameter);
}
axisService.addParameter(wsdlDefParameter);
axisService.addParameter(wsdlLocationParameter);
} catch (Exception e) {
throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr4"));
}
}
else {
// Need to account for SOAP 1.2 WSDL when supplied with application
Parameter wsdlDefParameter = new Parameter();
wsdlDefParameter.setName(MDQConstants.WSDL_DEFINITION);
Parameter wsdlLocationParameter = new Parameter();
wsdlLocationParameter.setName(MDQConstants.WSDL_LOCATION);
if (getServiceDescriptionImpl().getWSDLWrapper() != null) {
wsdlLocationParameter.setValue(getAnnoWebServiceWSDLLocation());
Definition def = getServiceDescriptionImpl().getWSDLWrapper().getDefinition();
URL wsdlUrl = getServiceDescriptionImpl().getWSDLWrapper().getWSDLLocation();
if (def instanceof WSDLDefinitionWrapper) {
wsdlDefParameter.setValue(def);
} else {
// Create WSDLDefinitionWrapper
WSDLDefinitionWrapper wrap = null;
ConfigurationContext cc = composite.getConfigurationContext();
if (cc != null && cc.getAxisConfiguration() != null) {
wrap = new WSDLDefinitionWrapper(def, wsdlUrl,
cc.getAxisConfiguration());
} else {
// Probably shouldn't get here. But if we do, use
// a memory sensitve wsdl wrapper
wrap = new WSDLDefinitionWrapper(def, wsdlUrl, true, 2);
}
wsdlDefParameter.setValue(wrap);
}
}
// No WSDL supplied and we do not generate for non-SOAP 1.1/HTTP