Setting Custom HTTP headers

Hi, is there a way to set custom http headers at server or webapplication level
on weblogic 60, instead of programmatically setting them on each page? If so how.
Thanks.

Well we need to set a custom header for all http requests to the weblogic server.
If we could set it at the server level, instead of modifying all the pages served
by the webserver that would be best and most efficient. Here is a link that describes
it and how other webservers handle it. http://webmaster.info.aol.com/headers.html.
Currently apache, iis, and netscape webservers allow u to define custom http headers
at the server level. Thanks.
"Mark Griffith" <[email protected]> wrote:
Nope. Can you give me a scenario, use-case? And do other WS handle
this,
if so how?
cheers
mbg
"Diana" <[email protected]> wrote in message
news:3ec01580$[email protected]..
Hi, is there a way to set custom http headers at server or webapplicationlevel
on weblogic 60, instead of programmatically setting them on each page?If
so how.
Thanks.

Similar Messages

  • How to set Custom HTTP headers in HTTP binding?

    How to set custom HTTP headers before sending the Rest based request in HTTP binding?

    sharon38_74 wrote:
    they said that our internal application needs to send a "login request" to etran via SSL with the user's information encoded in base 64 format. etran captures the HTTP header containing user authentication and authorization information, and parses the required information from the HTTP header.
    My question is that how I set user information in HTTP header? From my understanding, once I am able to set the user information in HTTP header, it is in base 64 format?Your application need to act like a proxy. You can invoke a HTTP request programmatically using java.net.URLConnection. You can set request headers using URLConnection#setRequestProperty(). Also see the API docs: [http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html]. You only need to know the header field name where to set the Base64-encoded value in. You need to Base64-encode the value yourself.

  • Generate PDF using Managed Bean with custom HTTP headers

    Background
    Generate a report in various formats (e.g., PDF, delimited, Excel, HTML, etc.) using JDeveloper 11g Release 2 (11.1.2.3.0) upon clicking an af:commandButton. See also the StackOverflow version of this question:
    http://stackoverflow.com/q/13654625/59087
    Problem
    HTTP headers are being sent twice: once by the framework and once by a bean.
    Source Code
    The source code includes:
    - Button Action
    - Managed Bean
    - Task Flow
    Button Action
    The button action:
    <af:commandButton text="Report" id="submitReport" action="Execute" />
    Managed Bean
    The Managed Bean is fairly complex. The code to `responseComplete` is getting called, however it does not seem to be called sufficiently early to prevent the application framework from writing the HTTP headers.
    HTTP Response Header Override
    * Sets the HTTP headers required to indicate to the browser that the
    * report is to be downloaded (rather than displayed in the current
    * window).
    protected void setDownloadHeaders() {
    HttpServletResponse response = getServletResponse();
    response.setHeader( "Content-Description", getContentDescription() );
    response.setHeader( "Content-Disposition", "attachment, filename="
    + getFilename() );
    response.setHeader( "Content-Type", getContentType() );
    response.setHeader( "Content-Transfer-Encoding",
    getContentTransferEncoding() );
    Issue Response Complete
    The bean indirectly tells the framework that the response is handled (by the bean):
    getFacesContext().responseComplete();
    Bean Run and Configure
    public void run() {
    try {
    Report report = getReport();
    configure(report.getParameters());
    report.run();
    } catch (Exception e) {
    e.printStackTrace();
    private void configure(Parameters p) {
    p.put(ReportImpl.SYSTEM_REPORT_PROTOCOL, "http");
    p.put(ReportImpl.SYSTEM_REPORT_HOST, "localhost");
    p.put(ReportImpl.SYSTEM_REPORT_PORT, "7002");
    p.put(ReportImpl.SYSTEM_REPORT_PATH, "/reports/rwservlet");
    p.put(Parameters.PARAM_REPORT_FORMAT, "pdf");
    p.put("report_cmdkey", getReportName());
    p.put("report_ORACLE_1", getReportDestinationType());
    p.put("report_ORACLE_2", getReportDestinationFormat());
    Task Flow
    The Task Flow calls Execute, which refers to the bean's `run()` method:
    entry -> main -> Execute -> ReportBeanRun
    Where:
    <method-call id="ReportBeanRun">
    <description>Executes a report</description>
    <display-name>Execute Report</display-name>
    <method>#{reportBean.run}</method>
    <outcome>
    <fixed-outcome>success</fixed-outcome>
    </outcome>
    </method-call>
    The bean is assigned to the `request` scope, with a few managed properties:
    <control-flow-rule id="__3">
    <from-activity-id>main</from-activity-id>
    <control-flow-case id="ExecuteReport">
    <from-outcome>Execute</from-outcome>
    <to-activity-id>ReportBeanRun</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <managed-bean id="ReportBean">
    <description>Executes a report</description>
    <display-name>ReportBean</display-name>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    The `<fixed-outcome>success</fixed-outcome>` strikes me as incorrect -- I don't want the method call to return to another task.
    Restrictions
    The report server receives requests from the web server exclusively. The report server URL cannot be used by browsers to download directly, for security reasons.
    Error Messages
    The error message that is generated:
    Duplicate headers received from server
    Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.Nevertheless, the report is being generated. Preventing the framework from writing the HTTP headers would resolve this issue.
    Question
    How can you set the HTTP headers in ADF while using a Task Flow to generate a PDF by calling a managed bean?
    Ideas
    Some additional ideas:
    - Override the Page Lifecycle Phase Listener (`ADFPhaseListener` + `PageLifecycle`)
    - Develop a custom Servlet on the web server
    Related Links
    - http://www.oracle.com/technetwork/middleware/bi-publisher/adf-bip-ucm-integration-179699.pdf
    - http://www.slideshare.net/lucbors/reports-no-notes#btnNext
    - http://www.techartifact.com/blogs/2012/03/calling-oracle-report-from-adf-applications.html?goback=%2Egde_4212375_member_102062735
    - http://docs.oracle.com/cd/E29049_01/web.1112/e16182/adf_lifecycle.htm#CIABEJFB
    Thank you!

    The problem was that the HTTP headers were in fact being written twice:
    1. The report server was returning HTTP response headers.
    2. The bean was including its own HTTP response headers (as shown in the question).
    3. The bean was copying the entire contents of the report server response, including the headers, into the output stream.
    Firefox ignored the duplicate header errors, but Google Chrome did not.

  • Using custom http headers in SOAP sender adapter

    Hi,
    my problem is exactly the same as reported [here|Re: SOAP Sender - Extract Header Values;] and [here|Variable Transport Binding - Soap Sender;
    Basically I'd like to send through the soap sender adapter some custom http headers. I check the necessary options in the advanced tab (set adapter-specific message attributes and variable transport binding), and in the variable header one I put x-StoreCode, which is the same http header I send to PI.
    But I won't see anything in the dynamic configuration section when the message is persisted in PI.
    Very surprised that I've seen this issue is a common problem others have faced before without success.
    Thanks!

    Hi Michal,
    the extra info I'm trying to send separated from the message is an http header, not part of the query string.
    If I incorporate the extra info as a parameter to the query string like this, for example:
    http://host:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=S1&receiverParty=&receiverService=&interface=Int&interfaceNamespace=urn:test&x-StoreCode=13&nosoap=true
    Then I can see the value in the dynamic configuration section:
    <SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="SQueryString">senderParty=&senderService=S1&receiverParty=&receiverService=&interface=Int&interfaceNamespace=urn:test&x-StoreCode=13&nosoap=true</SAP:Record>
    But what I'm trying to do shoould be possible, according to sap help:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm (section Define Adapter-Specific Message Attributes)

  • Adding custom http headers for WSRP requests

    Hello,
    I wonder whether it is possible to insert custom http headers for WSRP
    requests?
    To give more details:
    We are going to have portlets exposed via WSRP (hosted on non-weblogic
    server). We need these portlets to work on different portals including
    WebLogic Portal. And we need to have working SSO. There needed at least
    2 SSO options:
    1. Having SiteMinder protected portal. Will WebLogic pass SiteMinder
    headers further to WSRP producer?
    2. Custom SSO tokens to be passed as http headers. Is it possible to
    make weblogic to add custom http headers when calling producer?
    2a. Credential mapping shall be used to get username/password for
    backend application (accessed from producer side), and than these
    username/password shall be passed as http headers when requesting producer.
    Best regards,
    Sviatoslav Sviridov

    Hi,
    About how to use Rest API via node.js, please refer to
    http://stackoverflow.com/questions/5643321/how-to-make-remote-rest-call-inside-node-js-any-curl for more information. Hope this helps.
    Best Regards
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to set custom HTTP header for single sign on

    Currently we just begin to use an application called "etran". This application requires user name and password to login. Now, my assignment is to integrate etran application in our internal application. This means that somewhere in our internal application, there is a link leads to the etran application.
    It is going to be single sign on, that means that once user logs into our internal application, when he/she clicks on the etran link, no sign on to etran is needed.
    I consult with the technical people in etran. they said that our internal application needs to send a "login request" to etran via SSL with the user's information encoded in base 64 format. etran captures the HTTP header containing user authentication and authorization information, and parses the required information from the HTTP header.
    My question is that how I set user information in HTTP header? From my understanding, once I am able to set the user information in HTTP header, it is in base 64 format?
    Thanks in advance for your help.

    sharon38_74 wrote:
    they said that our internal application needs to send a "login request" to etran via SSL with the user's information encoded in base 64 format. etran captures the HTTP header containing user authentication and authorization information, and parses the required information from the HTTP header.
    My question is that how I set user information in HTTP header? From my understanding, once I am able to set the user information in HTTP header, it is in base 64 format?Your application need to act like a proxy. You can invoke a HTTP request programmatically using java.net.URLConnection. You can set request headers using URLConnection#setRequestProperty(). Also see the API docs: [http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html]. You only need to know the header field name where to set the Base64-encoded value in. You need to Base64-encode the value yourself.

  • How to set the HTTP headers in HTTP Binding to call RESTful service

    I'm calling a RESTful service from the SOA Composite through a BPEL process. The RESTful service need few values to be set in the HTTP header to authorize the request. I tried several different options like setting the headers in the invoke service etc., but in vain. Apparently, the web service call fails for not having header information.
    I have burnt several days on this. Can somebody help me to get through this please?
    I'm using SOA composite 11.1.1.4 on WLS 10.3.4.
    Thanks in advance.
    The exception -
    <Oct 19, 2011 1:01:59 PM CDT> <Error> <oracle.webservices.service> <OWS-04086> <javax.xml.rpc.soap.SOAPFaultException: oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): https://txganguat.txd
    ps.state.tx.us/TxGang
    at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.generateSoapFaultException(WebServiceEntryBindingComponent.java:1053)
    at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.processIncomingMessage(WebServiceEntryBindingComponent.java:890)
    at oracle.integration.platform.blocks.soap.FabricProvider.processMessage(FabricProvider.java:113)
    at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:1187)
    at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:1081)
    at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:581)
    at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:232)
    at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:192)
    at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
    at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

    any updates on this? Running into the same issue!
    Thanks

  • SOAP Sender Adatper - Read custom http header field

    Hello,
    i try to read a custom http header into the dynamic configuration of a message - but it is not working as expected - in ASMA i configured to get the value of MYHEADER1 into XHEADERNAME1 - when testing with a MYHEADER1 value, the value is not put into XHEADERNAME1.
    Is it possible to get custom HTTP Headers in the message?
    bf
    franz

    I have quite the same problem!
    I try to make the receiver determination based on the content of XHeaderName1, but none of the Dynamic Configuration parameters is shown in the sxi_monitor.
    I've described my scenario in more detail in this thread
    http://scn.sap.com/message/13586532#13586532
    Does anyone have an idea?

  • Custom Http header in remote object

    Hi, how to set custom http header in http request while using remote object in flex?

    Thank You, Patrick.
    You are best :)
    I read this APEX_WEB_SERVICE documentation before,
    but after I read once more time
    I found most important words "global variable g_request_headers".
    I think these variables must be described more in documentation.
    On APEX I did:
    1) Create New Page -> Form -> Form and Report On Webservice Results.
    2) Set all webservice paramters in page wizard.
    3) And create a new page process after submit:
    Begin
    apex_web_service.g_request_headers(1).name := 'username';
    apex_web_service.g_request_headers(1).value := ' ... ';
    apex_web_service.g_request_headers(2).name := 'password';
    apex_web_service.g_request_headers(2).value := ' ... ';
    End;
    4) It's most important that this process must be done before the webservice process.
    Good luck

  • Invoke stateful ws: Can't get HTTP headers with CustomHeaderHandler

    Hello,
    I am trying to invoke a stateful ws as described here (http://www.oracle.com/technetwork/middleware/ias/callingstatefulwsfrombpel-091022.html).
    I can succesfully send custom http headers declaring a CustomHeaderHandler.
    However, when I try to access the data on the response I cannot get the headers. Hence, I can't get the session ID to pass around. According to what I've seen it should be in the pCallProps variable from the inovke method on the Handler. However that only has: pCallProps [tracking.compositeInstanceId, tracking.conversationId] as keys.
    I'm working on soa version 11g.
    Any input is appreciated. If I need to expand information, please ask and I will.
    Thanks in advance!

    Not sure this will help, but here goes:
    I looked through your stack trace for a phrase that is relatively unique and summarizes the problem. I then google searched on it.
    Here is what I googled on:
    com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    I found this that might be of help:
    http://dev.mysql.com/doc/refman/4.1/en/connector-j-usagenotes-troubleshooting.html#qandaitem-19-4-5-3-7
    In that document I found this:
    "The error probably indicates that you are using a older version of the Connector/J JDBC driver (2.0.14 or 3.0.x) and you are trying to connect to a MySQL server with version 4.1x or newer. The older drivers are not compatible with 4.1 or newer of MySQL as they do not support the newer authentication mechanisms.
    It is likely that the older version of the Connector/J driver exists within your application directory or your CLASSPATH includes the older Connector/J package.
    Also, the word 'NonRegisteringDriver' above indicates your JDBC (which is a driver_ is a non registering type.
    I suggest you hit the MySql home page and see if you can download a newer driver.

  • Setting http headers in weblogic

    Hi,
    We would like to know how http response headers can be set in weblogic server
    8.1.
    This information is urgenty needed.
    Quick response will be appreciated.

    Thanks for the pointer. Didn't realize you had to construct the notification from scratch in order to add custom headers.
    The only thing missing is how to set the HTTP verb that notification hubs sends down to the client. This is needed for
    X-WNS-Match as this header needs to be sent with an HTTP delete per the MSDN docs.
    For those interested here's a code snippet to send silent toasts to the phone. For universal phone apps you will be using WNS rather than MPNS.
    private static async Task SendNotificationAsync()
    var hub = NotificationHubClient.CreateClientFromConnectionString("<connection string with full access>", "<hub name>");
    var toast = @"<toast><visual><binding template=""ToastText01""><text id=""1"">Hello from a .NET App!</text></binding></visual></toast>";
    var headers = new Dictionary<string, string> { { "X-WNS-SuppressPopup", "true" } };
    var notification = new WindowsNotification(toast, headers);
    await hub.SendNotificationAsync(notification);

  • Setting HTTP Headers

    Hi,
    How do I set/add the HTTP headers in the webservice soap client(Call object)?
    Any pointers/code samples will be of good help.
    Regards
    Kumza

    Hi,
    I have the same problem and I have tried your solution but the problem persists.
    The point is that, in my case, getMessage() returns NULL so I cannot set the header.
    Any idea or suggestion?
    Thank you very much in advance.
    Juan

  • Setting http headers from Cisco Content Services Switch

    Hi
       is it possible to set the http response headers for some particular type of requests.
    we want to set the http header (
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    Cache-Control) for statuc resources to force browser/proxy server to cache them for a particular amount of time.
    From the following confuguration guide it looks it is not possible. is it correct ?
    Cisco Content Services Switch
    Content Load-Balancing
    Configuration Guide
    Software Version 8.10
    thank you very much for your help.
    Regards
    Hafiz

    Hafiz
    You will get a faster and much better response if you move this post into the "Data Center - Application Networking" forum where they deal specifically with load-balancing issues.
    Jon

  • Setting HTTP headers when using xrpcc

    I am using xrpcc to compile my WSDL and am using the resulting code to access my web service. When accessing a web service this way, is there any way that I can set HTTP headers before the method is invoked? If not, is the only option to build all of the SOAP requests by hand and ditch all of the nice things xrpcc does for me?
    Along those same lines, is there any way to get a dump of the SOAP envelope that is being sent when the xrpcc generated methods are invoked?
    Thanks.

    Damn, I need to read the HTTP headers that came in along with the SOAP JAXRPC message. So it looks like a similar problem. And noone answers this question. Damn.

  • Setting HTTP headers from Xcelsius

    Hello,
    Does anyone know whether it is possible to set HTTP headers during Xcelsius web service or XML data calls?
    Regards,
    Gilbert

    Hello Victor,
    Both the XML data and the web service calls i am doing end up at agents that act on the content of the HTTP headers. For instance, the SOAP node that is listening to my web service calls uses the soapAction HTTP header for further routing of the call. That header is specified in the WSDL, but i need to be able to change it without changing the WSDL i.e. i would have to set the soapAction header. My end app can listen to the SOAP headers but the intermediary only HTTP headers.
    Regards,
    Gilbert

Maybe you are looking for

  • Apple Remote Control and Pismo

    Here's one for you. Just bored at work, so I thought I'd throw this out there. While researching a way of using the Apple Remote Remote Control (IR) on a Mac Pro, by maybe hacking up an old broken Pismo and using it's sensor, I wondered if the remote

  • Can you SEPARATELY backup multiple hard drives with Time Machine?

    I have an IMAC (let's call it HD A) and an external HD (Let's say HD B) with all my photos on. I would like to use time machine to back HD A on another external HD (HD C) and HD B (the one with the photos) on another HD called HD D. Is that possible?

  • Add a watermark, the hard way

    Hi. I've been drooling over the Acrobat 7.0 SDK documentation. It talks about an addWatermarkFromFile() function in JavaScript. You lucky, lucky, lucky people. I have Acrobat 6.0 (Pro). Ugh. You can add a watermark in the application, but there is no

  • How toTrigger a workflow on saving invoice

    what are the different ways of triggering a workflow in generic? And in particularly when an parked invoice(without PO) is saved. Appreciate your inputs. thanks, Vinay

  • Is there any way to buy albums on the french site?

    I would like to purchase music from the French i-tunes store.  The music is not available in the US store.  I was told I have to be a resident of France, with a French Credit Card and adderss.  Seems rediculous in a world market to not allow electron