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.

 View Only
  • 1.  Updating a Node in Tamino

    Posted Fri June 22, 2001 12:37 PM

    Hi,

    I want to update the node .

    I am trying the following code, but it is not updating, please let me know where I am missing ?

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

    public class TaminoNodeUpdate
    {
    public static final void main(String arg) throws Exception
    {
    TaminoClient tamino = new TaminoClient(“http://localhost/tamino/TEST”);
    tamino.startSession();
    try{
    String tq=“”;
    tq = “Telephone[LoginName=‘TestLoginName2’]”;
    System.out.println("tq : " + tq);
    TaminoResult tr = tamino.query(tq);
    BasicDocument doc=new BasicDocument();
    BasicElement telephone = new BasicElement(doc,“Telephone”);

    BasicElement c = new BasicElement(doc,“Lastname”);
    c.appendChild(new BasicText(doc,“Changed LastName”));
    telephone.appendChild(c);

    while(tr.hasMoreElements())
    {
    Element el = tr.getNextElement();
    tamino.update(telephone);
    }

    tamino.endSession();
    }
    catch(Exception er)
    {
    System.out.println("Error in Tamino " + er);
    }
    }
    }

    Thanks
    N.V.Sairam.


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


  • 2.  RE: Updating a Node in Tamino

    Posted Sun June 24, 2001 01:38 AM

    Are you trying to do something like this:

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

    public class TaminoNodeUpdate
    {
    public static final void main(String arg) throws Exception
    {
    TaminoClient tamino = new TaminoClient(“http://localhost/tamino/TEST”);
    tamino.startSession();
    try{
    String tq = “Telephone[LoginName=‘TestLoginName2’]”;
    TaminoResult tr = tamino.query(tq);
    Document doc = tr.getDocument();
    Element telephone = (Element)tr.getElement().getFirstChild();
    Element lastName = (Element)telephone.getElementsByTagName(“Lastname”).item(0);
    lastName.getChildNodes().item(0).setNodeValue(“Changed LastName”);
    tamino.update(telephone);
    tamino.endSession();
    }
    catch(Exception er)
    {
    System.out.println("Error in Tamino " + er);
    }
    }
    }


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


  • 3.  RE: Updating a Node in Tamino

    Posted Mon June 25, 2001 03:32 AM