class PayloadRootSmartSoapEndpointInterceptor extends DelegatingSmartSoapEndpointInterceptor {

	@Override
	protected boolean shouldIntercept(WebServiceMessage request, Object endpoint) {
		try {
			QName payloadRootName = PayloadRootUtils.getPayloadRootQName(request.getPayloadSource(), transformerHelper);
			if (payloadRootName == null || !namespaceUri.equals(payloadRootName.getNamespaceURI())) {
				return false;
			}
			return !StringUtils.hasLength(localPart) || localPart.equals(payloadRootName.getLocalPart());

		} catch (TransformerException e) {
			return false;
		}
	}

	public  PayloadRootSmartSoapEndpointInterceptor(EndpointInterceptor delegate, String namespaceUri, String localPart);

}