XPath with XML from a Web Service

Hello

I've been tweaking data traction of a webservice and have managed to get the results that I need so I'm now at the stage where I want to do something useful with the XML that is returned, so I played with Xpath.

I understand I can use Xsearch to draw the nodes of the XML object rather than having to write the XML to a file and then look in the file. The problem I have is that when I use Xsearch it does not extract data I'll be waiting.

Here is the XML that is returned by the web service, which I attribute to the variable xmlReturned:

<? XML version = "1.0" encoding = "utf-8"? >

" < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "container =" " http://www.w3.org/2001/XMLSchema ">

< soap: Body >

" < GetChildLocationsResponse xmlns =" http://tempuri.org/VillarentersWebService/villa_search ">

< GetChildLocationsResult >

< RequestedParentID > 3924 < / RequestedParentID >

< VRF / >

< ChildLocations >

< location >

< LocationRef > 10 < / LocationRef >

the Argentina < LocationDescription > < / LocationDescription >

< ParentID > 3924 < / ParentID >

< / location >

< location >

< LocationRef > 30 < / LocationRef >

Brazil < LocationDescription > < / LocationDescription >

< ParentID > 3924 < / ParentID >

< / location >

< / ChildLocations >

< / GetChildLocationsResult >

< / GetChildLocationsResponse >

< / soap: Body >

< / envelope soap: >

So, when I use:

< cfset locDescription = XmlSearch (xmlReturned, "//LocationDescription") / >

< cfdump var = "#locDescription #" >

I expect to see an array of 2 elements, the Argentina and the Brazil. What I actually get is an empty array. I tried using a Xpath Checker convenient online at http://www.zrinity.com/xml/xpath/index.cfm and I get the same result. I tried a little research different but every time the table is empty.

Does anyone know why it is not pulling the knots required in the table? Am I missing something simple here?

Or you could represent the namespaces in your xpath xmlsearch properties.

Here is the first link that I got from a Google search for"namespace xmlsearch.

http://www.aftergeek.com/2006/08/xmlSearch-XPath-and-XML-namespaces-in.html

Tags: ColdFusion

