webMethods

webMethods

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.

 View Only
Expand all | Collapse all

Taminoclient delete method

  • 1.  Taminoclient delete method

    Posted Fri December 07, 2001 11:22 AM

    I can’t get a couple of the delete methods of Taminoclient to work.

    delete(java.lang.String id)
    and
    delete(java.lang.String id, java.lang.String collection, java.lang.String doctype)

    My problem with the first method is, as the delete asks only for ino:id, where do i specify doctype? I’ve tried it on the basURL for the taminoclient unsuccessfully. The Teminoresult returns a response code 200, but the document is not deleted.

    The second one obviously allows me to specify the collection and doctype. The documentation of the method says “If the collection is set be sure that the baseURL does not contain the collection name. Otherwise you receive an error. Note: From Tamino Version 2.1 onwards it’s necessary to add the collection to the baseURL.” I’ve tried it with the collection on the baseURL and without and it still does not work.

    With the collection on the URL I get HTTP 404 error, withou I don’t get an error, but the delete does not happen.


    Sample code

    import java.util.;
    import org.w3c.dom.
    ;
    import com.softwareag.tamino.API.dom.;


    public class CallResolveTam {
    public static final void main(String arg[]) throws Exception {

    /
    Create a new instance of Tamino Client /
    TaminoClient tamino = new TaminoClient(“http://pcrpn/tamino/Testing” );

    tamino.setPageSize(1);

    /
    start the Session /
    tamino.startSession();

    try
    {

    tamino.delete(“21”,“sailing”,“yacht”);
    tamino.commit(true);
    System.out.println(“delete”);


    /
    close the session*/

    tamino.endSession();
    }
    /* print StackTrace in case of an error */
    catch(TaminoError th) {
    System.out.println(th.errorText);
    th.printStackTrace(System.out);
    }



    }


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 2.  RE: Taminoclient delete method

    Posted Wed December 12, 2001 03:28 PM

    The way I have successfully used delete is as:

    TaminoResult res =
    tamino.delete(id, null, “JTest-Doc”);


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods