serviceMetaData.setWsdlUrl(portAddress.getAddress() + "?wsdl");
}
// add handler chains
for (final HandlerChainData handlerChain : serviceRef.getHandlerChains()) {
final HandlerChainMetaData handlerChainMetaData = new HandlerChainMetaData();
handlerChainMetaData.setServiceNamePattern(handlerChain.getServiceNamePattern());
handlerChainMetaData.setPortNamePattern(handlerChain.getPortNamePattern());
handlerChainMetaData.getProtocolBindings().addAll(handlerChain.getProtocolBindings());
for (final HandlerData handler : handlerChain.getHandlers()) {
final HandlerMetaData handlerMetaData = new HandlerMetaData();
handlerMetaData.setHandlerClass(handler.getHandlerClass().getName());
for (final Method method : handler.getPostConstruct()) {
final CallbackMetaData callbackMetaData = new CallbackMetaData();
callbackMetaData.setClassName(method.getDeclaringClass().getName());
callbackMetaData.setMethod(method.getName());
handlerMetaData.getPostConstruct().add(callbackMetaData);
}
for (final Method method : handler.getPreDestroy()) {
final CallbackMetaData callbackMetaData = new CallbackMetaData();
callbackMetaData.setClassName(method.getDeclaringClass().getName());
callbackMetaData.setMethod(method.getName());
handlerMetaData.getPreDestroy().add(callbackMetaData);
}
handlerChainMetaData.getHandlers().add(handlerMetaData);
}
serviceMetaData.getHandlerChains().add(handlerChainMetaData);
}
// add port refs