Similar Questions

  • How to fill a ComboBox with data from a Web service

    I have a simple application that contains a DataGrid control that gets its data from a web service. I prefer to put these data in a ComboBox instead of a DataGrid control. My web service returns objects.

    Someone has an idea how to do?

    < mx:DataGrid id = dataProvider = "{ws.getProjects.lastResult"dgProjects"}" > "
    ... < mx:columns >
    ... < mx:DataGridColumn dataField = "projectID" headerText = "ID of project" width = "100" / >
    ... < mx:DataGridColumn headerText = "Project name" dataField = "projectName" / >
    ... < mx:DataGridColumn headerText = "Doc UNID" dataField = "docUNID" visible = "false" / >
    ... < / mx:columns >
    < / mx:DataGrid >

    Exactly what I needed.

    Thank you very much!!!

  • Download image pieces bmp to xml from the web service

    You try to download a bmp, in blocks of 10,000 bytes, using a .net web service.

    I get an error because of the bmp bytes.

    How the octets must be encoded?

    XML uses utf8 text, you'll have to urlencode (base64) bytes, similar to an email.

  • SOAP WITH UTL_HTTP ON HTTPS WEB SERVICE

    Hi all! I'm new there and experimenting with the consumption of web services from database.

    I'm trying to consume a service soap (simple) utl_http via https web with no luck in the Oracle 11 g Release 11.2.0.1.0 - 64 bit Production database.

    When you try to consume a web service soap utl_http over http, I have a great solution. But things goes bad when change the http secure (https) Protocol.

    There are a lot of examples and articles out there on how to do it, but there is nothing, not an integrated solution explained step by step.

    I would like to write the steps that I followed then maybe someone will find what am I missing or what I'm doing wrong.

    1 grant the user permissions of utl_Http.

    2 Confure ACL with

    BEGIN

    DBMS_NETWORK_ACL_ADMIN. ASSIGN_ACL (LCD = > 'utl_http.xml',)

    Home = > 'oracle-www.m-base.org/Sounds.html');

    END;

    /

    COMMIT;

    and check the ACL with

    SELECT *.

    Of user_network_acl_privileges;

    and

    SELECT *.

    OF dba_network_acls;

    3 export certifications of sites web service and import them into the portfolio (https://oracle-base.com/articles/misc/utl_http-and-ssl). Try a to time with different types of key - extensions (with key chains or not)

    4. When you try to consume the service web soap over HTTPS with SOAP UI everything works fine, but I get with utl_http

    ORA-28857: unknown error SSL

    I think keystore loaded successfully, but there is one thing missing in my puzzle. Also, I find this portfolio when run SELECT * FROM v$ encryption_wallet has a closed state.

    WRL_TYPE WRL_PARAMETER STATE

    fileE:\oracle\admin\HOSPITAL\WalletCLOSED

    The web service is trying to run is a simple add you can fid it https://oracle-base.com/webservices/server.php/ws_add

    Please help me to find out what am I do wrong.

    Thank you in advance.

    Working on my db...

    Then try to patch your database...

  • Exception during consumption of huge data from a web service.

    Hello

    I m developing an application to receive data from a Web Service and retain the data received on the device.

    App is developed for OS 4.3.0

    The Web Service call is made using Ksoap. The Code receives the data from the web service, analyzes the data and stores it in an object. This object is then persisted on the device. The data are essentially the coordinates. It takes the number of contacts required as input and passes it to the Web Service. The Web Service then returns the requested number of records

    The code works if I ask data of up to ~ 600 cases. If I specify more than 600 cases, it throws the following exception

    Chain rg.xmlpull.v1.XmlPullParserException:unexpected type (position: TEXT entity request in T...@1:24 in java.io.InputStreamReader@1f87d1b4)

    When I debugged using Eclipse, this exception is thrown on this statement ht.call (soapAction, envelope);

    Would it be because of a time-out? OT is because the Analyzer is not able to analyze huge data?

    Given that this exception occurs on the declaration of ht.call, I guess the problem is with the web service call and not with the code for persistent storage.

    I have included the code here... Is could someone please show me what the problem is?

    C ode to call Web Services

    public Vector getWebData(String count)
        {
    
       Vector personsVectorto = new Vector();
        try
        {
        StringBuffer receivedContent = new StringBuffer();
        String serviceUrl = "........";
        String serviceNamespace = ".....";
        String soapAction = ".........";
    
       SoapObject rpc = new SoapObject(serviceNamespace, "GetContactsList");
            //rpc.addProperty("listSize", "5");
            rpc.addProperty("listSize", count);
         SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    
            envelope.bodyOut = rpc;
    
            envelope.dotNet = true;
            envelope.encodingStyle = SoapSerializationEnvelope.XSD;
            HttpTransport ht = new HttpTransport(serviceUrl);
            ht.debug = true;
    
            ht.call(soapAction, envelope); // This is where thexmlpullparser exception occurs
    
     Object obj = envelope.getResponse();
            SoapObject soapResult = (SoapObject)obj;
    
                for(int i=0; i < soapResult.getPropertyCount(); i++)
    
                {
                  PersonDTO personto = new PersonDTO();
               SoapObject choice = (SoapObject)soapResult.getProperty(i);
                if( choice!=null)
                {
                    for(int j = 0; j < choice.getPropertyCount(); j++)
                    {
                      receivedContent.append(" Reading Property Number" + String.valueOf(j) + " Value = " + choice.getProperty(j).toString());
    
         if (j==0) personto.setElement(1,choice.getProperty(j).toString());
        if (j==1) personto.setElement(2,choice.getProperty(j).toString());
        if (j==2) personto.setElement(3,choice.getProperty(j).toString());
        if (j==3) personto.setElement(4,choice.getProperty(j).toString());
        if (j==4) personto.setElement(5,choice.getProperty(j).toString());
         if (j==5) personto.setElement(6,choice.getProperty(j).toString());
         if (j==6) personto.setElement(7,choice.getProperty(j).toString());
          if (j==7) personto.setElement(8,choice.getProperty(j).toString());
         if (j==8) personto.setElement(9,choice.getProperty(j).toString());
       if (j==9) personto.setElement(10,choice.getProperty(j).toString());
                    }
                }                 
    
                personsVectorto.addElement(personto);
                //storepersistentobject(personsVectorto);
            }
    
            }catch(org.xmlpull.v1.XmlPullParserException ex2)
            {
                String bah1 = ex2.toString();
                Dialog.alert("String: " + bah1);
                String bah2 = ex2.getMessage();
                Dialog.alert("Message: " + bah2); 
    
            }       
    
            catch(Exception ex){
                String bah = ex.toString();
                Dialog.alert("Response: " + bah);
    
                }
    
                return personsVectorto;
        }
    

    Thank you

    Hi Philippe,.

    First Question: Print server response

    Yes - I think for you too in fact just print the answer you'll have to do a regular HTTP call to the server and print it like this:

    StringBuffer sb = new StringBuffer();

    int thumb;

    HttpConnection httpConn = (HttpConnection) Connector.open (url);

    httpConn.setRequestMethod (HttpConnection.GET); or by POST depending on your needs

    in = httpConn.openInputStream ();

    While ((thumb = in.read ())! = - 1).

    {

    SB. Append ((Char) inCh);

    }

    System.out.println ("server response:" + sb.toString ());

    Try and see if you get a request too large entity. Note: you should probably put your SOAP request in GET or POST http request.

    Second Question: Is zipping required?

    This is how I chose to do for my particular needs that transfer me a large amount of data and the compression algorithm seems to keep all my data well below 40 k. However, it is not the only way, you could actually make several requests and get data piece by piece, but I don't know if it works well with SOAP responses. Depending on the type of Network Setup Blackberry you have, you can also set this limit to be higher (I think a maximum of 1 024 Ko for BES).

    Third Question: Timeout Logging

    For wait times, usually the exception you get should indicate that there was a timeout, but if you are suspicious that it's a timeout check your web service and see.

    Hope that helps!

    R

  • VIX file in the user interface designer receives the data from the Web service application that communicates with the SQL server database

    I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.

    This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.

    Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?

    There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")

    Please help me ASAP!

    Thank you

    Ivan

    I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.

    It's important to create the system DSN if you want your VI of web service to communicate with the database.

    PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.

  • Does anyone know how to get data from a web service of Labview with ajax or JSON?

    Hello

    I try to use ajax and json to service Web restful which I build with the labview. However I get errors

    For example. I create a web service from a labview vi (z = x / y http://localhost: 8080/math/divide/5/20 will give {Z: "4,000,000"})

    I get errors for the attached html files.

    Does anyone know how to get al labview WebService with ajax or json data?

    Thank you... Eran


  • Bind the drop down list to XML response from the web service

    In Designer ES2, I'm trying to populate a drop-down list with the data returned by a web service, but can't seem to get the link right.

    I created a web service using Workbench, which returns the following XML data (shown here in a text field for test purposes):

    image1.PNG

    However, when I bind this to the DataDropdownList control, LiveCycle seems to be putting the entire XML document in the drop-down list.

    Liaison:

    image2.PNG

    (Full text of the link is connectionData.groupLeaderWebService.Body.invokeResponse.xmlData.document.)

    Result:

    image3.PNG

    Therefore, a connection is made and the web service returns data, but it is not bound correctly as items in the list.

    I need the drop-down list to display the individual names returned by the web service.  Finally, it probably will be expanded to include the name and identification number (text and value, respectively).

    Can you see where I am going wrong with this?  Any help would be appreciated.

    Thank you!

    Toby

    Oops. Good fishing. This should be pls.loadXML (form1.page1.footer.lots.rawValue, 0, 1);

  • from xml to a web service

    Hi all

    I'm trying to capture some xml that is passed to a web service that I've created. I put the argument of a type XML. When I go back to the argument, the contents of the returned file seems to approximate the XML passed to the web service. However, I can't access XML from webservice.

    I tried to do a cfdump to a file inside of the XML web service and all I get are all statements of java object, no XML. I try to call the java object functions and I get nothing. I tried access to content the XML elements using the ColdFusion syntax, and it said that items doen't exist.

    If someone has an idea, it would be appreciated.

    Thank you
    Jim

    OK, thank you Adam for wasting your time to help me. Yes, it worked. I don't have any ZIP code because everything I had, it was like four lines, I tried to publish a webservice for ColdFusion, another is the part of your. So, this is all it is:





    The problem was that the discharge was the definition of the java object, not the XML. I didn't know how to access the XML component, or if he existed, that makes the xmlsearch. Also, any namespace prefixes are changed when the XML arrives, so if you have a tag like , when it comes into service web CF it is changed to .

    If the combination of these two throw me off the coast.

    Thanks for the help,
    Jim

  • How to expose a function that returns a XML as a Web Service?

    ---------------------------------------------------------------------------------
    Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production."
    AMT for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    ---------------------------------------------------------------------------------

    After reviewing the documentation of oracle on the generation of xml data in the database, I managed to select normal tables and return a result xml exactly as I want:
    -- My types
    create or replace 
    TYPE CHILD_T AS OBJECT ("@ID" VARCHAR2(20), "@NAME" VARCHAR2(20));
    
    create or replace 
    TYPE CHILDREN_T AS TABLE OF CHILD_T;
    
    create or replace 
    TYPE PARENT_T AS OBJECT ("@ID" VARCHAR2(20), CHILDREN CHILDREN_T );
    
    -- The actual select
    SELECT XMLFOREST (
                PARENT_T(d.id,
                CAST ( MULTISET (SELECT c.id, c.name
                                 FROM child c
                                 WHERE c.parent_id = p.id) AS CHILDREN_T )
                ) AS "Parent"
            ) 
    FROM parent p;
    That gets me this:
    <Parent ID="1">
        <CHILDREN>
            <CHILD_T ID="1" NAME="xxxxx" />
            <CHILD_T ID="2" NAME="yyyyy" />
            <CHILD_T ID="3" NAME="zzzzz" />
        </CHILDREN>
    </Parent>
    It's perfect, but how to expose this result as a Web Service like this link?
     http://localhost:8080/orawsv/MY_USER/GET_CHILDREN?wsdl
    I tried this function:
    FUNCTION GET_CHILDREN (
        PARENT_ID IN VARCHAR2
    ) RETURN CLOB
    AS
        L_RESULT CLOB;
    BEGIN
        SELECT to_clob(XMLFOREST (
                PARENT_T (p.id,
                CAST ( MULTISET (SELECT c.id, c.name
                                 FROM child c
                                 WHERE c.parentId = p.id) AS CHILDREN_T )
                ) AS "ParentObj"
          )) AS MY_XML INTO L_RESULT
        FROM parent p
        WHERE p.i = PARENT_ID;
    
        RETURN (L_RESULT);
    END GET_CHILDREN;
    But when I access although .NET Compact Framework, I get this: "'Element' is an invalid XmlNodeType.

    As you can see, I just need a simple way to transport information between a Windows CE handheld computer and our database. Use functions that return simple values.
    Do I have to return the data as xml?
    What return value I should use? Varchar2 throws a buffer error output.

    ---------
    It is my first post here, also my first contact with OracleDB, and Web Services.

    Hello

    Welcome to Oracle and XML DB!

    After reviewing the documentation of oracle on the generation of xml data in the database, I managed to select normal tables and return a result xml exactly as I want:

    Have you also read about the SQL/XML functions?
    You don't have to create objects of type SQL to generate XML data.

    Using only XMLElement, XMLAgg, XMLAttributes, etc., you should be able to generate any kind of structure complex relational data and with total control over the names (which you don't have with the types of objects).
    Your example can be rewritten to:

    SELECT XMLElement("Parent",
             XMLAttributes(p.id as "Id")
           , XMLElement("Children",
               (
                 SELECT XMLAgg(
                          XMLElement("Child",
                            XMLAttributes(
                              c.id as "Id"
                            , c.name as "Name"
                            )
                          )
                        )
                 FROM child c
                 WHERE c.parent_id = p.id
               )
             )
           )
    FROM parent p
    WHERE p.id = :parent_id ;
    

    It's perfect, but how to expose this result as a Web Service like this link?
    [...]
    Do I have to return the data as xml?

    Yes.
    Define the return as XMLType data type:

    FUNCTION GET_CHILDREN (
        PARENT_ID IN VARCHAR2
    )
    RETURN XMLTYPE
    AS
        L_RESULT XMLTYPE;
    BEGIN
    
      SELECT XMLElement("Parent",
               XMLAttributes(p.id as "Id")
             , XMLElement("Children",
                 (
                   SELECT XMLAgg(
                            XMLElement("Child",
                              XMLAttributes(
                                c.id as "Id"
                              , c.name as "Name"
                              )
                            )
                          )
                   FROM child c
                   WHERE c.parent_id = p.id
                 )
               )
             )
      INTO L_RESULT
      FROM parent p
      WHERE p.id = PARENT_ID ;
    
      RETURN (L_RESULT);
    
    END GET_CHILDREN;
    
  • Extract the data from the web service response

    Hello

    I called a web service and in response to XML data, now I have to extract the values and store them in the array

    My steps,

    1 call WebService
    2 answer stored in the CLOB column
    3, then used after the request

    SELECT loc.*
    OF my_xml PO,.
    XMLTable (XMLNAMESPACES)
    "urn: schemas-microsoft-com: XML-diffgram-v1" as "diffgr".
    ,'http://api. .com / "as"ns0"
    )
    ,'/ ns0:DataSet / diffgr:diffgram/NewDataSet/OptOutAll '
    PASS xmltype.createxml (PO.xml_data)
    COLUMNS
    "E-mail" TANK (100) path "Email."
    'Reason' TANK (150) PATH 'reason '.
    ) As loc
    WHERE ROWNUM < = 10;

    I wrote using this example

    But it does not work, do not know why

    / Zab

    If I use the XML (stored in the table XMLType TMP_XML) below:

    
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                          
                          
                          
                          
                        
                      
                    
                  
                
              
            
            
              
                
                  2012-05-09T22:40:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-07T22:30:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-14T00:20:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-19T20:50:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
              
            
          
        
      
    
    

    Then I can do:

    SQL> SELECT x.*
      2  FROM tmp_xml t
      3     , XMLTable(
      4         XMLNamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "soap"
      6         , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
      7         , 'http://api.***.com/' as "ns0"
      8         )
      9       , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
     10         PASSING t.object_value
     11         COLUMNS OptOutTime  TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
     12               , MailingList VARCHAR2(100)            PATH 'MailingList'
     13               , Reason      VARCHAR2(150)            PATH 'Reason'
     14       ) x
     15  ;
    
    OPTOUTTIME                          MAILINGLIST                    REASON
    ----------------------------------- ------------------------------ --------------------------------------------------------------------------------
    09/05/12 22:40:00,000000 +02:00     information                    Subscriber confirmed
    07/06/12 22:30:00,000000 +02:00     information                    Subscriber confirmed
    14/06/12 00:20:00,000000 +02:00     information                    Subscriber confirmed
    19/06/12 20:50:00,000000 +02:00     information                    Subscriber confirmed
     
    

    Are you getting something different?

  • How to display a PNG image according to the response from the Web Service?

    Hello

    I use the web service XML from Weather.com to get the current temperature, temperature 'feels' and the current condition icon number.  Their service provides many (> 20 I think) which represents the current status of PNG files.  How do I install my script AS3 do basically if... then Else instructions based on the returned value icon?  For example, if the value of icon = 20, then view 20. png on stage?  I need match the value of correct PNG icon and then put that PNG (as a clip?) on stage for a predefined timeline section.

    Thank you

    SID

    Hello

    I also used this API, and I only use cases or conditions in order to retrieve the values and turn them into a file name.

    If you do not use all the available conditions and turning them into an icon, then Yes, you need to do a switch condition.

    But if you want to use them all, them you can simply get the condition number and add the '.png' and call the corresponding file directly. Here you can do a test, just in case the condition / icon does not exist (e.g. system failure any)

    uicondition.source = String (resultXML.cc.icon) + ".png";

    The UILoader is an excellent component for this sort of thing. You can accomplish the same thing with a MovieClip and load an image. It is lighter.

    But then again if you want to resize you would code all methods for that.

    I hope this helps.

  • How to read the actual SOAP messages going to / coming from a web service

    I'm still a beginner with SOA 11 g (11.1.1.1.0), so forgive me if my question is trivial. I didn't find anything on the forum or in the documentation to instruct me on how to view SOAP messages real of the back and forth between SOA 11 g as well as a web service outside. I can't easily put in place something like TCPMon since the service endpoint is SSL. And anyway, real endpoint is dynamic (new url provided upon successful login), which complicates things. The XML raw payload data are simply not sufficient to diagnose some problems. I really need to see the complete application (SOAP env) out before encryption and the full response (SOAP env) after decryption. Is it possible to get this info? Thanks for any help offered.

    -Cris

    Hi Cris,

    A few options:

    * You can set the 'Composite Audit level' in Enterprise Manager to 'Development' to have a high level of logging. Select the composite SOA in Enterprise Manager. Click on 'Settings'--> 'Level of Composite checking'--> 'development '.

    * You can also use GOSA. GOSA provides a logging strategy that you can attach to your services and your references. Click your composite SOA in Enterprise Manager, and then select "policies". Select "attach to / detach" and select the service or reference. Fix the oracle/log_policy on the service or the reference. A log file containing the SOAP message is created in the following location: Middleware/user_projects/domains / [your domain name] [your server]/logs/owsm/msglogging/diagnostic.log /servers/

    Best regards, Ronald

  • Output table in XML format using web services

    I use Labview 8.6 web services to try and a list of power provides a database as XML output. When I table of wire into the Terminal and set the URL for the web services mappings will not build because he says it is an unsupported data type. Any help would be appreciated.

    A web service XML LabVIEW 8.6 supports several types of data. A table is not one of these.

    The best way to work around this limitation is to use a string instead of the indicator table indicator. The antiderivative of flatten it to XML allows you to convert your table to an XML string.

    Alternatively, you can choose your web service method to use the mode of stream instead of the Terminal mode. You can then use the VI of response write in the range of web services to control what to write to the client and when. This seems to be what you mean when you wrote "access to the exit.

    By passerby-tables can serve as exits in LabVIEW 2009 Terminal mode.

    Nathan

  • Best practices for connecting to a database from a Web service

    I develop Web services that need to connect to an Oracle database. Currently, I connect to the database using jdbc as this class:

    con = DriverManager.getConnection (connectURL, "HR_DATA_READERS", "xxxxx").

    I do not like this approach because it hardcodes the connection string and account information. One of our colleagues has suggested that we use the properties file, but this leaves the user name and password in full view. Given that we can define jdbc dataources on the server of the SOA and the server offers all the nice features like pooled connection etc, is there a way to connect to the database using the data source defined the SOA rather than defining a connection server jdbc in the Web service itself? Is the best way to do it or is there still a way paste?

    Thank you

    Hi, Alix,.

    If you are JEE compatible environment. i.e. WLS 12 c, you can use resource injection approach, instead of manually coding the above proposed DS research.

    More information on injected resources and you will find here - http://docs.oracle.com/cd/E19226-01/820-7627/6nisfjmbl/index.html

    "For example, you can use this tutorial - Servlet JDBC DataSource resource Injection" Open tutorials

    Take a look at sections 5.3 and 5.4 only, which is what the code should look like and how to configure resource in the web.xml file.

    And always use finally to try to close the db connection, otherwise in the case of exceptions, as it is not returned to the pool and at some point he's going to get exhausted.

    Hope this helps,

    A.

