@PostConstruct
protected synchronized void initConfiguration() {
AbstractBindingBase binding = (AbstractBindingBase)
(clientBinding == null ? serverBinding : clientBinding);
Configuration busCfg = binding.getBus().getConfiguration();
ConfigurationBuilder builder = ConfigurationBuilderFactory.getBuilder();
Configuration parent;
org.objectweb.celtix.ws.addressing.EndpointReferenceType ref =
binding.getEndpointReference();
if (null != clientBinding) {
String id = EndpointReferenceUtils.getServiceName(ref).toString()
+ "/" + EndpointReferenceUtils.getPortName(ref);
parent = builder.getConfiguration(ServiceImpl.PORT_CONFIGURATION_URI,
id, busCfg);
} else {
parent = builder.getConfiguration(EndpointImpl.ENDPOINT_CONFIGURATION_URI, EndpointReferenceUtils
.getServiceName(ref).toString(), busCfg);
}
configuration = builder.getConfiguration(WSA_CONFIGURATION_URI, WSA_CONFIGURATION_ID, parent);
if (null == configuration) {
configuration = builder.buildConfiguration(WSA_CONFIGURATION_URI, WSA_CONFIGURATION_ID, parent);
}
}