Search in sources :

Example 1 with XmlValidator

use of nl.nn.adapterframework.pipes.XmlValidator in project iaf by ibissource.

the class WsdlTest method includeXsdInWsdlMixed.

@Test
public void includeXsdInWsdlMixed() throws XMLStreamException, IOException, ParserConfigurationException, SAXException, ConfigurationException, URISyntaxException, NamingException {
    XmlValidator inputValidator = getXmlValidatorInstance("a", "b", "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd");
    IPipe outputValidator = inputValidator.getResponseValidator();
    PipeLine simple = mockPipeLine(inputValidator, outputValidator, "urn:webservice1", "IncludeXsds");
    Wsdl wsdl = new Wsdl(simple);
    wsdl.setUseIncludes(true);
    wsdl.init();
    test(wsdl, "WsdlTest/includexsds.test.wsdl");
}
Also used : XmlValidator(nl.nn.adapterframework.pipes.XmlValidator) AbstractXmlValidator(nl.nn.adapterframework.validation.AbstractXmlValidator) XercesXmlValidator(nl.nn.adapterframework.validation.XercesXmlValidator) JavaxXmlValidator(nl.nn.adapterframework.validation.JavaxXmlValidator) PipeLine(nl.nn.adapterframework.core.PipeLine) IPipe(nl.nn.adapterframework.core.IPipe) XmlValidatorTest(nl.nn.adapterframework.pipes.XmlValidatorTest) Test(org.junit.Test)

Example 2 with XmlValidator

use of nl.nn.adapterframework.pipes.XmlValidator in project iaf by ibissource.

the class WsdlTest method getXmlValidatorInstance.

protected XmlValidator getXmlValidatorInstance(String rootTag, String responseRootTag, String schema, String schemaLocation) throws ConfigurationException {
    XmlValidator validator = XmlValidatorTest.getUnconfiguredValidator(schemaLocation, implementation);
    validator.setSchema(schema);
    validator.setRoot(rootTag);
    if (responseRootTag != null) {
        validator.setResponseRoot(responseRootTag);
    }
    return validator;
}
Also used : XmlValidator(nl.nn.adapterframework.pipes.XmlValidator) AbstractXmlValidator(nl.nn.adapterframework.validation.AbstractXmlValidator) XercesXmlValidator(nl.nn.adapterframework.validation.XercesXmlValidator) JavaxXmlValidator(nl.nn.adapterframework.validation.JavaxXmlValidator)

Example 3 with XmlValidator

use of nl.nn.adapterframework.pipes.XmlValidator in project iaf by ibissource.

the class WsdlTest method noroottagMixed.

@Test
public void noroottagMixed() throws XMLStreamException, IOException, SAXException, ParserConfigurationException, URISyntaxException, ConfigurationException, NamingException {
    XmlValidator inputValidator = getXmlValidatorInstance(null, "b", "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd");
    IPipe outputValidator = inputValidator.getResponseValidator();
    PipeLine simple = mockPipeLine(inputValidator, outputValidator, "urn:webservice1", "TestRootTag");
    Wsdl wsdl = new Wsdl(simple);
    wsdl.init();
    test(wsdl, "WsdlTest/noroottag.test.wsdl");
}
Also used : XmlValidator(nl.nn.adapterframework.pipes.XmlValidator) AbstractXmlValidator(nl.nn.adapterframework.validation.AbstractXmlValidator) XercesXmlValidator(nl.nn.adapterframework.validation.XercesXmlValidator) JavaxXmlValidator(nl.nn.adapterframework.validation.JavaxXmlValidator) PipeLine(nl.nn.adapterframework.core.PipeLine) IPipe(nl.nn.adapterframework.core.IPipe) XmlValidatorTest(nl.nn.adapterframework.pipes.XmlValidatorTest) Test(org.junit.Test)

Example 4 with XmlValidator

use of nl.nn.adapterframework.pipes.XmlValidator in project iaf by ibissource.

the class SoapValidatorTest method validate11.

@Test
public void validate11() throws ConfigurationException, IOException, PipeRunException {
    XmlValidator xml = getSoapValidator(true);
    xml.doPipe(getTestXml("/SoapValidator/valid_soap.xml"), new PipeLineSessionBase());
}
Also used : XmlValidator(nl.nn.adapterframework.pipes.XmlValidator) PipeLineSessionBase(nl.nn.adapterframework.core.PipeLineSessionBase) Test(org.junit.Test)

Example 5 with XmlValidator

use of nl.nn.adapterframework.pipes.XmlValidator in project iaf by ibissource.

the class WsdlTest method wubCalculateQuoteAndPolicyValuesLifeRetailMixed.

@Test
public void wubCalculateQuoteAndPolicyValuesLifeRetailMixed() throws XMLStreamException, IOException, SAXException, ParserConfigurationException, URISyntaxException, ConfigurationException, NamingException {
    XmlValidator inputValidator = getXmlValidatorInstance("CalculationRequest", "CalculationResponse", null, "http://wub2nn.nn.nl/CalculateQuoteAndPolicyValuesLifeRetail WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail/xsd/CalculationRequestv2.1.xsd " + "http://wub2nn.nn.nl/CalculateQuoteAndPolicyValuesLifeRetail_response  WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail/xsd/CalculationRespons.xsd");
    IPipe outputValidator = inputValidator.getResponseValidator();
    PipeLine pipe = mockPipeLine(inputValidator, outputValidator, "http://wub2nn.nn.nl/CalculateQuoteAndPolicyValuesLifeRetail", "WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail");
    Wsdl wsdl = new Wsdl(pipe);
    wsdl.init();
    wsdl.setUseIncludes(true);
    test(wsdl, "WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail.test.wsdl");
}
Also used : XmlValidator(nl.nn.adapterframework.pipes.XmlValidator) AbstractXmlValidator(nl.nn.adapterframework.validation.AbstractXmlValidator) XercesXmlValidator(nl.nn.adapterframework.validation.XercesXmlValidator) JavaxXmlValidator(nl.nn.adapterframework.validation.JavaxXmlValidator) PipeLine(nl.nn.adapterframework.core.PipeLine) IPipe(nl.nn.adapterframework.core.IPipe) XmlValidatorTest(nl.nn.adapterframework.pipes.XmlValidatorTest) Test(org.junit.Test)

Aggregations

XmlValidator (nl.nn.adapterframework.pipes.XmlValidator)7 AbstractXmlValidator (nl.nn.adapterframework.validation.AbstractXmlValidator)6 JavaxXmlValidator (nl.nn.adapterframework.validation.JavaxXmlValidator)6 XercesXmlValidator (nl.nn.adapterframework.validation.XercesXmlValidator)6 Test (org.junit.Test)6 IPipe (nl.nn.adapterframework.core.IPipe)5 PipeLine (nl.nn.adapterframework.core.PipeLine)5 XmlValidatorTest (nl.nn.adapterframework.pipes.XmlValidatorTest)5 PipeLineSessionBase (nl.nn.adapterframework.core.PipeLineSessionBase)1