for (int x = 0; x < connectionChildren.getLength(); x++) {
if (connectionChildren.item(x) instanceof Element) {
Element childElement = (Element) connectionChildren.item(x);
if (XmlDescriptorHelper.isElement(
childElement, JBI_NAMESPACE, "consumer")) {
Consumes newConsumes = new Consumes();
newConsumes.setEndpointName(XmlDescriptorHelper
.getEndpointName(childElement));
newConsumes.setInterfaceName(XmlDescriptorHelper
.getInterfaceName(childElement));
newConsumes.setServiceName(XmlDescriptorHelper
.getServiceName(childElement));
connection.setConsumes(newConsumes);
} else if (XmlDescriptorHelper.isElement(
childElement, JBI_NAMESPACE, "provider")) {
Provides newProvides = new Provides();