Search in sources :

Example 16 with ConfigurationWarnings

use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.

the class EchoSender method configure.

public void configure() throws ConfigurationException {
    ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
    String msg = getLogPrefix() + "The class [" + getClass().getName() + "] has been deprecated. Please change to [" + getClass().getSuperclass().getName() + "]";
    configWarnings.add(log, msg);
    super.configure();
}
Also used : ConfigurationWarnings(nl.nn.adapterframework.configuration.ConfigurationWarnings)

Example 17 with ConfigurationWarnings

use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.

the class ExecutePipe method configure.

public void configure() throws ConfigurationException {
    ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
    String msg = getLogPrefix(null) + "The class [" + getClass().getName() + "] has been deprecated. Please change to [" + CommandSender.class.getName() + "]";
    configWarnings.add(log, msg);
    super.configure();
}
Also used : ConfigurationWarnings(nl.nn.adapterframework.configuration.ConfigurationWarnings)

Example 18 with ConfigurationWarnings

use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.

the class FilenameSwitch method configure.

public void configure() throws ConfigurationException {
    super.configure();
    if (getNotFoundForwardName() != null) {
        if (findForward(getNotFoundForwardName()) == null) {
            ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
            String msg = getLogPrefix(null) + "has a notFoundForwardName attribute. However, this forward [" + getNotFoundForwardName() + "] is not configured.";
            configWarnings.add(log, msg);
        }
    }
}
Also used : ConfigurationWarnings(nl.nn.adapterframework.configuration.ConfigurationWarnings)

Example 19 with ConfigurationWarnings

use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.

the class WebServiceListener method configure.

/**
 * initialize listener and register <code>this</code> to the JNDI
 */
public void configure() throws ConfigurationException {
    super.configure();
    if (isSoap()) {
        // ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
        // String msg = ClassUtils.nameOf(this) +"["+getName()+"]: the use of attribute soap=true has been deprecated. Please change to SoapWrapperPipe";
        // configWarnings.add(log, msg);
        soapWrapper = SoapWrapper.getInstance();
    }
    try {
        if (StringUtils.isNotEmpty(getServiceNamespaceURI())) {
            log.debug("registering listener [" + getName() + "] with ServiceDispatcher by serviceNamespaceURI [" + getServiceNamespaceURI() + "]");
            ServiceDispatcher.getInstance().registerServiceClient(getServiceNamespaceURI(), this);
        } else {
            log.debug("registering listener [" + getName() + "] with ServiceDispatcher");
            ServiceDispatcher.getInstance().registerServiceClient(getName(), this);
            if (nag) {
                ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
                String msg = ClassUtils.nameOf(this) + "[" + getName() + "]: calling webservices via de ServiceDispatcher_ServiceProxy is deprecated. Please specify a serviceNamespaceURI and modify the call accordingly";
                configWarnings.add(log, msg);
            }
        }
    } catch (Exception e) {
        throw new ConfigurationException(e);
    }
}
Also used : ConfigurationWarnings(nl.nn.adapterframework.configuration.ConfigurationWarnings) ConfigurationException(nl.nn.adapterframework.configuration.ConfigurationException) ConfigurationException(nl.nn.adapterframework.configuration.ConfigurationException) ListenerException(nl.nn.adapterframework.core.ListenerException)

Example 20 with ConfigurationWarnings

use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.

the class BisWrapperPipe method configure.

