HTTP header setting withing XSQL
Is there a simple way to set an HTTP response header within an
XSQL or XSL file? Specifically, I would like to set the "Content-
disposition" header.
At the end of the day, I would like to have the results of an
XSQL query, after being formatted into a comma delimited format
by an XSL, be opened by an IE5 web browser according to the
associations of the filename suffix (eg: *.csv be opened
directly by MS Excel spreadsheet).
If I write my own servlet and use tomcat, I can accomplish this
by conditionally calling
response.setHeader("Content-disposition",
"filename=queryresults.csv");
if a particular parameter is present in the request, followed by
forwarding the request to the XSQL servlet.
a) This custom servlet solution is more complicated than I'd
like it to be.
b) I would prefer to use the apache/jserv combination but am
having no joy figuring out how to forward a request to the XSQL
servlet after configuring it to service all *.xsql files with my
custom servlet (it's complaining that there's no method
getNamedDispatcher method in the servletContext object).
Any ideas appreciated.
Cheers,
Matt
See the online XSQL documentation at:
http://download.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88
894/adx10xsq.htm
and search for the words "then you can get access to the HTTP
Servlet's request, response"
there is a code example there of how to get access to the
response object that you need.
Similar Messages
-
Http header insertion with MSISDN
Hi
I know that we can define a http header insertion on the ACE to insert a custom header and a string in to the value. Is there a way for me to insert a dynamic string read from a database in to the value field. My exact requirement is to insert the MSISDN of mobile subscribers in to their http traffic. The MSISDN can be extracted form the Radius accounting messages
Any ideas, I have no clue as to how to do such a thing.
thanksI don't know about this feature. I think it's not possible. ACE can insert/generate only cookie. All other L7 methods (e.g. http header) are using existing data in communication.
MSISDN inserting to http header/uri is role of wap-gw, or something like that device in data flow process.
martin -
X-Forwarded-For HTTP header behaviour with web dispatcher
can anybody specify the behavior of Web Dispatcher regarding the X-Forwarded-For HTTP header?
When a client accesses SAP EP via proxy1, proxy2 and Web Dispatcher in
this order, is it guaranteed that the format of the X-Forwarded-For
HTTP header that I can refer at SAP EP becomes the following forms?
X-Forwarded-For: client, proxy1, proxy2
In other words, is it guaranteed by Web Dispatcher that the rightmost
IP address, proxy2 in this example, is the closest downstream client?
thanks in advance.Hi Jane
I am not sure what exactly are you looking for but the following link is a general doc on administration of web dispatcher.Please see if this helps.
http://help.sap.com/saphelp_nw70/helpdata/en/f5/51c7d170bc4a98b1b5a0339213af57/content.htm
Regards
Chen -
Http header setting in servlet
Hello,
I want to set the header parameters of http response in my servlet.
I set parameters as below:
theResponse.setHeader("Request Version", "HTTP/1.1");
theResponse.setStatus(200);
theResponse.setHeader("Date", "Wed, 18 Apr 2007 09:24:04 GMT");
theResponse.setHeader("Server", "Tomcat");
theResponse.addCookie(theRequest.getCookies()[0]);
theResponse.setHeader("pragma", "no-cache"); // HTTP 1.0
theResponse.setHeader("Cache-Control", "no-cache"); // HTTP 1.1
theResponse.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // a past date
theResponse.setDateHeader("Last-Modified", (new java.util.Date()).getTime());
theResponse.setHeader("Connection", "close");
theResponse.setContentType("text/plain");
//some other things...
PrintWriter aPrintWriter = theResponse.getWriter();
aPrintWriter.write("this is the string to be put into the body part of the http packet.");
However, I am checking what I am sending as response using the ethereal network sniffing tool and seeing the result below:
HTTP/1.1 200 OK\r\n
Request Version: HTTP/1.1
Response Code: 200
Server: Apache-Coyote/1.1\r\n
Content-Length: 68\r\n
Date: Tue, 24 Apr 2007 17:55:10 GMT\r\n
\r\n
Data (68 bytes)
I am setting header parameters as it should be.. But it doesn't care about my parameters and Tomcat puts some values that it selects..
Where is my fault? Can anyone recommend sth please..? I am really stucked here..
Thanks & RegardsHello,
It looks like your question is really related to Tomcat (coyote). However if you want to control the server name on OC4J you can do it, see this blog entry:
- OC4J tip: changing the server information
Regards
Tugdual Grall -
Problem with Dynamic Header setting with SOAP Adapter
Hi All,
I'm trying to set SOAP Action dynamically. However, in some systems it's not working. I tested perfectly in one system.
Right now I'm using PI service patch 14. Is it a bug in this pack? or anything needs to be done to enable this concept?
ThanksHi,
What kind of errors do you get ? And maybe a code snippet would be helpful ...
Rgds
Chris -
Bluetooth head set not detecting
Hi..I have bought new C2-03 dualSIM handset which has not been detecting nokia BH 101 Bluetooth head set. was using same head set with sony ericsson handset,
Does nokia this mode support this.
RgdsBefore you can use the headset with your phone you will need to pair it first. To pair them you need to put the headset into pairing mode. The instructions for this is in the user guide but I have also attached it here for your convenience.
Pair the headset
1. Ensure that your phone is switched
on and the headset is switched off.
2. Press and hold the multifunction
key (for about 8 seconds) until the
green indicator light starts to flash
quickly.
3. Activate the Bluetooth feature on
the phone, and set the phone to
search for Bluetooth devices.
4. Select the headset from the list of
found devices.
5. Enter the passcode 0000 to pair
and connect the headset to your
phone. In some phones, you may
need to make the connection
separately after pairing. You only
need to pair the headset with your
phone once.
If the pairing is successful, the
headset appears in the phone menu
where you can view the currently
paired Bluetooth devices. -
Hi , Can someone please throw some light on how we can add a new parameter in HTTP header for a WSDL call. I will be using a Web-service adapter to invoke a wsdl and the requirement is to pass a HTTP Header parameter with each call, this parameter would be interpreted by an intermediary system before the call actually goes to target system.
In 10.1.3.5, there were several examples or samples in the Oracle BPEL folder. I think there were ones called HTTPGetService and HTTPPostService. You might check to see if they are still around.
-
How to deal with the "Set-Cookie" field in HTTP header??
I follow the RFC-2616 specification to write a socket program to fetch web pages.
I have to deal with all the fields included in the HTTP header.
But the RFC-2616 doesn't talk anything about the "Set-Cookie" field.
Does anyone know how to handle this field or provide me any useful documentation.
Any help is appreciated.A cookie is set with the "Set-Cookie: "-field in the http header, like this:
Set-Cookie: mycookie=someValue
This cookie should only be returned to the same host as it came from, like this in the http header of a request:
Cookie: mycookie=someValue
If the parameter looks like this:
Set-Cookie: mycookie=someValue; path=/cgi-bin
, the cookie should only be returned to the host if the request path starts with /cgi-bin
If the parameter looks liek this:
Set-Cookie: mycookie=someValue; domain=.mydomain.com
, the cooke should be returned to all hosts in the .mydomain.com-domain
There is also a "expires="-field, which works as expected and a "secure"-field, which I'm not sure how to handle. Maybe the cookie should only be sent to an SSL-enabled host?
Hope this helps you. Bye,
Dag W. -
How to set HTTP header field "cookie" with http receiver adapter?
Hi,
I am using http receiver adapter (not axis) in a scenario. I could not set a parameter with key cookie in http header. Is there some kind of restriction to set it? I am able to set others like connection and create custom fields using ASMA and dynamic key configuration via UDF on mapping.
Could you please comment on, is cookie http parameter special or noneditable by PI's http adapter? I am looking for a solution without editing any abap code...
Regards,I believe it is possible since axis adapter provides very same functionality. Let me summarize my scenario may be it helps:
I am trying to call series of webservice lets say in a BPM. First service (login service) will provide me with a session id (in http header with key Set-Cookie) then I will call another service which has that session id in its http header with key cookie then I am going to logout. So I am testing the second part now, but it doest let me send cookie http header parameter.
I hope I clarified a bit more my problem.
Regards, -
Error in setting up HTTP Header Variable Authentication
Hi,
I am trying to set-up SSO for SAP Biller Direct aplication (deployed on SAP J2EE 7.0) using HTTP Header variable authentication.
As per SAP documentation I have created a new login module "HeaderVariableLoginModule" pointing to class "com.sap.security.core.server.jaas.HeaderVariableLoginModule".
Then I have added this new login module to Statck "Ticket" and the new config looks as below. HTTP header when UID is passed is USI_LOP.
Name Flag Options
com.sap.security.core.server.jaas.HeaderVariableLoginModule Sufficient ume.configuration.active= tue,
Header=USI_LOP
BasicPasswordLoginModule Optional
CreateTicketLoginModule Optional ume.configuration.active= tue
EvaluateTicketLoginModule Sufficient ume.configuration.active= tue
The problem I am now having is that the authentication through HTTP_HEADEr does not work. Even though I ahve increased the trace level for JAAS module to debug, there is not any type of information generated in the log.
Each time I call the Biller Direct URL from the extrenal web server which also passes the HEADER variable for Authntication, the authrisation just fails and I am being shown a Logon Screen to pust UID/PASSWORD.
Can someone please guide me, how I can debug this? There is very no information whether anyone tried to login with HEADER varibale and that has failed...
Also, I am not pretty sure whether I am using the right Authentication Stack, which is is Ticket in my case..
But when I enter the application without any URL redirects and enter UID and password directly for Biller Direct, I get the following in log file, which makes me believe that I am using the right stack.
LOGIN.OK
User: CONDLG
Authentication Stack: ticket
Login Module Flag Initialize Login Commit Abort Details
1. com.sap.security.core.server.jaas.HeaderVariableLoginModule SUFFICIENT ok false false
2. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule OPTIONAL ok true true
3. com.sap.security.core.server.jaas.CreateTicketLoginModule OPTIONAL ok true true
4. com.sap.security.core.server.jaas.EvaluateTicketLoginModule SUFFICIENT ok false false
Central Checks true
Any help will be very much apprecated..
Thanks,
Vikrant SudVikrant,
The reason why it is not working is because your login modules in ticket stack are in wrong order and with wrong flags. The first one should be EvaluateTicketLoginModule with flag=SUFFICIENT, then the Header Variable login module, with flag=OPTIONAL, then CreateTicketLoginModule with flag=SUFFICIENT, then BasicPasswordLoginModule with flag=REQUISITE, and lastly CreateTicektLoginModule with flag=OPTIONAL
Thanks,
Tim -
Which OAM setting for passing values in HTTP header to application
Experts, what is the setting in OAM 11gR2 that is set to pass a userid pulled from a LDAP directory (which is already configured with OAM) as a HTTP Header to an application.
This is typically in cases where OAM is protecting or providing to protected resources on a Web Server or application.
Is this setting (in OAM) by default set to userid? I wanted to know exactly where and how to set this value in OAM Console settings.In the protected resource policy and protected authorization policy in the responses tab set parameters to return headers for example if you want to return userid under name set header name like user_name, type header and the value as $user.userid. By default I guess OAM_REMOTE_USER is set in the http headers which contains the user id.
-
ESB requires "SOAPAction" to be set in HTTP header?
I'm trying to insert an ESB flow between an existing web service and client. The service and client were previously built with Apache Axis.
By generating an appropriate WSDL (doc/wrapped rather than Axis' default RPC style) for the existing service, I'm able to connect the ESB to the service.
The problem is that the existing client (built using Axis) sets the SOAPAction in the HTTP header to empty (SOAPAction: ""), and the ESB appears to require this to be set to the desired operation. If this is a hard requirement, then I can't directly connect the existing client to the ESB flow.
So, the question is whether it's possible to have the ESB relax the requirement for the SOAPAction header. And if so, how?
If I can't get the ESB to accept SOAP requests with an empty SOAPAction, then I'll have to create a custom adapter or insert an additional proxy layer (yuk). Anyone else have any suggestions?This is all done automatically by FB.
Just to try something out I just now made a simple app with a label only and tried to upload to Google... FAILED!!!!
"Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml"
LOL, FB can't even create this. :-/
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/3.1">
<!-- Adobe AIR Application Descriptor File Template.
Specifies parameters for identifying, installing, and launching AIR applications.
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1
The last segment of the namespace specifies the version
of the AIR runtime required for this application to run.
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
the application. Optional.
-->
Message was edited by: KesherMedia.Com -
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. -
Errors with Resource Adapter with data source as "http header"
hi Team,
The objective was to create a ResourceAdapter that will get accountid from http-header and automatically log me in. More like Siteminder, Tivoli Access Mgr.
In the adapter's "prototype.xml", I added this line.
"<AuthnProperty name='sauid' displayName='UserID in From Browser' formFieldType='text' isId='true' dataSource='http header'/>
I enable pass-through authn for "user-interface" app.
My test passes, when I login to "/idm/user". I am not prompted for uid/pwd instead I am
transparently logged and presented with self-service page, aka single-sign-on. so far so good.
But, I have an issue when when I login to /idm (not /idm/user) as configurator and then try to create a new user.....I donot see the set password fields in modify.jsp. This issue is only apparent if I set enable pass-through for user-interface. If I reset the user interface to default, which is userid/pwd, then I do see set-password-fields in modify.jsp.
Any leads on why this could be happening?Hi Asam,
If we want to create a parameter depend on another dataset, we can additional create or add the dataset, embedded or shared, that has a query that contains query variables. Then use the option that “Get values from a
query” to get available values. For more details, please see:http://msdn.microsoft.com/en-us/library/dd283107.aspx
http://msdn.microsoft.com/en-us/library/dd220464.aspx
As to the Report Builder features, we can refer to the following articles:http://technet.microsoft.com/en-us/library/hh213578.aspx
http://technet.microsoft.com/en-us/library/hh965699.aspx
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
hi
how to set (or is it even possible) to set http header (in http request) in JEditorPane (to set referrer, user agent, etc.)
thanks a lotThanks Raja,
I am not an ITS expert by any means. I need help to work out how use the information in OSS Note 494984 to solve my problem.
The note seems to be about setting headers on all incoming requests to ITS.
I need to set the content-type header on an outgoing response generated using a specific (XML) template.
I did the BC440 course back in 2000 but after 2000 I never did another ITS project, focusing on Java and J2EE instead. So I am not sure how to apply what the OSS Note says. Do I need to assign the content type to a Business HTML parameter in the template? The documentation I have with SAP@Web Studio is not helpful.
Maybe you are looking for
-
Replication of Material Sales status (with user values) from ECC to CRM
Hi all, I 'm trying to find out how to replicate the sales statuses of the material master data in ECC (in view "sales", field DChain spec. status, MKVE-VMSTA) to the Material SAles statuses in CRM. The sales statuses in ECC have been maintained (v
-
I just migrated from an older iMac G4 to a newer iMac 2GHz Intel Core Duo. To my chagrin I then discovered that Director MX 2004 would not work on an Intel machine. So... I upgraded to Director 11. After all the hassle of proving (once again) that I
-
Fico interview questions and Real time tickets with resoving details
MODERATOR: Do not post (or request) email address or links to copyrighted or confidential information on these forums. If you do, the thread will be LOCKED and all points UNASSIGNED. hi sap gurus i have done sap-fico iam in job trai
-
Clarification on Logical System naming
I have a Web AS ABAP Technical system ES1 with a client 100 assigned as a Logical system ES1CLNT100. I also have a Business system BS_ES1 running on this with a Logical System name ES1CLNT100 i.e. the same as the technical system (this is a test syst
-
Why do I have to change source input to mono when it's recorded in stereo through my interface from an acoustic pick up in order to hear anything in playback? It's a dean markley acoustic pick up with a mono 1/4" jack. It's plugged into a focusrite i