public static JBIConnection create(Element element) {
   Element consumer = XmlUtils.getChildElement(element, JbiConstants.CONSUMER_TAG);
   JBIEndpoint consumerEndpoint = JBIEndpoint.create(consumer);
   Element provider = XmlUtils.getChildElement(element, JbiConstants.PROVIDER_TAG);
   JBIEndpoint providerEndpoint = JBIEndpoint.create(provider);
   return create(consumerEndpoint, providerEndpoint);
 }
 public String toString() {
   StringBuffer str = new StringBuffer();
   if (consumer != null) {
     str.append("Consumer: " + consumer.toString());
   }
   if (provider != null) {
     str.append("\nProvider: " + provider.toString());
   }
   return str.toString();
 }