public void configure() throws ConfigurationException {
    ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
    String msg = getLogPrefix(null) + "The class [" + getClass().getName() + "] has been deprecated. Please change to EsbSoapWrapperPipe (not 1:1)";
    configWarnings.add(log, msg);
    super.configure();
    if (StringUtils.isNotEmpty(getSoapHeaderSessionKey())) {
        throw new ConfigurationException(getLogPrefix(null) + "soapHeaderSessionKey is not allowed");
    }
    if (StringUtils.isEmpty(getBisMessageHeaderSessionKey())) {
        throw new ConfigurationException(getLogPrefix(null) + "messageHeaderSessionKey must be set");
    }
    if (isAddOutputNamespace() && StringUtils.isEmpty(outputNamespace)) {
        throw new ConfigurationException(getLogPrefix(null) + "outputNamespace must be set when addOutputnamespace=true");
    }
    try {
        if (StringUtils.isNotEmpty(getInputXPath())) {
            String bodyMessageNd = StringUtils.isNotEmpty(getInputNamespaceDefs()) ? soapNamespaceDefs + "\n" + getInputNamespaceDefs() : soapNamespaceDefs;
            String bodyMessageXe = StringUtils.isNotEmpty(getInputXPath()) ? soapBodyXPath + "/" + getInputXPath() : soapBodyXPath + "/*";
            bodyMessageTp = TransformerPool.getInstance(XmlUtils.createXPathEvaluatorSource(bodyMessageNd, bodyMessageXe, "xml"));
        }
        String bisMessageHeaderNd = soapNamespaceDefs + "\n" + bisNamespaceDefs;
        String bisMessageHeaderXe;
        if (isBisMessageHeaderInSoapBody()) {
            bisMessageHeaderXe = soapBodyXPath + "/" + bisMessageHeaderXPath;
        } else {
            bisMessageHeaderXe = soapHeaderXPath + "/" + bisMessageHeaderXPath;
        }
        bisMessageHeaderTp = TransformerPool.getInstance(XmlUtils.createXPathEvaluatorSource(bisMessageHeaderNd, bisMessageHeaderXe, "xml"));
        bisMessageHeaderConversationIdTp = TransformerPool.getInstance(XmlUtils.createXPathEvaluatorSource(bisNamespaceDefs, bisMessageHeaderConversationIdXPath, "text"));
        bisMessageHeaderExternalRefToMessageIdTp = TransformerPool.getInstance(XmlUtils.createXPathEvaluatorSource(bisNamespaceDefs, bisMessageHeaderExternalRefToMessageIdXPath, "text"));
        String bisErrorNd = soapNamespaceDefs + "\n" + bisNamespaceDefs;
        if (isBisResultInPayload()) {
            bisErrorXe = soapBodyXPath + "/*/" + bisErrorXPath;
        } else {
            bisErrorXe = soapBodyXPath + "/" + bisErrorXPath;
        }
        bisErrorXe = bisErrorXe + " or string-length(" + soapBodyXPath + "/" + soapErrorXPath + ")&gt;0";
        bisErrorTp = TransformerPool.getInstance(XmlUtils.createXPathEvaluatorSource(bisErrorNd, bisErrorXe, "text"));
        if (isRemoveOutputNamespaces()) {
            String removeOutputNamespaces_xslt = XmlUtils.makeRemoveNamespacesXslt(true, false);
            removeOutputNamespacesTp = TransformerPool.getInstance(removeOutputNamespaces_xslt);
        }
        if (isAddOutputNamespace()) {
            String addOutputNamespace_xslt = XmlUtils.makeAddRootNamespaceXslt(getOutputNamespace(), true, false);
            addOutputNamespaceTp = TransformerPool.getInstance(addOutputNamespace_xslt);
        }
    } catch (TransformerConfigurationException e) {
        throw new ConfigurationException(getLogPrefix(null) + "cannot create transformer", e);
    }
}
Also used : ConfigurationWarnings(nl.nn.adapterframework.configuration.ConfigurationWarnings) TransformerConfigurationException(javax.xml.transform.TransformerConfigurationException) TransformerConfigurationException(javax.xml.transform.TransformerConfigurationException) ConfigurationException(nl.nn.adapterframework.configuration.ConfigurationException)

Aggregations

ConfigurationWarnings (nl.nn.adapterframework.configuration.ConfigurationWarnings)58 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)16 TransformerConfigurationException (javax.xml.transform.TransformerConfigurationException)5 ArrayList (java.util.ArrayList)4 ITransactionalStorage (nl.nn.adapterframework.core.ITransactionalStorage)3 PipeForward (nl.nn.adapterframework.core.PipeForward)3 ReceiverBase (nl.nn.adapterframework.receivers.ReceiverBase)3 URL (java.net.URL)2 BaseConfigurationWarnings (nl.nn.adapterframework.configuration.BaseConfigurationWarnings)2 Configuration (nl.nn.adapterframework.configuration.Configuration)2 HasPhysicalDestination (nl.nn.adapterframework.core.HasPhysicalDestination)2 ISender (nl.nn.adapterframework.core.ISender)2 EsbSoapWrapperPipe (nl.nn.adapterframework.extensions.esb.EsbSoapWrapperPipe)2 IOException (java.io.IOException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Connection (java.sql.Connection)1 DatabaseMetaData (java.sql.DatabaseMetaData)1 SQLException (java.sql.SQLException)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1