Appending node using Fuego API

Following the example in the samples directory i wanted to create a XML node called "D" and append it to the node BB in the XML document below
Final result = "<AAA><BB><C>blah</C><D>blah blah</D></BB></AAA>";
-----CODE START-----
String xmlstr = "<AAA><BB><C>blah</C></BB></AAA>";
XMLDocument xmlDoc = XMLDocument();
xmlDoc.initialize(content : xmlstr);
XMLNode rootNode = xmlDoc.rootFor();
XMLNode xmlNode1 = xmlDoc.createXMLNodeFor(tag : "D");
XMLNode xmlNode2 = xmlNode1.appendTo(xmlNode : rootNode);
String xmlContent = xmlDoc.print();
display(xmlContent);
-----CODE END-----
I have to append it to the node BB but i dont know how to proceed furthur. Can anyone suggest a solution? Thanks for your help. Another question - with the above lines of code i get a blank?

Finally figured it out - very wierd structure...
String xmlstr = "<AAA><BB><C>blah</C></BB></AAA>";
XMLDocument xmlDoc = XMLDocument();
xmlDoc.initialize(content : xmlstr);
XMLNode rootNode = xmlDoc.rootFor();
XMLNode bbNode = rootNode.getChildFrom(path : "BB");
XMLNode xmlNode2 = xmlDoc.createXMLNodeFor(tag : "D");
xmlNode2.text = "blah blah";
XMLNode xmlNode4 = bbNode.appendTo(xmlNode : xmlNode2);
String xmlContent = xmlDoc.print();          
display(xmlContent);
The code mentioned above will append a new tag called D to BB.

