That's great! Could you send the complete method or if applicable a patch to the orignal PROPFINDMETHOD?

Thanks,
Oliver

IndianAtTech wrote:

That's noting special  about it

We just change the code generateRequestBody()


printer.writeElement("D", "target", XMLPrinter.OPENING); for (int i = 0; i < urllist.length; i++) {

      String targetURL = urllist[i].toString();
      printer.writeElement("D", "href", XMLPrinter.OPENING);
      printer.writeText(targetURL);
      printer.writeElement("D", "href", XMLPrinter.CLOSING);
    }
    printer.writeElement("D", "target", XMLPrinter.CLOSING);

This above code snippet allows us to get the multiple responses

urllist is a string array that was passed to a constructor



Here is the full body

protected String generateRequestBody() {

    XMLPrinter printer = new XMLPrinter();
    printer.writeXMLHeader();
    printer.writeElement("D", "DAV:", "propfind", XMLPrinter.OPENING);

    printer.writeElement("D", "target", XMLPrinter.OPENING);
    for (int i = 0; i < urllist.length; i++) {

      String targetURL = urllist[i].toString();
      printer.writeElement("D", "href", XMLPrinter.OPENING);
      printer.writeText(targetURL);
      printer.writeElement("D", "href", XMLPrinter.CLOSING);
    }
    printer.writeElement("D", "target", XMLPrinter.CLOSING);

    switch (type) {
      case ALL:
        printer.writeElement("D", "allprop", XMLPrinter.NO_CONTENT);
        break;
      case NAMES:
        printer.writeElement("D", "propname", XMLPrinter.NO_CONTENT);
        break;
      case BY_NAME:
        printer.writeElement("D", "prop", XMLPrinter.OPENING);
        for (int i = 0; i < propertyNames.length; i++) {
          String namespace = propertyNames[i].getNamespaceURI();
          String localname = propertyNames[i].getLocalName();
          if ("DAV:".equals(namespace)) {
            printer.writeElement("D", localname, XMLPrinter.NO_CONTENT);
          }
          else {
            if (namespace.length() > 0) {
              printer.writeElement("ZZ", namespace, localname,
                                   XMLPrinter.NO_CONTENT);
            }
            else {
              printer.writeElement(null, null, localname,
                                   XMLPrinter.NO_CONTENT);
            }
          }
        }
        printer.writeElement("D", "prop", XMLPrinter.CLOSING);
        break;
    }

    printer.writeElement("D", "propfind", XMLPrinter.CLOSING);

    return printer.toString();
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to