<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/Shipping/" targetNamespace="http://www.example.org/Shipping/">
<element name="Invoice" type="tns:Invoice"></element>
<complexType name="Invoice">
<sequence maxOccurs="1" minOccurs="1">
<element name="ProductType" type="string"></element>
</sequence>
</complexType>
</schema>
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-technologies.com) -->
<ns1:Invoice xmlns:ns1="http://www.example.org/Shipping/">
<ProductType>Power</ProductType>
</ns1:Invoice>
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Invoice xmlns:ns1="http://www.example.org/Shipping/">
<ProductType>P</ProductType>
</ns1:Invoice>
We have to run the mapping manually four times to validate all four values. And we have to manually check the values every time we run the mapping. This might sound easy, but any incremental changes, we have to run these tests again manually and check the output by looking at the output xml.
Let us create a separate Iflow to test the mapping. Here is the simple Iflow with https sender adapter.
// Parse the XML response
const responseXml = pm.response.text();
// Extract the ProductType value
const productType = responseXml.match(/<ProductType>(.*?)<\/ProductType>/)[1];
// Check the ProductType value
pm.test("Check ProductType Power", () => {
pm.expect(productType).to.eql("P");
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |