public String toString() {
    StringBuffer strBuf = new StringBuffer();

    strBuf.append("BindingOperation: name=" + name);

    if (bindingInput != null) {
      strBuf.append("\n" + bindingInput);
    }

    if (bindingOutput != null) {
      strBuf.append("\n" + bindingOutput);
    }

    if (bindingFaults != null) {
      Iterator faultIterator = bindingFaults.values().iterator();

      while (faultIterator.hasNext()) {
        strBuf.append("\n" + faultIterator.next());
      }
    }

    String superString = super.toString();
    if (!superString.equals("")) {
      strBuf.append("\n");
      strBuf.append(superString);
    }

    return strBuf.toString();
  }
Exemple #2
0
  /**
   * Adds WSDL level namespaces to schema definition if necessary.
   *
   * @param schema
   * @param wsdl
   */
  @SuppressWarnings("unchecked")
  private void inheritNamespaces(SchemaImpl schema, Definition wsdl) {
    Map<String, String> wsdlNamespaces = wsdl.getNamespaces();

    for (Entry<String, String> nsEntry : wsdlNamespaces.entrySet()) {
      if (StringUtils.hasText(nsEntry.getKey())) {
        if (!schema.getElement().hasAttributeNS(WWW_W3_ORG_2000_XMLNS, nsEntry.getKey())) {
          schema
              .getElement()
              .setAttributeNS(
                  WWW_W3_ORG_2000_XMLNS, "xmlns:" + nsEntry.getKey(), nsEntry.getValue());
        }
      } else { // handle default namespace
        if (!schema.getElement().hasAttribute("xmlns")) {
          schema
              .getElement()
              .setAttributeNS(
                  WWW_W3_ORG_2000_XMLNS, "xmlns" + nsEntry.getKey(), nsEntry.getValue());
        }
      }
    }
  }
 /**
  * Get the specified fault binding.
  *
  * @param name the name of the desired fault binding.
  * @return the corresponding fault binding, or null if there wasn't any matching fault binding
  */
 public BindingFault getBindingFault(String name) {
   return (BindingFault) bindingFaults.get(name);
 }
 /**
  * Remove the specified fault binding.
  *
  * @param name the name of the fault binding to be removed.
  * @return the fault binding which was removed
  */
 public BindingFault removeBindingFault(String name) {
   return (BindingFault) bindingFaults.remove(name);
 }
 /**
  * Add a fault binding.
  *
  * @param bindingFault the new fault binding
  */
 public void addBindingFault(BindingFault bindingFault) {
   bindingFaults.put(bindingFault.getName(), bindingFault);
 }