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.

Similar Messages

  • HTTP headers vs HTTP URLs

    Could someone please explain the very subtle difference between HTTP headers vs HTTP URLs?
    Thanks.

    Hi,
    The URL is the resource location with or without additional parameters that will be requested - e.g. www.cisco.com or http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&needs_authentication=yes&forum=Data%20Center&
    The HTTP headers on the other hand are additional parameters that are part of the HTTP protocol. They define things like Cookies, the referrer etc. A list of headers can be seen at http://en.wikipedia.org/wiki/List_of_HTTP_headers.
    It is also possible to add your own headers - usually prefixed with X-.
    If you look at the dissection of an HTTP conversation captured by Wireshark you'll see how the headers are used.
    HTH
    Cathy

  • How to set custom font family in qml label in black berry 10 os

    how to set custom font family in label text  qml in black berry 10 OS

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • How to set custom master page for social/sites.aspx in sharepoint 2013

    How to set custom master page for social/sites.aspx in sharepoint 2013.?
    File path is
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\SocialDataStore\SocialDataStoreList\sites.aspx
    Thanks in advance

    Hi,
    You could open the sites.aspx in Notepad or SharePoint designer, and set the master page to your own master page directly via editing:
    <%@ Page language="C#" MasterPageFile="~masterurl/custom.master"      Inherits="Microsoft.SharePoint.Portal.WebControls.FollowedContentWebPartPage,Microsoft.SharePoint.Portal,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
    %>
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to set custom size of Close Button e.g. 32x32  of Title Window in Flex 4

    How to set custom size of Close Button e.g. 32x32 of Title Window in Flex 4?

    Hi
    Here is the code of the Button in the skin class of spark title window.
    <s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
                              width="15" height="15" right="7" top="7" />
    So first change the default height and width from 15 to 32. Then in the Button Skin class i.e. spark.skins.spark.TitleWindowCloseButtonSkin change paths to modify the cross symbol.
    Hope this helps
    Rush-me

  • CR 2008 SDK: how to set custom paper size?

    Dear forum users, I'm trying to use Crystal Reports 2008 SDK to print barcode labels to a Datamax Printer.
    The printer uses a custom page size. Can anyone tell me how to set custom page size and margins using C# and CR2008 SDK?
    Best regards
    Alessandro

    I'm experiencing this problem: I need to print barcode labels which are 4 x 9 cm each (a custom paper size). The report has been build correctly, orientation is right but when I print the labels programmatically by an application I made the label gets printed in a wrong way.
    In particular, orientation and paper size are not correct.
    So I would like to try to force both of them (both the orientation and the custom paper size). How can I do that?
    Best regards
    Alessandro

  • 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 up site CORRECTLY for HTTPS?

    hi,
    I have a site up and running in Developement and Test servers using HTTP. I also got it up and running with HTTPS. However this doesnt seem to work all the time. Sometimes the portal seems to creaete the URL without the HTTPS causing it to go to the Home page.
    Is there any configuration files or articles that describe all the steps that need to be done to get the portal ready for HTTPS?
    One are I have a probloem is the Visitor Tools when I apply theme, it redirects to HTTP instead of HTTPS and this causes the Customize Portal to disappear and the Home page to be displayed.
    THANKS in advance.
    charlene

    Maybe this can help?
    http://www.cisco.com/en/US/docs/routers/access/500/520/software/configuration/guide/520scg_vpn_gre.html

  • How to set custom master page for sharepoint application page ?

    Hello,
    I need to apply custom master page for the custom application page I created for login purpose.
    Can anyone please let me know how to apply master page for custom application page ?
    Note : I need to set custom master page for application page at web application level.
    thanks,
    Dipti Chhatrapati

    Hi Dipti,
    You can use the same reference as ASP.NET
    Example
    "<%@ Page Language="C#" masterpagefile="../_catalogs/masterpage/minimal.master" title="teste" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full"
    meta:progid="SharePoint.WebPartPage.Document" %>"
    You can use SharePoint Designer 2010
    http://www.microsoft.com/download/en/details.aspx?id=16573 to make the reference from you aspx page to you custom masterpage.
    When you are editing a aspx page you can go to ribbon "Style" and attach the custom Masterpage.
    André Lage Microsoft SharePoint, CRM Consultant
    Blog:http://aaclage.blogspot.com
    Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/

  • 10.6.6 - How to set custom view options for specific folders

    How is it that Windows has had the ability to ability to set custom folder view options forever and OSX can't. What is the big deal? Just do it. Whenever I set the folder view options it changes the view for all the folders. I can do folder specific changes as long as the finder window is open then I close it and open it again every folder is the same again. It's just an annoyance and it's something so rudimentary it's embarrassing.

    Try the following:
    I want to have, say, one folder in list view
    Open that folder, set it to list view, type command-J, and in the view-options window that opens, check the box at the top for "Always open in list view".
    then the subfolder of that folder I want to have in cover flow view. permanently.
    Open that folder, change it to cover-flow view, and in the view-options window check the box at the top for "Always open in cover-flow."
    Those two folders should "remember" the custom views that were set for them.
    There's additional discussion about the meaning of the"Use as defaults" button in this thread
    http://discussions.apple.com/thread.jspa?messageID=13063792
    My own take is that folders that have not been customized by checking the "Always open in xxx view" box will by default open in the same view (icon vs list vs column, etc) that was in effect for the previously opened folder. *Within each view*, you can set the default parameters (text size, etc) for a new folder by setting up a folder the way you like and then checking the view options box for "Use as defaults" at the bottom.

  • CheckBox - how to set custom icons

    I need to figure out how to set a custom icon for a selected checkbox via the UIManager
    This works for un-selected checkboxes:
    UIManager.put("CheckBox.icon", new ImageIcon("../images/unselectedCheckBoxIcon.png")));
    how to change the icon when it is selected?
    I don't know the UIManager property for a selected checkbox icon and using the setSelectedIcon on the checkbox object it self does not seem to work:
    checkbox.setSelectedIcon(new ImageIcon("../images/selectedCheckBoxIcon.png"));
    Thanks for any ideas how to solve this!!

    Hi mKorbel, many thanks for your suggestion!
    For anyone interestsed,
    here is a small example of how I made it working.
    Unfortunately I cannot attatch the icon images that I use, but the selected icon can be downloaded from here, resize it to 32*32, remove the cross in the middle to save it as the unselected icon.
    * Modified sample code taken from here
    * http://www.java2s.com/Tutorial/Java/0240__Swing/CustomizingJCheckBoxCheckMarkIcon.htm
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.GridLayout;
    import java.net.URL;
    import javax.swing.AbstractButton;
    import javax.swing.ButtonModel;
    import javax.swing.Icon;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    public class IconCheckBoxSample {
      public static void main(String[] args) {
            JFrame frame = new JFrame("Iconizing CheckBox");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Icon checked = new CheckBoxIcon();
            Icon unchecked = new CheckBoxIcon();
            JCheckBox aCheckBox1 = new JCheckBox("Pizza", unchecked);
            aCheckBox1.setSelectedIcon(checked);
            JCheckBox aCheckBox2 = new JCheckBox("Calzone");
            aCheckBox2.setIcon(unchecked);
            aCheckBox2.setSelectedIcon(checked);
            Icon checkBoxIcon = new CheckBoxIcon();
            JCheckBox aCheckBox3 = new JCheckBox("Anchovies", checkBoxIcon);
            JCheckBox aCheckBox4 = new JCheckBox("Stuffed Crust", checked);
            frame.setLayout(new GridLayout(0,1));
            frame.add(aCheckBox1);
            frame.add(aCheckBox2);
            frame.add(aCheckBox3);
            frame.add(aCheckBox4);
            frame.setSize(300, 200);
            frame.setVisible(true);
    class CheckBoxIcon implements Icon {
      public void paintIcon(Component component, Graphics g, int x, int y) {
        AbstractButton abstractButton = (AbstractButton)component;
        ButtonModel buttonModel = abstractButton.getModel();
        if(buttonModel.isSelected()) 
            g.drawImage(createImage("../images/selectedCheckBoxIcon.png","info"), x, y, component);
        else
            g.drawImage(createImage("../images/unselectedCheckBoxIcon.png","info"), x, y, component);
      public int getIconWidth() {
        return 33;
      public int getIconHeight() {
        return 33;
      protected static Image createImage(String path, String description) {
            URL imageURL = CheckBoxIcon.class.getResource(path);
            Image icn = null;
            if (imageURL == null) {
                if(null==icn){
                    //System.out.println("path: "+path);
                    icn = new ImageIcon (CheckBoxIcon.class.getResource(path.replace("..",""))).getImage();
                    if(null!=icn)
                        return icn;
                    else{ 
                        System.err.println("Resource not found: " + path);
                        return null;
                 return null;
            } else {
                return (new ImageIcon(imageURL, description)).getImage();

  • How to set Custom Properties in PDF

    Hi,
    We are using BIP embedded in EBS R12.
    For post-processing of PDF files, we need to embed information in PDF files which can be read by a script.
    There is Customer Properties section in every PDF file (File > Properties > Custom (tab)) where information may be stored in Name-Value pair where in Name will be a predefined information while value should coming from XML data file.
    I could not find any help/guide which demonstrates how to insert custome properties in PDF file generated from RTF template in EBS. Is this capability available in BIP?
    Please share your thoughts on this.
    br.

    You may be able to make changes to the web.xml for Infoview to handle that.
    For infoview questions you will need to create a forum post in the [Enterprise Admin forum|BI Platform;
    Edited by: Jason Everly on Aug 16, 2010 10:01 AM

  • How can set custom advanced print setting to default?

    Hi
    I am using job automation program called enfocus switch and
    Every time it automatically print out  PDF file, i wanted it to be printed out with bleed mark and page information.
    As i go to advanced print setup, i can achieve this by set setting to custom setting that has checked bleed mark and page info.
    Is there any way to set custom setting as default so Evey time enfocus program print out PDF, it is printed out with bleed marks and page info.
    Thanks

    this is what i wanted it to be default. checked bleed marks & page information
    went to setting-adobePDF. coudn't find any thing related to bleedmark and page info.
    Hope this give you more detail thank you for your time.

  • 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

  • How to set custom widths for a particular report column?

    how could I set a custom width for a particular report column? Is there a way to do it using css?
    Thank you.

    Hi Leland,
    I have tested this here: [http://apex.oracle.com/pls/otn/f?p=267:18]
    All I have done is add the following into the report's Region Header:
    &lt;style type="text/css"&gt;
    #apexir_EMPNO {width:200px}
    #apexir_ENAME {width:200px}
    #apexir_DEPTNO {width:200px}
    .apexir_WORKSHEET_DATA TR TD {height:100px;}
    &lt;/style&gt;The headers have all be set to be left-aligned. Each column should be 200px wide (even though I'm setting the width on the headers, it will be applied to the entire column unless a cell's contents is wider, in which case the column is made wider). The final entry above adjusts the height of all TDs within the IR table.
    Andy

Maybe you are looking for

  • Firefox is frozen and will not close but I want to un-install it. HELP!

    Firefox was open and an error message. Unresponsive script running, continue or stop script? All options were frozen I was not able and still not able to close firefox or any tabs from it, it has been frozen for two days. Is there an easy command lin

  • IBooks Author HTML5 Widget won't open in full screen

    Hi, I am building a ebook using iBooks Author, the ebook includes HTML5 widgets on several of the pages. Upon testing the book on desktop the HTML5 widgets work as they should (opening in full screen). However, when I test this on the latest iPad air

  • VPD method?

    Hi Everyone, After reading several VPD whitepapers on the OTN I couldn't get the right method to solve my problem. It's clear that I've to create a policy function and to define the dbms_rls.add_policy. However, each whitepaper describes a method wit

  • RAW support for Pentax K3

    When will Aperture RAW support be updated for Pentax K3 be added?  It's already on Adobe Lightroom....!

  • All my Album artwork has gone missing and I get error code (-609)??

    All my Album artwork has gone missing and I get error code (-609)??