Maybe you are looking for

  • Re: Toshiba Satellite A300-129: Windows XP installation

    Hi people, I have a question regarding Toshiba Satellite A300-129;I would like to install Windows XP on it (because of stability issues with Vista), but when I enter in the configuration of Windows XP, I get the message that Windows Setup did not fin

  • Upgrade of 5100-201 - HARD drive

    My satellite 5100-201 has a 30 G 4200 RPM HARD drive -I see a big performance increase everything by replacing the HDD by a Hitachi 60 GB 2 "1 / 2 7200 tr/MIN/8 MB? -is it possible to change the drive hard and how? Thanks for the support

  • Toshiba T110 connects to router 3com

    Hello Just taken delivery of my new t110 notebook - very nice it is too - unless she refuses to work with my existing wifi ADSL 3com router. If I dig on my old router wireless netgear, the T110 and connects to that without problem - but can't get to

  • Remove indexed locations that no longer exist

    If I get all the current image files, e.g. *.jpg, I get a long list of entries that have been removed long ago, as well as their shirts in the "indexed" places.  This makes it very difficult to find the current stuff.  These old entries non-existent

  • Activating Windows: Error Code C004E003

    I got my product key and records what he came up with for a while. I could activate it without any problem, and I checked several times to see if it was genuine. (I reinstalled Windows on several occasions because of some errors on hard drive.) I don