How to read response header

Hi,
We are using Fiori framework and directly binding a odataservice(entity of a odata service) to a table like following
<Table id="dTable" mode="MultiSelect" updateStarted="handleStarted" 
  items="{/testCollection}" selectionChange="enableDisableButtons">
We are using ODataModel in our view. The model itself triggers the OData service and bind the data. Now we have some custom response headers which we return with the service. We are unable to read the custom header in the requestCompleted event also. Please assist us here and please let us know how we can read these custom response headers
Regards,
Nandakumar

You coud create a procedure like this:
CREATE OR REPLACE PROCEDURE soap_env_pr (p_soap_env IN VARCHAR2)
IS
   v_start     NUMBER;
   v_end       NUMBER;
   v_message   VARCHAR2 (400);
   v_length    NUMBER;
BEGIN
   v_start := INSTR (p_soap_env, '<ns0:Ok>');
   v_length := LENGTH ('<ns0:Ok>');
   v_end := INSTR (p_soap_env, '</ns0:Ok>');
   v_message :=
          SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
   HTP.prn ('Ok: ' || v_message);
   v_start := INSTR (p_soap_env, '<ns0:SessionNumber>');
   v_length := LENGTH ('<ns0:SessionNumber>');
   v_end := INSTR (p_soap_env, '</ns0:SessionNumber>');
   v_message :=
          SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
   HTP.prn ('SessionNumber: ' || v_message);
   v_start := INSTR (p_soap_env, '<ns0:ErrorMessage>');
   v_length := LENGTH ('v_length');
   v_end := INSTR (p_soap_env, '</ns0:ErrorMessage/>');
   v_message :=
          SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
   HTP.prn ('ErrorMessage: ' || v_message);
