parserContext.pushContainingComponent(compDefinition);
List<Element> childElements = DomUtils.getChildElements(element);
for (Element childElement : childElements) {
if ("bean".equals(childElement.getLocalName())) {
RootBeanDefinition smartInterceptorDef =
createSmartInterceptorDefinition(DelegatingSmartSoapEndpointInterceptor.class, childElement,
parserContext);
BeanDefinitionHolder interceptorDef = createInterceptorDefinition(parserContext, childElement);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(0, interceptorDef);
registerSmartInterceptor(parserContext, smartInterceptorDef);
}
else if ("ref".equals(childElement.getLocalName())) {
RootBeanDefinition smartInterceptorDef =
createSmartInterceptorDefinition(DelegatingSmartSoapEndpointInterceptor.class, childElement,
parserContext);
BeanReference interceptorRef = createInterceptorReference(parserContext, childElement);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(0, interceptorRef);
registerSmartInterceptor(parserContext, smartInterceptorDef);
}
else if ("payloadRoot".equals(childElement.getLocalName())) {
List<Element> payloadRootChildren = DomUtils.getChildElements(childElement);
for (Element payloadRootChild : payloadRootChildren) {
if ("bean".equals(payloadRootChild.getLocalName())) {
RootBeanDefinition smartInterceptorDef =
createSmartInterceptorDefinition(PayloadRootSmartSoapEndpointInterceptor.class,
childElement, parserContext);
BeanDefinitionHolder interceptorDef =
createInterceptorDefinition(parserContext, payloadRootChild);
String namespaceUri = childElement.getAttribute("namespaceUri");
String localPart = childElement.getAttribute("localPart");
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(0, interceptorDef);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(1, namespaceUri);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(2, localPart);
registerSmartInterceptor(parserContext, smartInterceptorDef);
}
else if ("ref".equals(payloadRootChild.getLocalName())) {
RootBeanDefinition smartInterceptorDef =
createSmartInterceptorDefinition(PayloadRootSmartSoapEndpointInterceptor.class,
childElement, parserContext);
BeanReference interceptorRef = createInterceptorReference(parserContext, payloadRootChild);
String namespaceUri = childElement.getAttribute("namespaceUri");
String localPart = childElement.getAttribute("localPart");
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(0, interceptorRef);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(1, namespaceUri);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(2, localPart);
registerSmartInterceptor(parserContext, smartInterceptorDef);
}
}
}
else if ("soapAction".equals(childElement.getLocalName())) {
List<Element> soapActionChildren = DomUtils.getChildElements(childElement);
for (Element soapActionChild : soapActionChildren) {
if ("bean".equals(soapActionChild.getLocalName())) {
RootBeanDefinition smartInterceptorDef =
createSmartInterceptorDefinition(SoapActionSmartEndpointInterceptor.class, childElement,
parserContext);
BeanDefinitionHolder interceptorDef =
createInterceptorDefinition(parserContext, soapActionChild);
String soapAction = childElement.getAttribute("value");
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(0, interceptorDef);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(1, soapAction);
registerSmartInterceptor(parserContext, smartInterceptorDef);
}
else if ("ref".equals(soapActionChild.getLocalName())) {
RootBeanDefinition smartInterceptorDef =
createSmartInterceptorDefinition(SoapActionSmartEndpointInterceptor.class, childElement,
parserContext);
BeanReference interceptorRef = createInterceptorReference(parserContext, soapActionChild);
String soapAction = childElement.getAttribute("value");
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(0, interceptorRef);
smartInterceptorDef.getConstructorArgumentValues().addIndexedArgumentValue(1, soapAction);
registerSmartInterceptor(parserContext, smartInterceptorDef);
}
}
}