try {
providerHandler = WSDDProvider.getInstance(providerQName,
this,
registry);
} catch (Exception e) {
throw new ConfigurationException(e);
}
if (providerHandler == null)
throw new WSDDException(
Messages.getMessage("couldntConstructProvider00"));
}
Handler respHandler = null;
WSDDChain response = getResponseFlow();
if (response != null) {
respHandler = response.getInstance(registry);
}
SOAPService service = new SOAPService(reqHandler, providerHandler,
respHandler);
service.setStyle(style);
service.setUse(use);
service.setHighFidelityRecording(!streaming);
service.setSendType(sendType);
if ( getQName() != null )
service.setName(getQName().getLocalPart());
service.setOptions(getParametersTable());
service.setEngine(((WSDDDeployment)registry).getEngine());
if (use != Use.ENCODED) {
// If not encoded, turn off multi-refs and prefer
// not to sent xsi:type and xsi:nil
service.setOption(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
service.setOption(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
}
// Set handlerInfoChain
if (_wsddHIchain != null) {
HandlerInfoChainFactory hiChainFactory = _wsddHIchain.getHandlerChainFactory();
service.setOption(Constants.ATTR_HANDLERINFOCHAIN, hiChainFactory);
}
AxisEngine.normaliseOptions(service);
tmr.delegate(registry.getTypeMappingRegistry());
WSDDFaultFlow [] faultFlows = getFaultFlows();
if (faultFlows != null && faultFlows.length > 0) {
FaultableHandler wrapper = new FaultableHandler(service);
for (int i = 0; i < faultFlows.length; i++) {
WSDDFaultFlow flow = faultFlows[i];
Handler faultHandler = flow.getInstance(registry);
wrapper.setOption("fault-" + flow.getQName().getLocalPart(),
faultHandler);
}
}
service.setServiceDescription(desc);
try {
service.getInitializedServiceDesc(MessageContext.getCurrentContext());
} catch (AxisFault axisFault) {
throw new ConfigurationException(axisFault);
}
cachedService = service;
return service;
}