END;and call it like this:
BEGIN
   soap_env_pr
      ('<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/>
<env:Body>
* <invokeScenarioResponse xmlns:ns0="xmlns.oracle.com/odi/OdiInvoke/" xmlns="xmlns.oracle.com/odi/OdiInvoke/">*
* <ns0:Ok>true</ns0:Ok>*
* <ns0:SessionNumber>2223201</ns0:SessionNumber>*
* <ns0:ErrorMessage/>*
* </invokeScenarioResponse>*
</env:Body>
</env:Envelope>'
END;That would give you this output:
Ok: true
SessionNumber: 2223201
ErrorMessage:Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------

Similar Messages

  • Vc++ how to read column header of cursor

    How to fetch the Column name or header of the stored procedure which is using a cursor as the output.
    P_out  out sys_refcursor
    need to read the column name of this output.
    I am using Vc++ code to reterive the data, in Vc++ how to read column header of cursor

    You haven't provided much detail to go on.  How are you reading data from the ref cursor? Do you already have a reader from it?
    Maybe this helps.
    Greg
    create or replace procedure proc1 (v1 out sys_refcursor) as
    begin
    open v1 for select * from emp;
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class RefCur
        public static void Main()
            using (OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl"))
                con.Open();
                using (OracleCommand cmd = new OracleCommand("proc1", con))
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new OracleParameter("v1", OracleDbType.RefCursor, ParameterDirection.Output));
                    cmd.ExecuteNonQuery();
                    using (OracleDataReader reader = ((OracleRefCursor)cmd.Parameters[0].Value).GetDataReader())
                        for (int i=0;i<reader.FieldCount;i++)
                            Console.WriteLine(reader.GetName(i));

  • How to read response from WebService call

    Hi,
    I am consuming webservices in ABAP. I got proxy classes created. Port is also created.
    I am calling classes generated by proxy in ABAP. Classes creates few structure by system. when i make a call to service, I am not getting importing values in veariables declared. Trace file (in SOAMANAGER ) shows call successful & XML file shows the correct response values, but are not appearing in program variables. I declared variables of same type generated by system.
    My question is, am I missing any step.configuration? or how to read the variables?
    Thanks in advance.
    Sunil

    You coud create a procedure like this:
    CREATE OR REPLACE PROCEDURE soap_env_pr (p_soap_env IN VARCHAR2)
    IS
       v_start     NUMBER;
       v_end       NUMBER;
       v_message   VARCHAR2 (400);
       v_length    NUMBER;
    BEGIN
       v_start := INSTR (p_soap_env, '<ns0:Ok>');
       v_length := LENGTH ('<ns0:Ok>');
       v_end := INSTR (p_soap_env, '</ns0:Ok>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('Ok: ' || v_message);
       v_start := INSTR (p_soap_env, '<ns0:SessionNumber>');
       v_length := LENGTH ('<ns0:SessionNumber>');
       v_end := INSTR (p_soap_env, '</ns0:SessionNumber>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('SessionNumber: ' || v_message);
       v_start := INSTR (p_soap_env, '<ns0:ErrorMessage>');
       v_length := LENGTH ('v_length');
       v_end := INSTR (p_soap_env, '</ns0:ErrorMessage/>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('ErrorMessage: ' || v_message);
    END;and call it like this:
    BEGIN
       soap_env_pr
          ('<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/>
    <env:Body>
    * <invokeScenarioResponse xmlns:ns0="xmlns.oracle.com/odi/OdiInvoke/" xmlns="xmlns.oracle.com/odi/OdiInvoke/">*
    * <ns0:Ok>true</ns0:Ok>*
    * <ns0:SessionNumber>2223201</ns0:SessionNumber>*
    * <ns0:ErrorMessage/>*
    * </invokeScenarioResponse>*
    </env:Body>
    </env:Envelope>'
    END;That would give you this output:
    Ok: true
    SessionNumber: 2223201
    ErrorMessage:Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to read file header/open filein binary mode

    i am using FileConnenction API to read from a file. how can i open a file in binary mode so that i can read file header. In other words i want to open a file in binary mode.

    You can always try looking at the [Header Signatures|http://www.techpathways.com/uploads/headersig.txt]. But it would probably be easier to adjust your application so it doesn't have to guess.
    ~

  • How to read the header of an FLV 1.1 file?

    I would like to read the header of an FLV file and determine
    if it's an FLV 1.1 file, and if so, get it's length. (Without
    downloading the entire file. ) How do I do this?

    bump

  • How to read File Header in JAVA

    I wanna upload a(doc/pdf) file from client site, where I hv to check whether the the file is originally a doc/pdf file or not, I mean not just the extension, but the actual header information of the file. Please some body help me to do this, I dont know how to read the file header. Thnx in advnc.

    You can always try looking at the [Header Signatures|http://www.techpathways.com/uploads/headersig.txt]. But it would probably be easier to adjust your application so it doesn't have to guess.
    ~

  • How to set response header in filter

    Hi,
    i want to set the response header in my security filter:
    private void setHeader() {
              FacesContext ctx = FacesContext.getCurrentInstance();
              if (ctx != null){
                   HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
                   response.setHeader("Pragma", "No-Cache");
                   response.setDateHeader("Expires",0);
                   response.setHeader("Cache-Control", "no-cache");
         }But ctx is always null? What am i doing wrong?
    Regards,
    barnti

    My understanding is you will not have Faces Context in a filter as you have not yet hit the faces lifecycle..
    Try the below to get the context.
         * (non-Javadoc)
         * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
        public void init(FilterConfig config) throws ServletException {
            setFilterCfg(config);
            setServletCtx(filterCfg.getServletContext());
         * Since your typical FacesContext.getCurrentInstance() will probably be
         * null due to the fact we have not hit the faces lifecycle yet, we must dup
         * some of the faces servlet code here to create a new current instance.
         * @param req
         * @param res
         * @return FacesContext which is fresh and virtually empty.
        protected FacesContext getFacesContext(ServletRequest req,
                ServletResponse res) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            if (facesContext != null) {
                return facesContext;
            //     Use the FactoryFinder to grab the Lifecycle object
            FacesContextFactory contextFactory = (FacesContextFactory) FactoryFinder
                    .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
            LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder
                    .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
            Lifecycle lifecycle = lifecycleFactory
                    .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
            facesContext = contextFactory.getFacesContext(servletCtx, req, res,
                    lifecycle);
            ProtectedFacesContext.setFacesContextAsCurrentInstance(facesContext);
            return facesContext;
        }

  • How to change response header from bex application?

    HI.
    I'd like to change language coding 'charset=gb2312' to 'charset=big5' and don't need to add neither 'big5' language package or unicode in server
    because the contents are input as 'big5' so I just need change charset incoding type.
    and even if I insert html code
    '<meta http-equiv="content-type" content="text/html; charset=big5">'
    very top of template.
    'big5' is not working because the response header is set as 'gb2312'.
    and as I said before don't need to install lanaguage package to server.
    just want to change response header
    but don't know how to do that.
    is there anyone who knows tip for this?
    thank you.

    Just to close this topic.
    I have reported a bug to Android project, because bottom-line they are responsible for the error - not SAP BEx.
    Anyone interested can see the bug report here:
    [http://code.google.com/p/android/issues/detail?id=24257]
    If you decide to look at the bug report, please mark it with a Star to bring focus on this problem.
    Best regards,
    Jacob

  • How to read a Header Attachment in Item component ??

    Dear Experts,
    My Scenario is as follows :
    1. In quotation Overview page ( BT115QH_SLSQ/SQHOverView ),  I have an assisngment block call 'Attachments'. User can create URL attachment here. It is Std. Attachment ( component GS_CM , view Doclist ) Assignment Block and no enhancements are done for it.
    2. The quotation overview page also have an items view ( BT115QIT_SLSQ/Items ) .
    My requirement is in some eventhandler in view BT115QIT_SLSQ/Items , i want to read an attachment of the header , ie. say 1st row content of what gets displayed under Attchment Assignment Block for that quotation.
    How can i get around this ?
    Is it possible to read header attachment in item component ? how to do that ?
    Any guidence or suggestions are highly appreciated !!
    Thanks & Regards,
    Suchita

    Hi Carsten,
    I tried using Custom Conroller, but i always got the entity on CMBO as initial in my event handle as it was getting called before CREAT_CMBO of custom controller was called.
    But it was very good suggestion and i got to learn many things about custom controller as i had never worked much on custom controller related coding.
    However, my issue got resolved with CL_CRM_BSP_CM_CONTROL class , method get_documents.
    Once again thanks...thanks a lot for the prompt help you gave.
    Thanks & Regards,
    Suchita
    P.S. : in component BT115QIT_SLSQ i created custom controller and related coding as you suggested, In the same compoent BT115QIT_SLSQ, i also have a view ZZ___ ,& in its DO_init_context, i called custom contoller using
    lr_cuco ?= get_custom_controller( ).
    and then i did 
    lr_entity =  lr_cuco->typed_context->CMBO->collection_wrapper->get-current( ).
    here i always got lr_entity as initial.
    On debugging, i found that everything was gettting executed properly in ON_NEW_FOCUS method of CMBO, but still the collection was with 1 entity with empty attribut_ref in ON_NEW_FOCUS. and hence lr_entity used to be inital. The instid, typeid were had correct values taken from focus_bo ( which is btadminh instance) , stilll entity_list in collection was with 1 empty entity. I expected here values in attr_ref of the entity in enity_list but there were no values for the properties in structure Attribut_ref.
    I did not understand this.
    Also, after Do_init_context of my view ZZ___, the break point used to halt at CREATE_CMBO( )  statement. I tried with Do_prepare_output , but same stroty again, the breakpoint halted at create_cmbo() , after do_prepare_output was called.
    Any idea why would be such behaviour ?

  • How to read 'clicked header' AND selected row from multicolumn listbox?

    I have a multicolumn listbox filled with 6 columns and about 500 rows.
    I want the user to be able to click on a column header, and sort the listbox alphabetically on that column. I've written the code for that, and that works. (using the 'itemnames' en 'get clicked col hdr' properties.)
    However, I also want to include the option, that when a user highlights a row, and then clicks on the header, that after the listbox gets sorted it scrolls down to the selected row.
    (So that the user doesn't have to search for it)
    And that's where things go wrong, because the value of the listbox changes to zero when you click on a column header. No I idea why it does that, but it's rather
    annoying. Can I change that behaviour somehow?
    Or any ideas how to get around it?

    My thanks to you and Jared.
    Seems I got a working solution now.
    Did take a while to figure out why your solution worked. Basicly, you're reading the row from a few iterations before.
    As soon as I understood that, I simplified it a little. Look at the attached file... I think it does the same. :-)
    Jared asked for the sorting routine. As I don't seem to be able to attach files when replying to comments, I took the liberty to include it here also.
    Basicly, I just use the 'sort 1D array' that comes with Labview 6. To be able to sort a 2D array, I convert every row to a cluster. That's something the 'sort 1D array' VI can handle nicely.
    To sort on the correct column, I just cut all columns in front, and paste them behind again. A
    fter sorting, I reverse the process.
    Anthony.
    Attachments:
    copy2_of_multicolumn.vi ‏26 KB
    sort_2d_string_array.vi ‏34 KB

  • How to read BP header data in standardaddress context node

    Hi,
    we have the next requirement in CRM 7.0 WebUI:
    In view BP_ADDR/StandardAddress the field STRUCT.TELEPHONETEL should only be an input field if the authorization group of the business partner has a certain value. So I tried to solve this in the I-getter method for this STRUCT.TELEPHONETEL field by reading the authorization group and change the rv_disabled value.
    How should I read the authorization group? This is field STRUCT.AUTHORIZATIONGROUP and belongs to the HEADER node.
    Can you please supply me an example code for this?  
    Thanks in advance!!
    Kind regards,
    Roy Willems

    Hi,
    In the get_i method use the below code to get BuilHeader entity.
    Data: lv_entity type ref to cl_crm_bol_entity.
    lv_entity ?= collection_wrapper->current( ).
    lv_entity ?= lv_entity->get_parent( ).
    if lv_entity is not bound.
       lv_authgrp =   lv_entity->get_property_as_string( iv_attr_name = 'AUTHORIZATIONGROUP' ).
    endif.
    Regards,
    Arun
    Edited by: Arun Kumar on Aug 9, 2010 12:58 PM

  • How to read http  header from Forms

    Hi,
    I have a forms application deployed on 10g AS. We are planning to integrate Oracle Identity management with our forms application. Currently, I access my forms application with an url, say http://hostname/forms/frmservlet?config=test. And, I get a Signon form, where I capture the logon and pwd, and specific to the user credential, I show another form. By integrating my appln with Identity management, I would be protecting my resource in the oracle access system, the WebGate component will do the backend authentication process along with the access server and the directoy service. Upon successful authentication, the DN form the LDAP repository (lets say the userid of my forms application) for the user is returned to the WebGate as http header information/cookie by the Access System. Now without altering the code in frmservlet Servlet, I need to capture the http header info (which contains the userid for the forms application of the user) in my default Signon form. How can I capture this?
    Can someone please help
    Regards,
    Suresh

    hi
    the following link may helpful to you
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
    Regards
    Prasanna Yalam

  • How to read responsibility level profile in forms personalization r12.1.3

    All, I have one custom profile option at responsibility level. I am wondering if I can read that value in WHERE CLAUSE of a WHEN_VALIDATE_RECORD trigger?
    I am trying to access responsibility level profile option using "${ps.up_prior_gl_period_allow.VALUE}". But, it doesn't seem to work.
    However, I am able to read site level profile option using "${ps.up_prior_gl_period_allow.VALUE}".
    Please help.

    Have you tried using fnd_profile.get_specific()?

  • How to get response header using ActionScript and MXML?

    So... I have a URL like www.example.com/stream/
    I need to make any request to this url and get Http Rewspons header (like this one:
        HTTP/1.0 200 OK
        Content-type: video/x-flv
        Cache-Control: no-cache
    I do not need reponse body at all. After I get header need to emmidiatly close connection to that url (so stop to obtain data from it)
    How to do such thing (I use Flash builder)?

    Hai Mahesh
    Check the following Code
    Data : i_entamiot     LIKE   ehswas_entamiot.
    DATA: gv_batchattributes LIKE bapibatchatt.
    DATA: batchstatus    LIKE bapibatchstatus.
    DATA: lt_bapi_ret        LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
          CALL FUNCTION 'BAPI_BATCH_GET_DETAIL'
            EXPORTING
              material        = i_entamiot-matnr
              batch           = i_entamiot-charg
              plant           = i_entamiot-werkss
            IMPORTING
              batchattributes = gv_batchattributes
              batchstatus     = batchstatus
            TABLES
              return          = lt_bapi_ret.
    Thanks & regards
    Sreenivasulu P

  • Read SOAP Header Information

    Hello All,
    We want to read SOAP header from incoming message. We followed blog from William to use the option "Do not use SOAP Envelop". However, we are not sure if we need to modify Sender Interface to include Envelope / Header in the message structure itself.
    How to Read SOAP Header Information
    If we modify the message structure , it changes the WSDL as well and generating request message something like below :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aif="urn://transport.nsw.gov.au/test/poc/aif">
       <soapenv:Header/>
       <soapenv:Body>
          <aif:Envelope>   <------- Added by Modifying the structure
             <Header>
                <FileType>?</FileType>
             </Header>
             <Body>
                <MessageHeader>
                   <!--Optional:-->
    How can we use  "Do not use SOAP Envelop" feature without modifying the WSDL structure?
    If we don't modify the message structure , it is failing to identify the receiver and also we would not be able to see the fields while doing graphical mapping.
    Thanks !!

    Hi,
    Did you check the namespaces in your receiver determination? In interface determination, this could be solved by creating another mapping. Which PI version are you using?
    Regards,
    Mark

Maybe you are looking for

  • Spry Photo Gallery - How to add links to images

    I was wondering if any one knew how I could add individual links to images on the spry Photo Gallery-An XML-based photo gallery. I need each image to have its own individual link when clicked on. Any assistance would be most helpful.

  • Exception [TOPLINK-46] (OracleAS TopLink - 10g (9.0.4) (Build 031126))

    Hi, I am using TopLink for simple Department-Employee relation, i have my project xml configured, But i am facing the problem with following exception Descriptor Exceptions: Exception [TOPLINK-46] (OracleAS TopLink - 10g (9.0.4) (Build 031126)): orac

  • Performance issue with "not in"

    Hi, I have a query, where, in the WHERE CLAUSE of the query I have a condition using IN operator. The query also has another CONDITION same as above but with a NOT IN operator. Both are on the same column. The difference between them being the values

  • Business rule in EPM 11

    I have a business rule which is in production(System 9.2) and is running. We are currently in the process of building the same application in our EPM 11 envirionment and when we test the rule it fails. The rule just keeps running on, eventually we ki

  • Project system related PP issue

    Hi dudes, here i have a requirement that if i assign a material to a project which is having a production BOM, i have to enter the BOM data in the project master data manually. Is there any way to get BOM data automatically picked to project master d