How to retreive String from the Connection object

hi all,
I am using HttpConnection to Connect to the server.I want to retreive string from the Connection.
As like Connection.openInputStream() is there any method to get the String from the connection.In the server side also i want to send the String not the stream .
Thanks in advance
lakshman

Just read the string from the stream.

Similar Messages

  • How to retreive data from the column of CLOb  dataype in BPEL.

    Hello Everyone,
    I have a scenario in which i have two databses primary and secondary. In first bpel process i am checking if primary database is down then store the payload in temp staging table in secondary database. That payload is getting stored in a cloumn of CLOB datatype in a text format.
    Now in second bpel process when primary is up i have to pull the data from the temp staging table...but here i want the data in the same format (like it came in the first process...the input payload format)....but as the CLOB will store the data as a text then how to reform that data in to ealier payload format.
    Can any one pls suggest me the solution...
    Thanks

    Confirm that you have the VISA Run Time Engine on the target machine. If you do not have it installed, you can install the VISA Run Time Engine from ni.com.
    Error -1073807346 Using VISA When Running LabVIEW Executable On Target Computer
    Message Edited by Mathan on 10-12-2009 07:11 AM

  • How do I get from the connect to i tunes screen to my home page?

    Do I have to be connected to the net to access my home page on my I pad?
    I am so lost! I turn it on and all I get is a picture of a connection cord to an i Tunes logo.

    Thank You! LOL....I am so used to PC's And a
    Apple is so user friendly and un complicated that I thought it had to be more than that

  • How  to Retreive data from the SAP  by using  BAPI's  through the Web .

    Shashi

    <copy&paste_and_everything_else_removed_by_moderator>
    Edited by: Julius Bussche on Sep 3, 2008 8:54 AM

  • How to search a string from the database?

    how to search a string from the database? starting with some character

    If you're trying to do this in a SELECT, you can use the LIKE verb in your WHERE clause.
    Here's an Example
      SELECT obj_name FROM tadir
        INTO prog
        WHERE pgmid = 'R3TR'
          AND object = 'PROG'
          AND obj_name LIKE 'Z%'.
    In this case it will select every row that obj_name starts with Z. 
    If you wanted to find every row that the field obj_name contains say... 'WIN'  you use LIKE '%WIN%'.
    Edited by: Paul Chapman on Apr 22, 2008 12:32 PM

  • How to design and implement an application that reads a string from the ...

    How to design and implement an application that reads a string from the user and prints it one character per line???

    This is so trivial that it barely deserves the words "design" or "application".
    You can use java.util.Scanner to get user input from the command line.
    You can use String.getChars to convert a String into an array of characters.
    You can use a loop to get all the characters individually.
    You can use System.out.println to print data on its own line.
    Good luck on your homework.

  • I am unable to update my apps now because I receive a message that I am not connected to the Canadian store.   How do I switch from the US store to the Canadian store?

    RI am unable to update my apps now because I receive a message that I am not connected to the Canadian store.   How do I switch from the US store to the Canadian store?

    Click here and follow the instructions to change the iTunes Store country.
    (85848)

  • How do I get the client IP Address from the HTTPServletRequest object

    Hi ppl,
    How do I get the IP address of the client machine from the HTTPServletRequest object?
    Thnx in advance,
    Manoj

    Take a look at: http://java.sun.com/products/servlet/2.2/javadoc/index.html and check for the ServletRequest Interface.
    Be aware also if your web server is using proxy, proxyReverse and so because you could end getting the servers' IP and not client one.

  • How to get the  name of color from the Color Object??

    hi all,
    i want to get the color name from the Color Object i.e say if the Color object is something like
    c=new Color(128,128,128);
    I should be a able to say this object is of gray color dynamically
    Can anyone help???

    You can't do this. There is no label for a color - what is 0x439803 called? 'Mud?' 'Rustic sludge?' 'Poo brown?' - and then that's just English, it might need to be 'Brun de Kaka' or something.
    If you want to check against a certain predefined color you could do the following,
    if (Color.GRAY.equals(myColor))Otherwise you'll have to write your own code to label colors.

  • Returning strings from OLE2 Word object (Forms 4.5)

    Below is an example of how to return string and numeric values from OLE2 objects. In this example the OLE2 object is a MS Word document, and I want to fetch all the bookmarks in the Document into a Forms 4.5 Varchar2. To do this I first need to get the count of bookmarks.
    Getting a string property from an OLE2 object is a common OLE2 requirement but is poorly documented. This is the ONLY way it can be done, as OLE2.INVOKE_CHAR returns a single character not a string. Use OLE2.INVOKE_OBJ, then OLE2.GET_CHAR_PROPERTY which does return a string, as shown below, to return a string from an OLE object (or OLE property).
    Also note how you can only get the child object from its parent, not the grandchild (etc) object, so multiple (cascading) GET_OBJ_PROPERTY calls are required.
    /* by: Marcus Anderson (Anderson Digital) (MarcusAnderson.info) */
    /* name: Get_Bookmarks */
    /* desc: Returns a double quoted CSV string containing the document*/
    /* bookmarks. CSV string will always contain a trailing comma*/
    /* EG: "Bookmark1","Bookmark2",Bookmark3",Bookmark4", */
    /*               NB: This requires that Bookmarks cannot contain " chr */
    PROCEDURE Get_Bookmarks (pout_text OUT VARCHAR2)
    IS
    v_text           VARCHAR2(80);
    v_num                         NUMBER(3);
         v_arglist OLE2.LIST_TYPE;
         v_Application     OLE2.OBJ_TYPE;
    v_ActiveDoc      OLE2.OBJ_TYPE;
    v_Bookmarks          OLE2.OBJ_TYPE;
    v_Item                    OLE2.OBJ_TYPE;
    v_i                              NUMBER(3);
    BEGIN
              v_Application     := LDWord.MyApplication; -- Word doc opened elsewhere
                   /* Set v_num = ActiveDocument.Bookmarks.Count */
    v_ActiveDoc := OLE2.GET_OBJ_PROPERTY (v_Application, 'ActiveDocument');
    v_Bookmarks := OLE2.GET_OBJ_PROPERTY (v_ActiveDoc , 'Bookmarks');
    v_num := OLE2.GET_NUM_PROPERTY (v_Bookmarks, 'Count'); -- NB: Returns numeric property
                   /* Build the output string, pout_text. */
    FOR v_i in 1..v_num LOOP
                        /* Set v_item = ActiveDocument.Bookmarks.Item(v_i) */
    v_arglist := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG (v_arglist, v_i);
    v_Item := OLE2.INVOKE_OBJ (v_Bookmarks, 'Item', v_arglist); -- NB: returns parent object (array element)
    OLE2.DESTROY_ARGLIST (v_arglist);
                        /* Set v_text = ActiveDocument.Bookmarks.Item(v_i).Name */
    v_text := OLE2.GET_CHAR_PROPERTY (v_Item, 'Name');                    -- NB: Returns string/varchar2 property
    pout_text := pout_text || '"' || v_text || '",' ;
    END LOOP;
    END;

    Please repost in the Forms discussion forum.
    - OTN

  • How do I get to the request object in a webflow.

    How do I get to the request object in a webflow.
    I created a input process and one function it needs to do is create a cookie.
    Problem is I don't have a response object.
    How do I create/get the response object so I can create a cookie.
    Thanks
    Michael C Ford
    ------------------ Code Line ------------------------------------
    public Object process(HttpServletRequest req, Object requestContext)
    throws ProcessingException
    // get the pipeline and namespace info for the process
    PipelineSession pSession = null;
    String namespace = null;
    String username = req.getRemoteUser();
    pSession = getPipelineSession(req);
    namespace = getCurrentNamespace(pSession);
    /* ***** DO THE INITIAL CREATE OF THE BEAN *** */
         try {
              Properties props = new Properties();
              props.put(
                   Context.INITIAL_CONTEXT_FACTORY,
                   "weblogic.jndi.WLInitialContextFactory");
              Context ctx = new InitialContext(props);
              Object homeObject = ctx.lookup("com.??.??PortalMgr");
              SeechangePortalMgrHome seechangePortalMgrHome =
              (SeechangePortalMgrHome) javax.rmi.PortableRemoteObject.narrow(
                                                      homeObject,
                                                      SeechangePortalMgrHome.class);
              SeechangePortalMgr portalMgr = seechangePortalMgrHome.create();
    /* Set the initail user */
    portalMgr.setUser(username);          
              UserRuntime userRuntime = (UserRuntime)portalMgr.getRuntimeObject();
              System.out.print("Run Time User is " + userRuntime.getUserName());
              System.out.print("Run Time User is " + userRuntime.getOrgSeq());
    // ** cookies for Actuate XXX=(customer sequence ID), YYY=ZZZ is a dummy per
    their requirement
              Cookie cCustSeqNumber = new Cookie("XXX",userRuntime.getOrgSeq());
              Cookie cPassword = new Cookie("YYY","ZZZ");
              cCustSeqNumber.setPath("/");
              cPassword.setPath("/");
              ??response.addCookie(cCustSeqNumber);
              ??response.addCookie(cPassword);          
         } catch (Exception ee) {
              System.out.print("Unable to create Portal Manager" + ee);
    // at this point we add the logic to produce the bean
    return "success";

    Thanks
    Just what I needed, except I needed to caste response.
    Michael C
    "Daniel Selman" <[email protected]> wrote:
    Michael,
    // get the HttpServletResponse from the HttpServletRequest
    HttpServletResponse response =
    equest.getAttribute( WebflowConstants.HTTP_SERVLET_RESPONSE );
    Cookie cPassword = new Cookie("YYY","ZZZ");
    cCustSeqNumber.setPath("/");
    cPassword.setPath("/");
    response.addCookie(cCustSeqNumber);
    response.addCookie(cPassword);
    You HAVE the HttpServletRequest...
    public Object process(HttpServletRequest req, ObjectrequestContext)
    throws ProcessingExceptionMake sense?
    Dan
    "michael C Ford" <[email protected]> wrote in message
    news:[email protected]...
    How can I get to the response this way ?
    this just stored the response as an attribute did it now ?
    If I don't have it, how can I use it in a setAttribute ?
    Sorry just a little slow
    I can't do this can I ?
    request.setAttribute(WebflowConstants.HTTP_SERVLET_RESPONSE,response);
    Cookie cPassword = new Cookie("YYY","ZZZ");
    cCustSeqNumber.setPath("/");
    cPassword.setPath("/");
    response.addCookie(cCustSeqNumber);
    response.addCookie(cPassword);
    "Daniel Selman" <[email protected]> wrote:
    Michael,
    I found this handy snippet in our code:
    // Put the httpServletResponse into the request, this is done
    in
    case IPs want to
    // use the response to deposit cookies. The IPs maynot howeverwrite
    // anything to the response as this will cause an
    IllegalStateException
    request.setAttribute(WebflowConstants.HTTP_SERVLET_RESPONSE,
    response);
    So, the HttpServletResponse is bound into the HttpServletRequest usingthe
    key, WebflowConstants.HTTP_SERVLET_RESPONSE.
    Magic!
    Sincerely,
    Daniel Selman
    "michael C Ford" <[email protected]> wrote in message
    news:[email protected]...
    How do I get to the request object in a webflow.
    I created a input process and one function it needs to do is create
    a
    cookie.
    Problem is I don't have a response object.
    How do I create/get the response object so I can create a cookie.
    Thanks
    Michael C Ford
    ------------------ Code Line ------------------------------------
    public Object process(HttpServletRequest req, Object
    requestContext)
    throws ProcessingException
    // get the pipeline and namespace info for the process
    PipelineSession pSession = null;
    String namespace = null;
    String username = req.getRemoteUser();
    pSession = getPipelineSession(req);
    namespace = getCurrentNamespace(pSession);
    /* ***** DO THE INITIAL CREATE OF THE BEAN *** */
    try {
    Properties props = new Properties();
    props.put(
    Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    Context ctx = new InitialContext(props);
    Object homeObject = ctx.lookup("com.??.??PortalMgr");
    SeechangePortalMgrHome seechangePortalMgrHome =
    (SeechangePortalMgrHome) javax.rmi.PortableRemoteObject.narrow(
    homeObject,
    SeechangePortalMgrHome.class);
    SeechangePortalMgr portalMgr = seechangePortalMgrHome.create();
    /* Set the initail user */
    portalMgr.setUser(username);
    UserRuntime userRuntime = (UserRuntime)portalMgr.getRuntimeObject();
    System.out.print("Run Time User is " + userRuntime.getUserName());
    System.out.print("Run Time User is " + userRuntime.getOrgSeq());
    // ** cookies for Actuate XXX=(customer sequence ID), YYY=ZZZ isa
    dummy per
    their requirement
    Cookie cCustSeqNumber = new
    Cookie("XXX",userRuntime.getOrgSeq());
    Cookie cPassword = new Cookie("YYY","ZZZ");
    cCustSeqNumber.setPath("/");
    cPassword.setPath("/");
    ??response.addCookie(cCustSeqNumber);
    ??response.addCookie(cPassword);
    } catch (Exception ee) {
    System.out.print("Unable to create Portal Manager" + ee);
    // at this point we add the logic to produce the bean
    return "success";

  • Unable to read payload from the message object in XI

    Hello Guys,
    Please help me about my problem in XI version 7.0.im quite new here.
    im trying to test my config but error message occured. "Unable to read payload from the message object"
    when i checked the comm channel this is the error message :
    Error during database connection to the database URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor': com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "TRAVEL:SelectMethod=cursor" requested by the login. The login failed.'
    when i tried my login in sql it works...but in this message the login is failed..what shall i  do..
    Please advice.
    Thanks in advance
    aVaDuDz

    Hi
    Check with the connection string & Authorization of user you have used.
    MSSQL string is
    jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
    While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
    Thanks
    Gaurav

  • Unable to read payload from the message object

    Hi
    I have a scenario where i am send request to http receiver and getting the response. When I am testing through WFETCH it is working fine. But when i am testing through XI I am getting the follwoing error
    Unable to read payload from the message object
    I have tested the XI payload in mapping. I have done all kinds of testing but it is still giving the same error.
    One more strange thing is
    I have done one BPM scenario where Data is coming from Source to BPM( which is asyn) and then from it will go from BPM to Target (which is sync) But when I am checking the SXMB_MONI... it showing the messages like this
    Source to BPM
    Target to BPM
    Target to BPM.
    But i think it should show message like
    Source to BPM
    BPM to Target
    Target to BPM
    why i am getting the flo

    Hi
    Check with the connection string & Authorization of user you have used.
    MSSQL string is
    jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
    While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
    Thanks
    Gaurav

  • Where to store the Connection object?

    Hi,
    I am using JDBC together with JSF technology to building web applications. I have the following questions:
    1. Where do we usually store the open Connection object so that every class in my web application can make use of it to update or retrieve database data?
    2. Since JSF uses managed-beans which is not a servlet itself, if I store the Connection object as an attribute in the application scope then it can only be retrieved from a servlet.
    3. If I make the Connection object on every class where I would like to have database access, it seems that it is not following good practice since this would create duplicate codes in every Java class which is going to have database access.
    Does anybody have an idea? Thank you.

    Hensome wrote:
    1. But how do I use the managed bean within a servlet? Could you write some simple sample codes?
    2. If I only use simple navigation rules and backing beans, when the submit button is clicked then the action method of the managed bean is triggered. I will then trigger the action which uses JDBC for database access. This whole process does not go through a particular servlet. Is this also possible? If yes, how?
    Thank you.the process does run through a particular servlet, it's the faces servlet and is defined by something that looks like
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
      </servlet> in your web.xml file. You don't have direct access to it, but you can save references to objects in the session or request so other objects can access it. Lets say that your faces code uses a DAO to read some data and you want to pass the data to a servlet, what you need to do something like:
         List data = myDAO.read();
         FacesContext facesContext = FacesContext.getCurrentInstance();
         HttpSession session = (HttpSession)facesContext.getExternalContext().getSession(true);
         session.setAttribute("myData", data);this will save the data object or list in the session as an attribute. Then, when the other servlet runs, you can do something like:
    public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
         HttpSession session = request.getSession(false);
         Object obj  = session.getAttribute("myData");
         List myData = (List)obj;
    }          Now the servlet has access to the list of data read by the faces bean. You shouldn't directly access faces beans themselves from another servlet, you should instead access POJOs that you have defined or collections of them.

  • Error while deleting a row from the Entity Object

    Hi OAF Guys,
    i am unable to delete the newly created row from the entity object.
    let me explain my scenario.
    1. i have a table of which some of the columns are mandatory.
    2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
    3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
    Is there any workaround for this problem.
    Regards,
    Nagesh Manda.

    Hi Tapash,
    I am very sorry for not providing you the complete details of my scenario. Here i am explaining
    1. what code you have placed while creating the row and in validation method on EOImpl.
    while creating a new row i am initializing the primary key of the EO with the sequence value.
    2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
    its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
    3.How are you trying to delete the row ?
    while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
    The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
    Any way appreciate your help tapash.
    Regards,
    Nagesh Manda.

Maybe you are looking for

  • IPhoto Printing Problems - please help!

    Hi All, I'm having continued problems trying to sort out printing from iPhoto '09. I dont have a great printer - Epson Photo r265 so it is a cheapy however it does print fine. If I print from my PC to this printer it works perfectly. Therefore I assu

  • Itunes will not sync photos to ipad 3 properly

    Problems I've had since ipad 3: I download and install latest itunes i tell it to restore from backup of my ipad 2 - it fails, it simply does not give me the choice to pick my ipad 2 restore, so i end up doing new setup. i tell itunes to slectively b

  • Strange networking/NFS problem

    Hello, Occasionaly I'm having NFS slowdowns, then I see this information in dmesg on the client: nfs: server galaxy2 not responding, still trying nfs: server galaxy2 not responding, still trying NETDEV WATCHDOG: eth0: transmit timed out nfs: server g

  • How do I get Photoshop CS6 to recognize fonts

    I have a number of fonts in my windows fonts folder thast do not appear when I am using PS CS6.  I have a bunch of work done on earlier version of PS that use and even need these fonts.  I cnannot update the work because the fonts do not appear in th

  • Robohelp doesn't repond when I have Creative Cloud running?

    About 3 weeks ago, I had to install Adobe's Creative Cloud on my computer. The two apps that I downloaded from CC were, InDesign and Photoshop. I use RoboHelp 9 (soon upgrading to 11) daily. when I run RoboHelp it becomes very slow, sometimes non-res