SENDING DATA IN HTTP HEADER

I want to send some data in HTTP HEADER and then tranfer the request to JSP using REQUEST DISPATCHER.
//SOMETHING LIKE THIS //
String Newheader="Some Value";
String NewHeaderValue="Some New Value";
response.addHeader(NewHeader,NewHeaderValue);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/auth/Some.jsp");
and printing header in JSP , but unable to get it . Can somebody help me out.

To what I understand is setting a header in response is not going to give you in JSP page. because in JSP what you are doing is request.getHeader.
Response header set in a filter is for the browser. if you really want to set a header in filter and then get it back in JSP then you need to use a RequestWrapper class
Some thing similar to this, if you notice that the getHeader method is overriden
class RequestWrapper extends HttpServletRequestWrapper {
     String remoteUserHeaderName;
     String userName;
     public RequestWrapper(HttpServletRequest request){
          super(request);          
     public RequestWrapper(HttpServletRequest request,String remoteUserHeaderName,String userName){
          super(request);          
          this.remoteUserHeaderName = remoteUserHeaderName;
          this.userName = userName;
     @Override
     public String getHeader(String header) {
          // TODO Auto-generated method stub
          if (remoteUserHeaderName != null && userName != null && header.equals(remoteUserHeaderName)) {
               return userName;
          else {
               return super.getHeader(header);
}

Similar Messages

  • Problem sending data with HTTPS  using client authentication.

    Hi,
    I�m tryingto send a message to a secure server using for this client certificate, apparently if I make a GET of "/" (server root) , everything works fine (authentication, and data received), from the moment that I try to ways send data to the "/pvtn " directory i obtain the following error.
    This is a sample of the code i�m using:
    import com.sun.net.ssl.KeyManagerFactory;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.Writer;
    import java.net.Socket;
    import java.security.*;
    import java.security.GeneralSecurityException;
    import java.security.Principal;
    import java.security.PublicKey;
    import java.util.Collection;
    import java.util.Date;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    import javax.security.cert.*;
    import javax.security.cert.X509Certificate;
    public class Test
    public static final String TARGET_HTTPS_SERVER = "mymachine.mydomain.pt";
    public static final int TARGET_HTTPS_PORT = 443;
    public static void main(String[] args) throws Exception
    System.setProperty("javax.net.ssl.trustStore","/certificados/truststore.txt");
    System.setProperty("javax.net.ssl.trustStorePassword","trustpwd");
    System.setProperty("javax.net.ssl.keyStore","/certificados/truststore.txt");
    System.setProperty("javax.net.ssl.keyStorePassword","trustpwd");
    java.security.Security.removeProvider("SunJSSE");
    java.security.Security.insertProviderAt(new com.sun.net.ssl.internal.ssl.Provider(),2);
    KeyManagerFactory kmf= KeyManagerFactory.getInstance("SunX509", "SunJSSE") ;
    //Socket
    SSLSocket jsslSoc = (SSLSocket) SSLSocketFactory.getDefault().createSocket(TARGET_HTTPS_SERVER, TARGET_HTTPS_PORT);
    String [] ciphers = jsslSoc.getSupportedCipherSuites() ;
    //// Select the ciphers you want and put them.
    //// Here we will put all availabel ciphers
    jsslSoc.setEnabledCipherSuites(ciphers);
    //// We are creating socket in client mode
    jsslSoc.setUseClientMode(true);
    //// Do SSL handshake
    jsslSoc.startHandshake();
    // Print negotiated cipher
    System.out.println("Negotiated Cipher Suite: " + jsslSoc.getSession().getCipherSuite());
    System.out.println("");
    X509Certificate[] peerCerts = ((javax.net.ssl.SSLSocket)jsslSoc).getSession().getPeerCertificateChain();
    if (peerCerts != null)
    System.out.println("Printing server information:");
    for(int i =0; i < peerCerts.length; i++)
    System.out.println("Peer Certificate ["+i+"] Information:");
    System.out.println("- Subject: " + peerCerts.getSubjectDN().getName());
    System.out.println("- Issuer: " + peerCerts[i].getIssuerDN().getName());
    System.out.println("- Version: " + peerCerts[i].getVersion());
    System.out.println("- Start Time: " + peerCerts[i].getNotBefore().toString());
    System.out.println("- End Time: " + peerCerts[i].getNotAfter().toString());
    System.out.println("- Signature Algorithm: " + peerCerts[i].getSigAlgName());
    System.out.println("- Serial Number: " + peerCerts[i].getSerialNumber());
    else
    System.out.println("Failed to get peer certificates");
    try
    Writer out = new OutputStreamWriter(jsslSoc.getOutputStream(), "ISO-8859-1");
    //THIS WAY WORKS FINE
    out.write("GET / HTTP/1.1\r\n");
    // HERE COMES THE TROUBLES
    //out.write("GET /pvtn?someparameter=paramvalue HTTP/1.1\r\n");
    out.write("Host: " + TARGET_HTTPS_SERVER + ":" + TARGET_HTTPS_PORT + "\r\n");
    out.write("Proxy-Connection: Keep-Alive\r\n");
    out.write("User-Agent: SSL-TEST \r\n");
    out.write("\r\n");
    out.flush();
    BufferedReader in = new BufferedReader(new InputStreamReader(jsslSoc.getInputStream(), "ISO-8859-1"));
    String line = null;
    while ((line = in.readLine()) != null)
    System.out.println(line);
    finally
    jsslSoc.close();
    the ssl log until sending the GET is
    main, WRITE: SSL v3.1 Handshake, length = 36
    main, READ: SSL v3.1 Change Cipher Spec, length = 1
    main, READ: SSL v3.1 Handshake, length = 36
    Plaintext after DECRYPTION: len = 36
    0000: 14 00 00 0C 71 AB 40 CC 6C 33 92 05 E9 69 4B 8F [email protected].
    0010: D1 77 3F 6E 3C DB F0 A0 B7 9C CF 49 B6 6D C8 17 .w?n<......I.m..
    0020: 7E 03 52 14 ..R.
    *** Finished, v3.1
    verify_data: { 113, 171, 64, 204, 108, 51, 146, 5, 233, 105, 75, 143 }
    %% Cached client session: [Session-1, SSL_RSA_WITH_RC4_128_SHA]
    [read] MD5 and SHA1 hashes: len = 16
    0000: 14 00 00 0C 71 AB 40 CC 6C 33 92 05 E9 69 4B 8F [email protected].
    Negotiated Cipher Suite: SSL_RSA_WITH_RC4_128_SHA
    When i send the GET
    Plaintext before ENCRYPTION: len = 247
    0000: 47 45 54 20 2F 70 76 74 6E 3F 41 30 33 30 3D 4D GET /pvtn?A030=M
    main, WRITE: SSL v3.1 Application Data, length = 247
    main, READ: SSL v3.1 Handshake, length = 24
    Plaintext after DECRYPTION: len = 24
    *** HelloRequest (empty)
    %% Client cached [Session-1, SSL_RSA_WITH_RC4_128_SHA]
    %% Try resuming [Session-1, SSL_RSA_WITH_RC4_128_SHA] from port 3535
    *** ClientHello, v3.1
    RandomCookie: GMT: 1131988975 bytes = { 45, 113, 241, 212, 81, 255, 244, 169, 74, 41, 160, 227, 197, 210, 155, 211, 47, 237, 18, 179, 238, 47, 28, 86, 30, 253, 157, 253 }
    Session ID: {208, 18, 243, 174, 216, 156, 80, 201, 121, 136, 63, 162, 31, 196, 186, 95, 193, 143, 238, 172, 173, 79, 64, 219, 17, 149, 14, 138, 53, 95, 18, 96}
    Cipher Suites: { 0, 5, 0, 4, 0, 9, 0, 10, 0, 18, 0, 19, 0, 3, 0, 17, 0, 2, 0, 1, 0, 24, 0, 26, 0, 27, 0, 23, 0, 25 }
    Compression Methods: { 0 }
    [write] MD5 and SHA1 hashes: len = 105
    Plaintext before ENCRYPTION: len = 125
    main, WRITE: SSL v3.1 Handshake, length = 125
    main, READ: SSL v3.1 Handshake, length = 94
    Plaintext after DECRYPTION: len = 94
    *** ServerHello, v3.1
    RandomCookie: GMT: 1131991620 bytes = { 205, 194, 212, 113, 37, 213, 41, 13, 60, 142, 135, 68, 17, 78, 227, 251, 176, 211, 133, 203, 153, 173, 153, 195, 93, 7, 87, 123 }
    Session ID: {108, 85, 45, 208, 104, 124, 209, 24, 247, 113, 156, 134, 28, 154, 75, 198, 64, 181, 167, 9, 149, 223, 162, 21, 225, 32, 168, 31, 190, 48, 241, 195}
    Cipher Suite: { 0, 5 }
    Compression Method: 0
    %% Created: [Session-2, SSL_RSA_WITH_RC4_128_SHA]
    ** SSL_RSA_WITH_RC4_128_SHA
    [read] MD5 and SHA1 hashes: len = 74
    main, READ: SSL v3.1 Handshake, length = 3154
    Plaintext after DECRYPTION: len = 3154
    *** Certificate chain
    stop on trusted cert: [
    Version: V1
    Subject: CN=GTE CyberTrust Global Root, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
    Algorithm: [MD5withRSA]
    Signature:
    [read] MD5 and SHA1 hashes: len = 3134
    main, READ: SSL v3.1 Handshake, length = 479
    Plaintext after DECRYPTION: len = 479
    *** CertificateRequest
    Cert Types: RSA, DSS,
    Cert Authorities:
    [read] MD5 and SHA1 hashes: len = 455
    *** ServerHelloDone
    [read] MD5 and SHA1 hashes: len = 4
    0000: 0E 00 00 00 ....
    *** Certificate chain
    *** ClientKeyExchange, RSA PreMasterSecret, v3.1
    Random Secret: { 3, 1, 19, 223, 230, 65, 59, 210, 10, 69, 239, 178, 185, 5, 52, 57, 44, 160, 163, 239, 85, 64, 173, 16, 132, 234, 33, 228, 0, 8, 134, 52, 20, 190, 196, 15, 205, 35, 169, 39, 14, 160, 143, 74, 210, 74, 43, 181 }
    [write] MD5 and SHA1 hashes: len = 141
    Plaintext before ENCRYPTION: len = 161
    main, WRITE: SSL v3.1 Handshake, length = 161
    SESSION KEYGEN:
    PreMaster Secret:
    .CONNECTION KEYGEN:
    Client Nonce:
    Server Nonce:
    Master Secret:
    Client MAC write Secret:
    Server MAC write Secret:
    Client write key:
    Server write key:
    0000: FE 94 DF 4C 1A 9F FA CE 0C E9 A6 DB 31 53 E5 FD ...L........1S..
    ... no IV for cipher
    Plaintext before ENCRYPTION: len = 21
    0000: 01 0D 16 E6 49 18 36 AF E1 52 9C 2F 72 EE CA DF ....I.6..R./r...
    0010: 41 71 68 30 06 Aqh0.
    main, WRITE: SSL v3.1 Change Cipher Spec, length = 21
    *** Finished, v3.1
    verify_data: { 243, 49, 247, 150, 113, 86, 182, 125, 244, 163, 245, 243 }
    [write] MD5 and SHA1 hashes: len = 16
    0000: 14 00 00 0C F3 31 F7 96 71 56 B6 7D F4 A3 F5 F3 .....1..qV......
    Plaintext before ENCRYPTION: len = 36
    0000: 14 00 00 0C F3 31 F7 96 71 56 B6 7D F4 A3 F5 F3 .....1..qV......
    0010: 1A 7C 8F D9 51 CB 6F 47 2A 7C 90 81 20 EE 97 64 ....Q.oG*... ..d
    0020: FF 47 35 CA .G5.
    main, WRITE: SSL v3.1 Handshake, length = 36
    main, SEND SSL v3.1 ALERT: warning, description = close_notify
    Plaintext before ENCRYPTION: len = 22
    0000: 01 00 F0 F4 AC 3C B2 DE 95 98 0E B4 ED B1 24 3B .....<........$;
    0010: 54 6C 8B DC F3 1F Tl....
    main, WRITE: SSL v3.1 Alert, length = 22
    java.net.SocketException: Connection aborted by peer: socket write error
         void java.net.SocketOutputStream.socketWrite(java.io.FileDescriptor, byte[], int, int)
              native code
         void java.net.SocketOutputStream.write(byte[], int, int)
              SocketOutputStream.java:96
         void com.sun.net.ssl.internal.ssl.OutputRecord.a(java.io.OutputStream)
         void com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(com.sun.net.ssl.internal.ssl.OutputRecord)
         void com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush()
         void com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(com.sun.net.ssl.internal.ssl.HandshakeMessage$Finished)
         void com.sun.net.ssl.internal.ssl.ClientHandshaker.c()
         void com.sun.net.ssl.internal.ssl.ClientHandshaker.a(com.sun.net.ssl.internal.ssl.SunJSSE_o)
         void com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(byte, int)
         void com.sun.net.ssl.internal.ssl.Handshaker.process_record(com.sun.net.ssl.internal.ssl.InputRecord)
         void com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(com.sun.net.ssl.internal.ssl.InputRecord, boolean)
         void com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(com.sun.net.ssl.internal.ssl.InputRecord)
         int com.sun.net.ssl.internal.ssl.AppInputStream.read(byte[], int, int)
         int java.io.InputStream.read(byte[])
              InputStream.java:91
         int java.io.InputStreamReader.fill(char[], int, int)
              InputStreamReader.java:173
         int java.io.InputStreamReader.read(char[], int, int)
              InputStreamReader.java:249
         void java.io.BufferedReader.fill()
              BufferedReader.java:139
         java.lang.String java.io.BufferedReader.readLine(boolean)
              BufferedReader.java:299
         java.lang.String java.io.BufferedReader.readLine()
              BufferedReader.java:362
         void Teste3.main(java.lang.String[])
              Teste3.java:109
    Exception in thread main
    Debugger disconnected from local process.
    Process exited with exit code 1.
    One more thing if if make the same thing via browser (https://mymachine.mydomain.pt/pvtn?someparameter=somevalue) and works fine too (obviously i pre installed the client certificate in the browser and choose the certificate when the pop up show up)
    It seems like the handshaking fails when i send data to /pvtn...
    Regards,
    Paulo.

    I amhaving the another problem very similar, I am struggling with client authentication with IIS 5.0, and receiving the 'Remote Host closed the connection' error.
    Is there any help me in this. I truly apprecaite it
    Thanks

  • How to get and put data in HTTP header in Client Side

    One JSP's function is to display data records page by page. Client users could click "First page" or "Previous Page" or "Next Page" or "Last Page" button to let the JSP to show the corresponding page. So the JSP must remember the current page number. Due to there are a number of client users maybe access the JSP at the same time, keep the current page number in session, there will be a lot of session is created at the same time, this will impact system's performance. So using session to keep data method is not used. I plan to use request header and response header to pass the current page number. I know use the response.addHeader to put data in response header and also know use request.getHeader to get data in request header in server side, but I donot know how to put data in request header and how to get data in response header in client side. Could you please give me a help? If donot use these method, are there any other method? Thanks a lot.

    Why not pass it as a parameter with the URL?
    at the beginning of the page..
    <%
    int pageNumber = Integer.parseInt(request.getParameter("page"));
    %>
    then when defining your links
    <a href="thisPage.jsp?page=<%= (pageNumber-1)%>">Previous</a>
    <a href="thisPage.jsp?page=<%= (pageNumber+1)%>">Next</a>

  • Send data via HTTP and wait 10 Seconds before sending next Message

    Hi Folks,
    I am doing an IDOC - XI - HTTP scenario.
    after sending a message via the HTTP-receiver I have to wait up to 10 Seconds, before my partner accept the next Message.
    Is there a way to configure the HTTP-receiver to wait?
    Thanks,
    Chris

    Hi Chris,
    You can use ccBPM for this scenario.
    Scenario 1 :
    1 IDOC contains multiple records, so you can convert to multiline items.
    Loop base on the multiline items (Block Step).
        Send Step for sending http request.
        wait step to wait for 10 seconds.
    Scenario 2 :
    1 IDOC contains only single record. so you need to collect the IDOC until certain time.
    Loop base on the multiline items (Block Step).
        Send Step for sending http request.
        wait step to wait for 10 seconds.
    Regards
    Fernand

  • Why Web services are used to send data not HTTP in Web dynpro for Java?

    Is Web Dynpro for Java supports Web service , RFC as communication to other systems why http cannot be used in Wweb dynpro for java.........
    Thanks and Regards,
    CSP

    Hi Pradeep,
    Yes, Web Dynpro java supports web service, you can expose your web service as RFC Model to
    communicate with others system. As per as HTTP is concern we don't have any
    supportive method in web Dynpro. Insted of HTTP we use context in web dynpro to communicate.
    Thanks
    Anup

  • How do I add data to HTTP response headers in Tomcat?

    Hello
    I am in the process of making our site Platform for Privacy Preferences(P3P) compliant. We are running Tomcat 3.2.2(standalone) on a Linux box. I am looking for information regarding adding data to HTTP header responses(see example below). One of the aspects of P3P compliancy is referencing where a Policy is located and referencing the "Compact Policy" via the "CP" tag. I need to add these values and as I am
    new to Tomcat I need know where to find the header information.
    <!-- example -->
    HTTP/1.1 200 OK
    P3P: policyref="http://somesite.com/P3P/PolicyReferences.xml",
    CP="NON DSP COR CURa ADMa DEVa CUSa TAIa OUR SAMa IND"
    Content-Type: text/html
    Content-Length: 8104
    Server: ...
    ...content...
    <!-- end example -->
    Any suggestions would be appreciated.
    Joe Dalessandro
    e: [email protected]

    Hmm... If you check your server.xml -file, you'll probably find that Tomcat has been configured to use org.apache.tomcat.service.http.HttpConnectionHandler as the connection handler (right under the "Connector classname" value)...
    Would it be possible to tweak that handler or extend it in such a way that you could add your headers?
    Unfortunately I don't work with Tomcat myself, otherwise I could try it...
    If this seems too complicated, I'd just recommend you to install Apache, and do it there...

  • How can I set "SOAPAction" http header using SAAJ

    When I send soap request, http header's like below
    SOAPAction: ""
    But, I'd like to send like this
    SOAPAction: "http://tempuri.org/HelloWorld"
    How can I that using SAAJ ?
    My code is
    String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
    "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
    " <soap:Body>\n" +
    " <HelloWorld xmlns=\"http://tempuri.org/\" />\n" +
    " </soap:Body>\n" +
    "</soap:Envelope>";
    Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(xml.getBytes()));
    DOMSource domSource = new DOMSource(doc);
    SOAPMessage message = MessageFactory.newInstance().createMessage();
    message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "utf-8");
    message.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
    message.getSOAPPart().setContent(domSource);
    message.writeTo(System.out);
    SOAPConnection connection = SOAPConnectionFactory.newInstance().createConnection();
    SOAPMessage response = connection.call(message, helloURL);
    connection.close();
    SOAPBody body = response.getSOAPBody();
    if ( body.hasFault() )
    SOAPFault newFault = body.getFault();
    System.out.println("SoapBody has fault.");
    System.out.println("code=" + newFault.getFaultCodeAsName());
    System.out.println("message=" + newFault.getFaultString());
    System.out.println("actor=" + newFault.getFaultActor());
    else
    System.out.println("Call Successed.");
    System.out.println(body);
    }

    message.getMimeHeaders().addHeader("SOAPAction", "http://tempuri.org/HelloWorld");

  • Sending audio data over http problem

    Hi Guys,
    We are trying to create a little servlet in Tomcat, which is capable to send audio files over http to an embedded media player. The definition of the player looks like:
    <OBJECT ID="Mp" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" TYPE="application/x-oleobject" WIDTH="0" HEIGHT="0">
    <PARAM name="uiMode" value="none">
    <PARAM NAME="ShowControls" VALUE="0">
    <PARAM NAME="AutoStart" VALUE="1">
    <PARAM NAME="ShowPositionControls" VALUE="0">
    <PARAM NAME="ShowStatusBar" VALUE="0">
    <PARAM NAME="ShowDisplay" VALUE="0">
    </OBJECT>
    <script language="javascript">document.Mp.URL = "here comes the url of the servlet with item ID";</script>
    The servlet reads the audio file and writes its content to the response with the following http header settings:
    getResponse().setContentType("audio/x-wav");
    getResponse().setHeader("Content-Transfer-Encoding", "binary");
    getResponse().setHeader("Pragma", "Public");
    getResponse().setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
    getResponse().setHeader("Content-Disposition", "inline; filename=Media.wav");
    getResponse().setHeader("Content-Length", new Integer(MediaBytes.length).toString());
    getResponse().setHeader("Accept-Ranges", "bytes");
    So, everything works fine for wav files in Internet Explorer, but we are facing problems with Firefox, where it does not work. The embedded Media Player says that "Windows Media Player cannot play the file. One or more codecs required to play the file could not be found."
    But if we set the url to directly to the file on the server, everything works fine.
    We have analyzed the HTTP traffic in both situation, but we cannot understand how Internet Explorer/Firefox and Media Player works together:
    - how does Media Player know that the audio file is playable?
    - if the url points directly to the file, the HTTP headers does not contain any kind of information about the file type, only the extension is available; Media Player checks the file extenion in the url?
    - if the url points to the servlet, why Media Player in Firefox cannot determine the file type and throws error?
    Any help is greately appreciated!
    Thanks!
    Gabor

    If you haven't already, I would try breaking down the problem. First confirm you're getting serial data then confirm that netcat can send some data. Like this:
    xxd < /dev/tty.usbmodemfa121 | less
    nc -u 10.0.1.3 7000 <<< 'hello over there'

  • Make process manger send additional http header when querying WSDL ?

    Hello,
    is there a possibility to send an additional, custom http header when
    process manager reads WSDL from a webserver.
    Backgrund info: all our WSDLs are hosted on a special webserver which
    needs this field. Changing to another kind of repository is not an option.
    It would be nice if we could add some parameter to the appserver or domain
    configuration to add this field as a default for each request.
    Note that we don´t need the http field if we call partnerLinks. It´s only required for
    WSDL-query (= the URLs given in bpel.xml / </partnerLinkBinding> )
    Thanks in advance
    Bernd

    Hi,
    It is a memory or buffer related problem. Contact your BASIS.
    Looks like there is a shortage of space. Analyse the dump in ST22 and look for its proposals.
    OSS note 965351 might be applicable (if you are on 640/ unix).
    regards,
    NR

  • Can I send an HTTP Header from an iView

    Hello Developers,
    I'm trying to run an external web application from a URL iView.  In the URL I point it to a reverse proxy that starts the web application.  The reverse proxy requires a user name in the field HTTP_USER.  Sending a value as a URL Parameter doesn't work.
    My question is, can I include the Portal users name in a HTTP Header and sendt the Header from the iView?
    Thank you

    Hello,
    you can get the servlet response and set a header value using the following code :
    HttpServletResponse res = aRequest.getServletResponse(true);
    res.setHeader("header name","header value");
    Hope it helps.
    Regards
    Guillaume

  • How to send a signed SOAP message with additional HTTP Header fields

    Our Partner's integration requirements are that we send them asynchronous SOAP messages, that are digitally signed, and whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping.  I believe we can use the HTTP adapter for adding new fields to the HTTP header, but don't believe it supports signing.  I believe that the SOAP adapter supports signing, but I'm not clear on how to use it to add fields to the HTTP header.  What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
    Thanks,
    Kurt

    >>>What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
    Use Java mapping for both.
    1) Signing the message
    You can digitally sign the soap message using many standard api like WSS4j? or  refer Java XML signature API which comes in Jdk1.6.
    Refer these links
    WSS4J  -  http://ws.apache.org/wss4j/axis.html
    Java XML signature : http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/
    2) >>whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping
    Use Dynamic configuration API to set the additional header fields during message mapping.

  • How to send te XML data using HTTPS post call & receiving response in ML

    ur present design does the HTTP post for XML data using PL/SQL stored procedure call to a Java program embedded in Oracle database as Oracle Java Stored procedure. The limitation with this is that we are able to do HTTP post; but with HTTPS post; we are not able to achieve because of certificates are not installed on Oracle database.
    we fiond that the certificates need to be installed on Oracle apps server; not on database server. As we have to go ultimately with HTTPS post in Production environment; we are planning to shift this part of program(sending XML through HTTPS post call & receiving response in middle layer-Apps server in this case).
    how i can do this plz give some solution

    If you can make the source app to an HTTP Post to the Oracle XML DB repository, and POST contains a schema based XML document you can use a trigger on the default table to validate the XML that is posted. The return message would need to be managed using a database trigger. You could raise an HTTP error which the source App would trap....

  • Retrieve and send data to website using http protocol

    Hi, I wonder if anyone knows how to use java language to retrieve and send data to internet website using the http protocol.

    Take a look at this thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=310300

  • Sending xml data through http services in adobe air

    Hello every one,
    I am stucked with a problem using httpservices,
    Here's my code
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="login();">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                [Bindable]
                private var reqData:XML = new XML();
                protected function userRequest_resultHandler(event:ResultEvent):void
                    // TODO Auto-generated method stub
                    Alert.show(event.result.toString());                   
                private function login():void
                    trace("username " +username.text)
                    trace("password " +password.text)
                    trace("request"+userRequest.request.toString());               
                     reqData =<ApplicationReq>
                        <InsType>"1"</InsType>
                        <RequestType>"3"</RequestType>
                        <TrackID>"22222222"</TrackID>
                        <Mode>"2"</Mode>
                        <ApplicationID>"11"</ApplicationID>
                        <CompanyID>"1"</CompanyID>
                        </ApplicationReq>
                    var params:Object = {};
                    params["username"] = "admin";
                    params["password"] = "admin@123";
                    userRequest.send();
                    //userRequest.send();
                protected function userRequest_faultHandler(event:FaultEvent):void
                    // TODO Auto-generated method stub
                    Alert.show(event.fault.toString());
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <s:HTTPService id="userRequest" url="http://ins.dgsecure.com/gui/xmltest3.php"
                           useProxy="false" method="POST"
                           result="userRequest_resultHandler(event)"
                           resultFormat="xml"  fault="userRequest_faultHandler(event)">
                <s:request xmlns="">                                   
                        <ApplicationReq>
                            <InsType>"1"</InsType>
                            <RequestType>"3"</RequestType>
                            <TrackID>"22222222"</TrackID>
                            <Mode>"2"</Mode>
                            <ApplicationID>"11"</ApplicationID>
                            <CompanyID>"1"</CompanyID>
                        </ApplicationReq>                               
                </s:request>
            </s:HTTPService>
        </fx:Declarations>
        <s:TextInput id="username" x="441" y="160" />
        <s:TextInput id="password" x="442" y="196"/>
        <s:Button x="459" y="244" label="login" click="login()"/>
    </s:WindowedApplication>
    if i set the content type to"application/xml " its giving RPC error, else if the data going to the server through encoding like Xmlrequest = %&ddgG&&ddjkjdj3d
    how to getout of this problem and how can i send the total xml data with http request

    Hi,
    Xcelsius/Dashboards will convert the range of values that you want to send into XML.
    It then will POST the XML when it calls the web page.
    For example, if you had created three ranges to send to your web page:
    A (a single cell)
    B (a single cell)
    C (a row of three cells)
    The data in the POST input stream for the web page will look something like this:
    <data>
      <variable name="A">
        <row>
          <column>10</column>
        </row>
      </variable>
      <variable name="B">
        <row>
          <column>15</column>
        </row>
      </variable>
      <variable name="C">
        <row>
          <column>1</column>
          <column>2</column>
          <column>3</column>
        </row>
      </variable>
    </data>
    I don't have an example for ASP, but I do for a JSP (attached).
    Regards
    Matt

  • OIF11g - Help on sending user attributes in HTTP header

    Hello, I have a OIF11g setup configured for both IdP and SP. Upon successfull authentication against LDAP, I need to end some user attributes on the HTTP header to the SP application. I do no have OAM in my setup, so there is no option of Webgate or Policy Manager to do that. As far as I read the config doc, I'm in the impression that we need to write a custom authentication engine to accept user credentials and code to authenticate against LDAP and also add attributes to the response header.
    Before I go down that path, just wanted to confirm if anybody has done this with OIF?
    Thanks,
    Sunil.

    Bernhard:
    Actually the headers are not set to null. I have an intermediate index.jsp page which is the first page that is redirected to by the AM - it is this page which calls my LoginServlet.
    The value appears consistently on this index.jsp page but after it is forwarded to the LoginServlet it starts behaving inconsistently. I check the system.out log in my websphere /logs folder and that tells me that LoginServlet does not consistenly get these values from the header.
    The wierd part is that if I use cookies or attributes, it works perfectly - each time every time. However, only in the case of headers (which is the method i am required to do) it behaves inconsistently.
    ANY feedback/help on this would be really appreciated bern.. thanks..
    ~saahil

Maybe you are looking for

  • How to output sound to RCA cables?

    I give up! I can't for the life of me figure out how to output the sound from my Macbook to play on my stereo or TV which use RCA cable hook-ups. I got the VID ADPT MINI-DVI TO VIDEO ADAPTER-GEN but that only adapts the video, not the sound. Do I hav

  • Why does the Adobe Acrobat plugin crash everytime I open a PDF?

    I am currently running the Firefox 11.0, which is the most up-to-date version as of this writing. Every time I open a PDF file, it says that "Adobe Acrobat plugin has crashed". I have Adobe Acrobat 9 Pro, which came as part of my school's standard so

  • Is it possible to transfer windows music to iPad 2 yes or no?

    Is it possible to transfer windows music to iPad 2 yes or no?

  • Cannot drop a column

    Hi, I am having a problem with dropping a column from a table. I am using 10g (10.2.0.1.0). Whenever I try to drop a column I got this error: ORA-39726: unsupported add/drop column operation on compressed tables Then I tried to drop it in a way that

  • Command file "chrome://vidbar/content/db.js:312" does not respond

    <blockquote>Locking duplicate thread.<br> Please continue here: [/questions/834066]</blockquote> I get every now and then an error message (in Finnish): "Tällä sivulla oleva komentotiedosto on varattuna tai ei enää vastaa kutsuihin. Voit pysäyttää ko