Exemplo n.º 1
0
  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();
  }
Exemplo n.º 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());
        }
      }
    }
  }
Exemplo n.º 3
0
 /**
  * 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);
 }
Exemplo n.º 4
0
 /**
  * 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);
 }
Exemplo n.º 5
0
 /**
  * Add a fault binding.
  *
  * @param bindingFault the new fault binding
  */
 public void addBindingFault(BindingFault bindingFault) {
   bindingFaults.put(bindingFault.getName(), bindingFault);
 }