Similar Messages

  • SSL error using Neutron API and CLI directly on controller nodes

    VIO 1.0 + NSX + vSphere 6.0
    I am trying to execute the following segment of code:
    139         credentials = get_credentials()
    140         neutron = client.Client('2.0',
    141                                 username=credentials['username'],
    142                                 password=credentials['password'],
    143                                 auth_url=credentials['auth_url'],
    144                                 tenant_name=credentials['tenant_name'],
    145                                 endpoint_url=credentials['url'],
    146                                 token=credentials['token'],
    147                                 insecure=True)
    148         response = neutron.list_ports()
    When I run the Python script, it errors out with the following:
    Traceback (most recent call last):
      File "getMACAddr.py", line 148, in <module>
        response = neutron.list_ports()
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 111, in with_params
        ret = self.function(instance, *args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 306, in list_ports
        **_params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1250, in list
        for r in self._pagination(collection, path, **params):
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1263, in _pagination
        res = self.get(path, params=params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1236, in get
        headers=headers, params=params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1221, in retry_request
        headers=headers, params=params)
      File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1156, in do_request
        resp, replybody = self.httpclient.do_request(action, method, body=body)
      File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 192, in do_request
        **kwargs)
      File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 148, in _cs_request
        raise exceptions.SslCertificateValidationError(reason=e)
    neutronclient.common.exceptions.SslCertificateValidationError: SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    The /var/log/neutron/server.log file has the following corresponding entry for when the script tries to make the connection:
    2015-04-11 07:17:31.941 2096 INFO neutron.wsgi [-] (2096) accepted ('10.27.16.164', 34495)
    When I run the CLI from the same controller node, I get the error with or without the —insecure flag:
    root@controller02:/tmp# neutron port-list
    SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    root@controller02:/tmp# neutron --insecure port-list
    SSL certificate validation has failed: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    If I run the neutron CLI command from my local Macbook Pro, it works just fine. That leads me to believe it is a communication error when the controller node tries to talk to itself. I have tried setting the OS_AUTH_URL and OS_URL to both the localhost IP and the 10-network IP address -- both result in the same error.
    Any ideas?
    Chris

    Hello Chris,
    Thanks for checking out VMware Integrated OpenStack and for sharing your concern.
    By default, VMware Integrated OpenStack uses a self-signed certificate, which will require the use of the OS_CACERT environment variable in your openrc file and when using the API.
    The better way to resolve this is to use a CA-signed certificate.  Fortunately, VMware Integrated OpenStack makes the CSR generation and signed certificate import process very easy.
    If this is production, of course, use a trusted Root CA.  If this is a Dev Lab, you can generate your own Root CA certificate and use it for testing.
    I wrote up a quick blog post on how to do this.
    Let us know if you have any further questions.
    Regards,
    Trevor

  • Utility for appending nodes?

    Does anyone know of a utility that allows a user to append a node to a DOM object by providing the appropriate XPath for it?

    er... use Xalan's XPath API to locate the target node (father or sibling of your new node), then append your node using either appendChild() or insertBefore() on the target node...

  • Adding/deleting attachments using Fuego.Papi in OBPM10g

    Hi,
    I am seeking a resolution to the below issue. It will be really great if somebody can help me on this.
    The scenario is as follows.
    - Using global creation activity to fetch all eligible instances for a particular process using Fuego.Papi api.
    - The aim is to show and add attachments to the instances if required by the user.
    - Need to do this through a presentation, if needed jsp also.
    Problem statement
    - Is there any facility in the Fuego.Papi api to achieve this?
    - Is there any connection between Fuego.Papi api and Fuego.Lib api? As instance variable are directly not accessible via Fuego.Papi.Instance object. Is there any way to typecast Fuego.Papi.Instance to Fuego.Lib.ProcessInstance?
    - Is it possible to show the attachments individually in presentation or jsp is a must?
    Since there is a change in api from 5.7 to 10g, I am finding it difficult to solve it.
    Thanks in advance to all.
    Soubhagya

    Hector -
    Looking at you sequence, it appears that you have calling a subsequence that is removing steps from the caller's sequence. TestStand does not support editing sequences while they are running and we do not test this either. 
    When you execute a sequence in TestStand, the engine creates a runtime copy of the sequence that relies on some of the information stored in the edittime copy of the sequence. TestStand expects that the number of steps in both of these copies of the sequence to be the same. When they are not, it is possible to get an execution into a bad state. At the moment, your sequence is likely working because you are updating only the runtime copy and most of the references back to the edittime copy appear to be holding up. If you had in some way updated the edittime copy, I suspect that you would have seen a crash. Also, we actually reuse runtime copy of sequences within an execution, so the next time you called the sequence, you might find that the steps have already been removed.
    If you somehow want to build a sequence in a sequence file prior to calling it, that would be supported. You just have to ensure that the file is not being used in another execution, i.e parallel or batch model.
    Scott Richardson
    National Instruments

  • Add user to sharepoint group using REST API

    I am trying to add a user to sharepoint group with following code
    serviceUrl= Appweb + "/_api/SP.AppContextSite(@target)/web/sitegroups("+GroupId+")/users?@target='host web'";
        $.ajax({
            url: serviceUrl,
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
      headers: {"accept":"application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest":$("#__REQUESTDIGEST").val()
        async: false,
      success: function (data) {
               alert('success');
      error: function (data) {
                 alert('fail');
    The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and message is A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was
    expected
    I tried the sample from following link but fail it
    https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

    Hi,
    Per my understanding, you might want to add an user to a SharePoint group in host web from a SharePoint Hosted App using REST API.
    Here is a working demo for your reference:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    //Get the URI decoded URLs.
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    // Resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";
    // SP.RequestExecutor.js to make cross-domain requests
    $.getScript(scriptbase + "SP.RequestExecutor.js", loadPage);
    // Utilities
    // Retrieve a query string value.
    // For production purposes you may want to use a library to handle the query string.
    function getQueryStringParameter(paramToRetrieve)
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1)
    var singleParam = params[i].split("=");
    if (singleParam[0] == paramToRetrieve) return singleParam[1];
    function addUsersInGroup() {
    var executor;
    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync({
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/sitegroups(8)/users?@target='" + hostweburl + "'",
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: 'json',
    body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|[email protected]'}",
    headers: {
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest":$("#__REQUESTDIGEST").val()
    success: addUsersInGroupSuccessHandler,
    error: addUsersInGroupErrorHandler
    function addUsersInGroupSuccessHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    function addUsersInGroupErrorHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • Stats Not getting imported while importing partition using DATAPUMP API

    Hi,
    I am using datapump API for exporting a partition of a table and the importing the partition into table on another DB.
    The data is getting imported but i could the partition stats are not getting imported. I am using TABLE_EXISTS_ACTION = APPEND.
    any idea on how to achieve the stats also to be imported into the partition.
    Thanks!

    Hi,
    I am using datapump API for exporting a partition of a table and the importing the partition into table on another DB.
    The data is getting imported but i could the partition stats are not getting imported. I am using TABLE_EXISTS_ACTION = APPEND.
    any idea on how to achieve the stats also to be imported into the partition.
    Thanks!

  • Access content and metadata stored in VCR using SP1 api in weblogic Portal

    Hi
    I have configured Virtual Content Repository (VCR), I am able to see all the contents in VCR, that is stored in Oracle UCM. I need to know how I can get the content and metadata of the stored content using SPI api and display the metadata of contents present in a particular folder and display it in weblogic portal.
    Please provide any sample code how to acess that also helap me a lot.
    Edited by: user10934682 on Apr 19, 2011 1:39 AM

    To get started, you might want to look at the CM JSP tag library. With this tag library, it's straight forward to fetch a content Node and display the data. See the following tag lib documentation: http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14256/content/cm/tld-summary.html
    The tag doc includes some sample code showing the usage of the tags.
    For more advanced, or non-JSP usage, see the javadoc for com.bea.content.federated package. http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14255/com/bea/content/federated/package-summary.html
    Brad

  • Displaying the selected multiple records from node using onleadselect event

    Hi all,
    How to display the selected multiple records from node to node using onleadselect event.
    i came to know tht to fulfill this requirement i need to use the method get_selected_elements,
    how to use this method in my event??
    sree

    Hi Sree,
    Try below code..
    DATA : lo_nd_it_lips TYPE REF TO if_wd_context_node,             // This is first node
                 lo_el_it_lips TYPE REF TO if_wd_context_element,
                 ls_it_lips TYPE wd_this->Element_it_lips,
                 lt_it_lips TYPE wd_this->Elements_it_lips.
               DATA: wa_temp TYPE REF TO if_wd_context_element,
                lt_temp TYPE wdr_context_element_set.
    * navigate from <CONTEXT> to <IT_LIPS> via lead selection
          lo_nd_it_lips = wd_context->path_get_node( path = `ZRETURN_DEL_CHANGE.CHANGING_3.IT_LIPS` ).
          CALL METHOD lo_nd_it_lips->get_selected_elements
            EXPORTING
                INCLUDING_LEAD_SELECTION = ABAP_true
            RECEIVING
              set = lt_temp.
          DATA lo_nd_pack_mat TYPE REF TO if_wd_context_node.          //Second Node
          DATA lo_el_pack_mat TYPE REF TO if_wd_context_element.
          DATA ls_pack_mat TYPE wd_this->Element_pack_mat.
          DATA lt_pack_mat TYPE wd_this->Elements_pack_mat.
    * navigate from <CONTEXT> to <PACK_MAT> via lead selection
          lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).
          lo_nd_pack_mat->get_static_attributes_table( importing table = lt_pack_mat ).
          LOOP AT lt_temp INTO wa_temp.
            CALL METHOD wa_temp->get_static_attributes
              IMPORTING
                static_attributes = ls_it_lips.
                  ls_pack_mat-vbeln = ls_it_lips-vbeln.
                  ls_pack_mat-material = ls_it_lips-matnr.
                  ls_pack_mat-vgbel = ls_it_lips-vgbel.
                    append ls_it_lips to lt_unpack.
                  CLEAR ls_pack_mat.
           ENDLOOP.
    Cheers,
    Kris.

  • How to update the Process-Instance Variable Using Process API in OBPM 10.3?

    Hi All,
    I have a requirement to update the the process Instance variable from another process, but I am unable to find any method to update or set variable?
    I try the same using Process API also but no luck. Please provide me the code or link to implement same.
    Thanks & Regards,
    Ankur

    Hi,
    I have followed the procedure which was updated above.
    I ahve the sample to update the variable in the another instance of the another process. it's working fine. But I have followed the same procedure in our project it's giving the below exception at notification.send() method. Please help me to resolve this. thank you.
    fuego.transaction.DatabaseException: An error occurred while accesing the database.
    Detail:SQL statement: ' SELECT INSTANCEDATA, PROCESSID, INSTID, THREADID, NAME, PARENTTHREAD, PRIORITY, CREATIONTIME, AUTHOR, PARTICIPANT, NEXTPARTICIPANT, PROCESSDEADLINE, ACTIVITYDEADLINE, RECEIVETIME, ACTIVITYNAME, NTHREADS, CTHREADS, FCTHREAD, TOTALTHREADS, STATE, SOURCEACTIVITYNAME, ROLEIN, PENDINGITEMID, LASTRESULT, ITEMDEADLINE, NCHANGES , NREMARKS, NATTACHMENTS, HASPARTFORROLE,MICROACTIVITYNAME, V_REF_NO, V_TASK_ID, V_TASK_STATUS FROM PPROCINSTANCE WHERE PROCESSID = 63 AND INSTID = 1996 AND THREADID = 0 FOR UPDATE'
    at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.load(JdbcProcessInstancePersMgr.java:1640)
    at fuego.server.persistence.Persistence.loadInstance(Persistence.java:827)
    at fuego.server.AbstractInstanceService.readInstance(AbstractInstanceService.java:764)
    at fuego.ejbengine.EJBInstanceService.getLockedROImpl(EJBInstanceService.java:218)
    at fuego.server.AbstractInstanceService.getLockedROImpl(AbstractInstanceService.java:879)
    at fuego.server.AbstractInstanceService.getLockedImpl(AbstractInstanceService.java:730)
    at fuego.server.AbstractInstanceService.getLockedWaiting(AbstractInstanceService.java:219)
    at fuego.server.AbstractInstanceService.getLockedWaiting(AbstractInstanceService.java:199)
    at fuego.server.execution.AbstractReceiveNotificationExecutionHandler.getLockedTargetInstance(AbstractReceiveNotificationExecutionHandler.java:223)
    at fuego.server.execution.AbstractReceiveNotificationExecutionHandler.receiveNotification(AbstractReceiveNotificationExecutionHandler.java:96)
    at fuego.server.AbstractProcessBean$41.execute(AbstractProcessBean.java:2776)
    at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
    at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527)
    at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548)
    at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
    at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
    at fuego.server.execution.DefaultEngineExecution.executeWithoutComponentImmediate(DefaultEngineExecution.java:199)
    at fuego.server.execution.EngineExecution.executeWithoutComponentImmediate(EngineExecution.java:95)
    at fuego.server.AbstractProcessBean.receiveNotification(AbstractProcessBean.java:2757)
    at fuego.server.iec.LocalIPCHandler.sendNotification(LocalIPCHandler.java:79)
    at fuego.server.execution.microactivity.DefaultSendNotificationExecutionHandler.sendNotification(DefaultSendNotificationExecutionHandler.java:103)
    at fuego.server.NotificationComponent.sendNotification(NotificationComponent.java:95)
    at fuego.server.AbstractProcessBean$49.execute(AbstractProcessBean.java:3270)
    at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
    at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527)
    at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548)
    at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
    at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
    at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
    at fuego.server.AbstractProcessBean.sendComponentNotification(AbstractProcessBean.java:3266)
    at fuego.server.AbstractProcessBean.sendComponentNotification(AbstractProcessBean.java:3252)
    at fuego.components.Notification.send(Notification.java:148)
    at xobject.EPCS.PAction.collateTask(PAction.xcdl:34)
    at oracle.TRReview.Default_2_0.Instance.CIL_poReview(Instance.xcdl:25)
    at oracle.TRReview.Default_2_0.Instance.CIL_poReview(Instance.xcdl)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at fuego.server.execution.EngineExecutionContext.invokeMethodAsCil(EngineExecutionContext.java:1082)
    at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1277)
    at fuego.server.execution.TaskExecution.invoke(TaskExecution.java:401)
    at fuego.server.execution.InteractiveNormalCilExecution.invoke(InteractiveNormalCilExecution.java:425)
    at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:513)
    at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
    at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
    at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
    at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
    at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
    at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
    at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3204)
    at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
    at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
    at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
    at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
    at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
    at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
    at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3208)
    at fuego.ejbengine.EJBProcessControlAdapter.runTask(EJBProcessControlAdapter.java:1162)
    at fuego.ejbengine.EJBProcessControl_1zamnl_EOImpl.runTask(EJBProcessControl_1zamnl_EOImpl.java:4463)
    at fuego.ejbengine.EJBProcessControl_1zamnl_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
    at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
    at weblogic.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
    at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
    at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
    at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
    at weblogic.jdbcx.base.BasePreparedStatementWrapper.executeQuery(Unknown Source)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:128)
    at fuego.jdbc.FaultTolerantPreparedStatement.executeQuery(FaultTolerantPreparedStatement.java:598)
    at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.load(JdbcProcessInstancePersMgr.java:1627)
    ... 69 more
    BatchOperationException fuego.papi.exception.CannotStoreNotificationException: An instance in Process '/Division#Default-2.0' could not be notified.
    Regards,
    Sudhakar.

  • Problem in using Java API

    While running the sample code of adding document in the home folder using java api.
    i am facing following propblem:-
    java.lang.NoClassDefFoundError: com/inprise/vbroker/CORBA/portable/Skeleton
    at
    oracle.ifs.beans.LibraryService.connectLocal(LibraryService.java:519)
    at oracle.ifs.beans.LibraryService.connect(LibraryService.java:377)
    at CreateDocument.Helloworld(CreateDocument.java:30)
    at CreateDocument.main(CreateDocument.java:58)
    com/
    pls suggest asap

    You must not have the complete IFS_BASE_CLASSPATH defined in your CLASSPATH environment variable. The easiest way to do this is to type ". ifsenv.sh" on Solaris (or run ifsenv.bat on NT). Then you can invoke java like this:
    java -classpath $CLASSPATH:$IFS_BASE_CLASSPATH ...
    (your standard JDK classes should already be in the CLASSPATH; append our classpath to it)

  • How to append nodes to the xml document

    hi
    when i run the servlet program i want to append nodes to existing to nodes;but actually it is overwriting the nodes;what changes should i made to get desired output
    package example;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.*;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.StringWriter;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Text;
    public class XMLController extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException {
    String fname="name.xml";
    DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder db = fac.newDocumentBuilder();
    Document doc = db.newDocument();
    Element rt = doc.createElement("India");
                   Element main1 = doc.createElement("IndianPlayer");
                   Element productnames1 = doc.createElement("Name");
                   Text product1 = doc.createTextNode(request.getParameter("name1"));
                   Element price1 = doc.createElement("Age");
                   Text priceValues1 = doc.createTextNode(request.getParameter("age1"));
                   productnames1.appendChild(product1);
                   price1.appendChild(priceValues1);
                   main1.appendChild(productnames1);
                   main1.appendChild(price1);
                   rt.appendChild(main1);
         doc.appendChild(rt);
    saveDocAsFile(doc,fname);
    catch (ParserConfigurationException e) {
    e.printStackTrace();
    public static void saveDocAsFile(Document doc, String fname) {
    try {
    TransformerFactory tfFac = TransformerFactory.newInstance();
    // use null trandformation
    Transformer tf = tfFac.newTransformer();
    tf.setOutputProperty(OutputKeys.INDENT,"yes");
    tf.transform(new DOMSource(doc), new StreamResult(fname));
    /* catch (IOException ioe) {
    ioe.printStackTrace();
    catch (TransformerException e) {
    e.printStackTrace();
    bye
    chaitanya

    Adding a Node to a DOM Document
    http://javaalmanac.com/egs/org.w3c.dom/AddNode.html

  • Accessing javascript using HttpClient API

    Hi,
    I am using HttpClient API to access the content of page.Using that API
    I am able to retrive the content of the first page(The page Prior to Login).
    Now I want to login with user id and password.I have tried with PostMethod() but the content(in HtML Form) that I am getting is not of the next page but of the same page i.e. I am unable to login.
    I have seen the html content of the first page(by View Source from Browser) and there in the form tag on onsubmit event there is a call to a javascript function which is encrypting the password field.
    Can any body let me know how to deal with this type of situation or how to access javascript functions through HttpClient API.
    Thanks
    Anupam Sarkar

    hi,
    i have the same problem. i want to reach a url that has two parameters sent from a javascript function;
    +function doPost(eventTarget, eventArgument) {+
    +if (!theForm.onsubmit || (theForm.onsubmit() != false)) {+
    theForm._ET.value = eventTarget;
    theForm._EA.value = eventArgument;
    theForm.submit();
    +}+
    i tried to write a java code that appends values wtih namevaluepair and send them to base url with setrequestbody method;
         HttpClient client = new HttpClient();
    +          +
    +     String actionURL = "http://mevzuat.basbakanlik.gov.tr";+
    +          +
    +     PostMethod method = new PostMethod();+
    +          +
    +     NameValuePair[] postData = {+
    new NameValuePair("aspnetForm._ET.value","ctl00$Menu1"),
    new NameValuePair("aspnetForm._EA.value","~/AlfabetikFihristler.aspx"),
    +                         };+
    +               +
    +     method.setPath(actionURL);+
    +     method.setRequestBody(postData);+
    +          +
    +     int status = client.executeMethod(method);+
    +.+
    +.+
    +.+
    this code gives a warning;
    Feb 13, 2008 9:05:09 PM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders
    WARNING: Cookie rejected: "$Version=0; ASP.NET_SessionId=fa4pnl55x3wxy2n2psorpdmu; $Path=/". Illegal path attribute "/". Path of origin: "http://mevzuat.basbakanlik.gov.tr"
    and it does not recognize the parameters that i have sent and gets the base url content only.
    i am very new to this subject and any help that can fix my problem or shows me the way to solve my problem is appreciated.
    thanks...

  • To replace "\" with "/" in a string using FrameMaker API

    How to replace "\folder1\folder2\folder3" with "folder1/folder2/folder3" using framemaker API ?

    Hi Asha,
    Here is a function that I use for substring replacement, using all FDK library functions. If you use standard C libraries instead, you could probably reduce this to a line or two.
    To use it, you would send something like:
    path = F_StrCopyString("\\folder1\\folder2\\folder3");
    strReplace(path, "\\", "/", False);
    There might be better ways to do this. I'm not really that much of a programmer.
    Russ
    //returns the index of the first change, or -1 if no changes.
    IntT ws_StrReplace(StringT *mainString,
                       StringT searchString,
                       StringT replaceString,
                       IntT considerCase)
      StringT strBuf,
        returnString,
        appendString;
      IntT i,
        firstIndex = -1;
      //if the search string is empty, there is nothing to do.
      if(F_StrIsEmpty(searchString))
        returnString = F_StrCopyString(*mainString);
      else
        //otherwise, initialize the buffer
        returnString = F_StrCopyString("");
        for(i = 0; i < F_StrLen(*mainString); i++)
          strBuf = F_StrCopyString(*mainString);
          //Truncate the string from the beginning
          F_StrReverse(strBuf, 10000);
          F_StrTrunc(strBuf, (F_StrLen(strBuf) - i));
          F_StrReverse(strBuf, 10000);
          //and lop it down to the size of the search string
          if(F_StrLen(strBuf) > F_StrLen(searchString))
            F_StrTrunc(strBuf, F_StrLen(searchString));
          //if they are the same, we are doing the replacement
          if((considerCase && F_StrCmp(strBuf, searchString) == 0) ||
             (!considerCase && F_StrICmp(strBuf, searchString) == 0))
            appendString = F_StrCopyString(replaceString);
            //set the return value
            if(firstIndex < 0) firstIndex = i;
            //jimmy the loop so we step past the length of the replacement
            //string the next time around
            i += F_StrLen(searchString) - 1;
          //otherwise, we are just appending 1 character on.
          else
            F_StrTrunc(strBuf, 1);
            appendString = F_ApiCopyString(strBuf);
          //now, concatenate
          //rciReturnString = F_Realloc(rciReturnString,
            //F_StrLen(rciReturnString) + F_StrLen(rciAppendString), NO_DSE);
           returnString = (StringT) F_Realloc(returnString,
            (F_StrLen(returnString) + F_StrLen(appendString))*sizeof(StringT), NO_DSE);
          F_StrCat(returnString, appendString);
          F_ApiDeallocateString(&strBuf);
          F_ApiDeallocateString(&appendString);
        } //end main else
      //all done
      F_ApiDeallocateString(mainString);
      *mainString = F_StrCopyString(returnString);
      F_ApiDeallocateString(&returnString);
      return firstIndex;

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • How Do I Use the API to Abbreviate?

    How do I use the ACE API to limit the output field length and properly abbreviate the output field?
    Using the pwace command-line application, I get abbreviated output that looks like this for a 30 byte field:
    nnnnn GEORGE WASHNGTN MMRL HWY
    However, when using the API, I end up with a truncated field:
    nnnnn GEORGE WASHINGTON MEMORI
    This is from the PRIM_ADDR field.
    How do I use the API to get the same field value as the command-line application?
    Thanks,
    Rob
    Edited by: rriggs on Jun 30, 2010 11:36 PM

    Rob,
    The jobfile product has intelligent truncation built into the product.  However, with the API this would be up for the user to code around. 
    Thanks,
    Brandon

Maybe you are looking for

  • Business Partner ID and Vendor creation

    Hi All,     My client does not want to create Vendor IDs for potential vendor during RFx until awarded. My situation is if the supplier registers to buyer Business partner id is created first.  Buyer still cannot proceed with PO processing(classic sc

  • Webdynpro ABAP called from IView JAVA works over http but doesn't over http

    Hello gurus, like I said in the subject, we have integrated inside our JAVA portal a WebDynpro ABAP and it's working good over http protocol (http://<servername>:<http_port>/irj/portal), but when you browse the portal over https protocol (https://<se

  • 720p display resolution is too big for tv

    I recently got the kanex hdmi adapter to hook my mbp to my tv. The quality is superb and sound is good as well. However, the picture is slightly too big for my size of television. I had to select the 720p option so that my tv could recognize my compu

  • Configuring Basic Authentication with Username and password on BizTalk Schema Service

    Hi, I have published my schema as a webservice with WCF-BASICHTTP adapter in IIS 8.0. I wanted to have a Basic Authentication(User name and password restriction). I made the Receive location with Security mode as Transport and Transport Client Credie

  • Any way to mass locate files?

    Ok, I've reimported my library, but iTunes looked in My Music/iTunes instead of My Music where all the files were. Now all the songs and their data (play count, ratings, etc) are in the library, but can't play because I need to relocate the files. No