IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How to use the WebDAV server in custom Java application?

    Posted 10/15/01 10:26 AM

    Hi,

    I am trying to manage content via a custom java Application. As per the architechure diagrams I belive the WebDAV is built on Slide project. How do I access the Slide API in my custom application?

    Regards
    Pushparajan


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: How to use the WebDAV server in custom Java application?

    Posted 10/17/01 01:45 PM

    Hello Pushparajan,

    The Tamino WebDAV Server uses Slide as the central WebDAV engine. All the Slide jar files are packed with Tamino WebDAV Server. The Slide version is 1.0.13 (with some minor bug fixes contained in Slide version 1.0.14).

    We do not expose the Slide Content Management API officially and there is the Slide documentation available only. This might be something for further versions. Currently the best source of information would be http://jakarta.apache.org/slide.

    Using the installed slide-kernel.jar will give you access to the Slide Content Management API. The API itself is not fully supported by the Tamino store, e.g. no versioning or ACL support yet. Again, this is something for coming versions. For the non-versioned access it will be fully operable, this is the internal API used by the WebDAV layer.

    Best regards

    Juergen

    P.S. If possible I would currently suggest to use the WebDAV protocol or API.


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: How to use the WebDAV server in custom Java application?

    Posted 10/29/01 07:27 AM

    Hi,

    How do I use the generic command line webdav client? (I tried the one that comes with Slide (Slide.java)). I have a problem with the put method. The put always creats a zero length file.

    Regards
    Pushparajan


    #webMethods
    #Tamino
    #API-Management


  • 4.  RE: How to use the WebDAV server in custom Java application?

    Posted 10/30/01 06:51 AM

    Hi,

    I’ve interesting article on this regard from, http://www.apacheweek.com/features/put

    "There is some confusion about whether Apache supports the PUT method. In fact, Apache handles PUT exactly like it handles the POST method. That is, it supports it, but in order for it to do anything useful you need to supply a suitable CGI program. This is on contrast to the GET method, which Apache supports internally by sending back files or SSI documents. "

    But how does the windows explorer be able to upload a file to Tamino WebDAV properly?

    Regards
    Pushparajan


    #webMethods
    #Tamino
    #API-Management


  • 5.  RE: How to use the WebDAV server in custom Java application?

    Posted 10/30/01 07:19 AM

    Hello Pushparajan,

    its not Apache, that handles the PUT request. It is passed directly to Tamino WebDAV Server.

    Regards,
    Martin


    #API-Management
    #webMethods
    #Tamino


  • 6.  RE: How to use the WebDAV server in custom Java application?

    Posted 11/01/01 12:40 AM

    Hi,

    this from the Slid forum, one of our freinds had the same problem and has a fix. I am yet to try the fix. hope this will be taken care in the next release or build or Tamino WebDAV server as well.

    Regards
    Pushparajan

    ----
    I have same trouble. I am using some original Webdav server.
    The Webdav server does not accept PUT Header without Content-Length:
    So I have modified WebdavResource, PutMethod.
    I hope to be supported by Slide.

    PUT(file) : easy to implement
    Content-Length: file.length()
    PUT(InputStream) : I add setContentLength(length)
    to be called before calling PUT(InputStream)

    1 WebdavResource
    1) coment out import statement of httpclient.method
    Because I would like to modify org.apache.webdav.lib.method.PutMethod
    rather than org.apache.commons.httpclient.methods.PutMethod

    /*
    import org.apache.commons.httpclient.methods.GetMethod;
    import org.apache.commons.httpclient.methods.HeadMethod;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.apache.commons.httpclient.methods.PutMethod;
    /

    2) Add setContentLength(long length) method for Put(InputStream)

    private long contentLength = -1 ;
    /**
    * Set Content-Length for Not File.
    * @param length of InputStream PUT data
    *
    /
    public void setContentLength(long contentLength) {
    this.contentLength = contentLength;
    }

    3) Chnage calling sequence method.sendData(
    except method.sendData(file);
    /
    modified PUT
    From method.sendData( is,byte[] data,string data,url
    → method.setContentLength(contentLength);method.sendData(

    /

    /* ex. original
    method.sendData(is);
    to */
    method.setContentLength(contentLength);
    method.sendData(is);


    2. org.apache.webdav.lib.PutMethod

    private long contentLength = -1;

    /**
    * Set Content-Length for Not File.
    * @param length of InputStream PUT data
    *
    */
    public void setContentLength(long contentLength) {
    this.contentLength = contentLength;
    }

    2.1 sendData(file)
    public void sendData(File file)
    throws IOException {
    setHeader(“Content-Length”, String.valueOf(file.length()) ) ;
    super.sendData(file);
    }

    2.2 sendData(!file)

    sendData(String data) sendData(InputStream is)
    sendData(byte data) sendData(URL url)

    public void sendData(InputStream is)
    throws IOException {
    if (contentLength >= 0){
    setHeader(“Content-Length”, String.valueOf(
    contentLength ) );
    contentLength = -2;
    }
    super.sendData(is);

    }


    At 13:51 01/10/30, Remy Maucherat wrote:
    >
    >> > Hi,
    >> >
    >> > I’ve downloaded the Slide source and Binanries. I compiled the Slide
    >> > Client (Slide.java). When I do an PUT command it always creates a new
    >file
    >> > in the webdav directory with zero byte length. All other commands like
    >> > dir, get etc work properly. Pls help me fix this.
    >
    >What is the server you’re using ? Because of a variety of problems with the
    >HTTP client, chunking is used when uploading with a PUT if the server is
    >HTTP/1.1, which is something some servers don’t like.
    >Tomcat 4.0 should work ok. Tomcat 3.x should also be ok (it will be
    >identified as a HTTP/1.0 server) in standalone.
    >
    >Remy



    Yoshiyuki Kumadaki/?? ??
    Web Japan Co.,Ltd /???
    http://www.webjp.co.jp/



    To unsubscribe, e-mail: mailto:slide-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: mailto:slide-user-help@jakarta.apache.org


    #Tamino
    #webMethods
    #API-Management


  • 7.  RE: How to use the WebDAV server in custom Java application?

    Posted 11/01/01 12:56 AM

    Hi,

    there is one more step left out. It is listed below.

    Regards
    Pushparajan

    2.3 add this method to be not remove Content-Length
    If I don’t add this method, then above Content-Length will be removed

    public boolean needContentLength() {
    return false;
    }


    #Tamino
    #API-Management
    #webMethods