HTTP Headers from JCD
Hi,
I have a SOAP callable JCD, which i deploy to an HTTP Authenticated server. We use basic HTTP authentication.
Is it possible to obtain the username from the http header from within the JCD? I fear that i might have to use a HTTP eway in some shape or form, but if you can get it from the jcd, then thats great!
Cheers
weemort
Hi Matteo-
The header values should be passed as part of the Credentials object. This can be done with a custom AuthenticationHandler.
Alternatively, you could store the current request in a ThreadLocal and access it from your LoginModule, but IMHO the code to do this isn't as clean.
Justin
Similar Messages
-
How to get HTTP headers from Data Provider Class?
Hi,
I'm the beginner in SAP NetWeaver Gateway. Using Service Builder I created CRUD OData web service and implemented CRUD operations in Data Provider Class. Data Provider Class has methods like MYENTITY_GET_ENTITYSET, MYENTITY_GET_ENTITY, MYENTITY_CREATE_ENTITY, MYENTITY_UPDATE_ENTITY. How can I get HTTP headers from the methods of this Data Provider Class?You can do so by using the following code in DPC
Data : Lo_facade type ref to /IWBEP/IF_MGW_DP_INT_FACADE.
lo_facade ?= /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lt_client_headers = lo_facade->get_request_header( ).
Regards,
Atanu -
Exclude http headers from reponse??
Hi all,
I post data to a server and get response[in xml] back like this
Socket theSock = new Socket(serverhost,80);
PrintStream ps = new PrintStream(theSock.getOutputStream());
ps.println("POST /url HTTP/1.0");
SAXBuilder builder = new SAXBuilder(); //==<< get reponse
Document doc = builder.build(theSock.getInputStream());
.at builder.build I've got "SAXException: Parsing Error : The root element is required in a well-formed document" .
that because output from theSock.getInputStream() is
HTTP/1.1 200 OK
Date: Wed, 04 Jul 2007 10:14:54 GMT
Content-Length: 105
Content-Type: text/xml;charset=UTF-8
Connection: close
<resp>
<status>200</status>
<description>ok</description>
</resp>I know that if i use HttpURLConnection the response InputStream will not contain http headers. But I'm just curious that with Socket, Is there any trick to get only content from InputStream?There is no trick except to use the HttpUrlConnection class. That�s why it was created. It wraps the socket and parses through the headers for you. The socket is very low level and all it sees are bits over an input stream (TCP / UDP). It does not know or care about HTTP which is a protocol on top of TCP.
-
Passing HTTP Headers from BPEL to a RESTFul service in SOA 11g PS2.
Hi All,
We have the following requirement.
We need to pass the following headers to RESTFul service.
x_invensys_wss_username = "Some UserName"
x_invensys_wss_password = "Some Password".
I tried to first pass username and password properties by following below post.
Attach Http headers in BPEL Process
Specifically below steps..
Hi,
If you are talking about how to invoke a secured webservice...please follow this...
After creating the reference for your secured webservice in your composite, right click on the composite and say configure web service policies...
Add the security policy named "oracle/wss_http_token_client_policy"
And also, for the reference, create two binding properties
1. oracle.webservices.auth.username
2. oracle.webservices.auth.password
For the above two properties, provide the appropriate values.....
Please test the same after making this changes and let me know....
Thanks,
Narsing Pumandla
======================================================
Somehow i don't see the headers getting added to the call.
The service i am calling don't really need these headers.But the URL we will be calling shortly for the real application need them.
Can someone let me know whether this SOA version supports this or not.?
If yes , Then what is the best way to solve this issue.[i.e Able to send hardcoded values and also user specified values.]
Thanks,
Sid.I am using this URL : api.geonames.org/postalCodeSearch?postalcode=90110&username=siddhardha
I see below message in audit trail.Not sure why the headers are not visible.
Am i missing something which is very fundamental.?
<messages>
<Rest_InputVariable>
<part name="Input">
<Input>
<postalcode>90110</postalcode>
<username>Siddhardha</username>
</Input>
</part>
</Rest_InputVariable>
<Rest_OutputVariable>
<part name="geonames">
<geonames>
.....results.............
</geonames>
</part>
</Rest_OutputVariable>
</messages>
Edited by: Siddhardha M on Jul 19, 2012 5:44 AM -
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,
GilbertHello 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 -
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
HafizHafiz
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 -
How can I parse only the HTTP Headers from an InputStream? I just want to parse up to the end of the headers, I want to preserve the body of the message in the stream to be read later by a content decoder or something along those lines.
Right I already know all of this. First the HTTPURLConnection doesn't have all the features that I want. Second I have already tried creating a parsing routine and for some reason I just can't come up with one that works every time, right now I have...
sb is a StringBuilder
in is a DataInputReader
while ((rdata = in.readLine()) != null && !doneReadingHeader) {
sb.append(rdata);
sb.append("\n");
//If there is a newline?
if(rdata.length() < 1) {
doneReadingHeader = true;
} -
Allow-http-request-headers-from Question
I have a crossdomain.xml file in place, but am still getting this error:
"Security error accessing url"
I searched the web and is it true that because I am accessing a SOAP web service I need to add this to the crosssdomain.xml file:
<allow-http-request-headers-from domain="MYDOMAINHERE" headers="SOAPAction"/>
Is there anything else from a crossdomain.xml file perspective, or anything else in general to be able to access these web services from my Flex app?
Thanks for your responses.The SWF is at MyDomain.com (for example).
The crossdomain.xml file is on the 3rd party web service provider at the root of their web server, and it correctly has an entry to MyDomain.com.
The exact error is "Security error accessing url".
I read on the web that when accessing SOAP web services you need to add these entries to the crossdomain.xml file:
<allow-http-request-headers-from domain="MyDomain.com" headers="SOAPAction"/>
Is that the case and is there anything else extra I need to do to get web services to work in this case?
Thanks Alex, for helping with this. -
FRM-92101 RUNTIME error - No HTTP headers received from runform
Oracle IAS 9.0.4 servers are configured to serve up webforms. The Server is configured to run only forms.Is it possible to run report files from this SERVER.
Iam getting FRM-92101 RUNTIME error - No HTTP headers received from runform.
Iam not able to run any reports.
Thanks
HimabalaHello,
Q: Is it possible to run reports from Oracle IAS 9.0.4 server that is not running the reports server locally ?.
A: Yes
For the error FRM-92101 when using RUN_REPORT_OBJECT, check that the CLASSPATH contains the necessary jar files rwrun.jar and zrclient.jar .
Regards -
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. -
HTTP Headers - enabling caching and compression with the portal?
Has anyone configured their web server (IIS or Apache) or use a commercial product to flawlessly cache and compress all content generated by the portal?
Compression and caching is critical for making our portal based applictions work for overseas users. It should be doable, just taking advantage of standard HTTP protocols, but implementing this a complex system like the portal is tricky, we seem to be generating different values in the HTTP Headers for the same types of files (such as CSS).
We are running Apache so can't take advantage of the built in compression capabilities of the .net portal. We are running the java vervion. 6.1 mp1, sql server 2000 (portal, search, collab, publisher, studio, analytics, custom .net and java portlets on remote server).
Basically our strategy is to compress all outgoing static and dynamic text content (html, CSS, javascript), and to cache all static files (CSS, javascript, images) for 6 months to a year depending on file type.
Here are some links on the subjects of caching and compression that I have compiled:
Caching & Compression info and tools
http://www.webreference.com/internet/software/servers/http/compression/
http://www.ibm.com/developerworks/web/library/wa-httpcomp/
http://www.mnot.net/cache_docs/
http://www.codeproject.com/aspnet/HttpCompressionQnD.asp?df=100&forumid=322472&exp=0&select=1722189#xx1722189xx
http://en.wikipedia.org/wiki/Http_compression
http://perl.apache.org/docs/tutorials/client/compression/compression.html
https://secure.xcache.com/Page.aspx?c=60&p=590
http://www.codinghorror.com/blog/archives/000807.html
http://www.howtoforge.com/apache2_mod_deflate
http://www.ircache.net/cgi-bin/cacheability.py
http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/
http://betterexplained.com/articles/speed-up-your-javascript-load-time/
http://betterexplained.com/articles/speed-up-your-javascript-load-time/
http://www.rubyrobot.org/article/5-tips-for-faster-loading-web-sites
http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
http://www.gidnetwork.com/tools/gzip-test.php
http://www.pipeboost.com/
http://www.schroepl.net/cgi-bin/http_trace.pl
http://leknor.com/code/gziped.php?url=http%3A%2F%2Fwww.google.com
http://www.port80software.com/surveys/top1000compression/
http://www.rexswain.com/httpview.html
http://www.15seconds.com/issue/020314.htm
http://www.devwebpro.com/devwebpro-39-20041117DevelopingYourSiteforPerformanceCompressionandOtherServerSideEnhancements.html
http://www.webpronews.com/topnews/2004/11/17/developing-your-site-for-performance-optimal-cache-control
http://www.sitepoint.com/print/effective-website-acceleration
http://nazish.blog.com/1007523/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/IE_Fiddler2.asp?frame=true
http://www.fiddlertool.com/fiddler/version.asp
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
http://www.web-caching.com/cacheability.html
http://www.edginet.org/techie/website/http.html
http://www.cmlenz.net/blog/2005/05/on_http_lastmod.html
http://www.websiteoptimization.com/speed/tweak/cache/
http://www.webperformance.org/caching//caching_for_performance.html
http://betterexplained.com/articles/how-to-debug-web-applications-with-firefox/
Edited by tkoenings at 06/18/2007 6:26 AMHi Scott,
Does Weblogic platform 8.1 supports netscape? We have developed a portal which
works perfectly on IE but it dies in netscape. Is netUI tags not supported in
Netscape?
Pls reply
manju
Scott Dunbar <[email protected]> wrote:
From a pure HTML perspective Portal does it's rendering with nested
tables.
Netscape 4.x and below have terrible performance with nested tables.
The
problem is not the Portal server but rather Netscape on the client machine.
If IE and/or a recent version of Netscape/Mozilla is not possible then
there are
really only two options:
1) Faster client hardware - not likely to be an acceptable solution.
2) Minimize the number of portlets and the complexity within the portlets.
Neither of these solutions are a great answer, but the 4.7 series of
Netscape is
getting pretty old. Having said that, we've got customers who want to
continue
to use IE 4 :)
Again, though, this problem is, I'm afraid out of our hands. It is the
client
rendering time that is the issue.
cg wrote:
Does anyone know of any known reasons why the 7.0 (did it also with4.0) portal
pages can take up to almost 30 seconds to load in Netscape 4.7? I knowit is a
very generic question but our customer still uses 4.7 and will notuse the portal
b/c it takes so long to load some of the webapps. What the pages willdo when
loading is that the headers will come up and when it gets to the bodyof the page
it seems to stall and then comes up all of a sudden. For some of thepages it
takes 6 seconds and for others it takes about 24-27 seconds.
We have suggested using IE only but that is not an option with allof the customers
and getting a newer version of Netscape is also out of the question.
Any suggestions would be greatly appreciated.--
scott dunbar
bea systems, inc.
boulder, co, usa -
Invoking a web service from jcd
hi all,
Is there any built-in class in CAPS5.1 for invoking a web servervice from jcd directly. Or is there any some other automation/mechanism to achieve the same, plz provide me any sample code avilable for the same.its very urgent for me.
ThanksHello rss,
If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL. -
Acrobat Reader X stores PDFs in Temp-folder even when HTTP-headers say no-cache no-store
After updating from Acrobat Reader 9 to 10 we have noticed that PDFs viewed in the browser are left behind in the Temp-folder even after the browser has been closed.
Http-headers in the response from the server
Cache-Controls: no-cache,no-store,max-age=0,post-check=0,pre-check=0
Content-Type: application/pdf
Content-Disposition: inline; filename="xxxxxxxx.pdf"
Expires: 0
Pragma: no-cache
Folder: [User-folder]\AppData\Local\Temp
Filename-format: PDFxxx.tmp
Browsers: Firefox 3.6, Opera 11, Safari 5
Plugin: Acrobat Reader 10
Simply add a .pdf extension to the file and open again in Acrobat Reader. Since the server has set headers indicating that this PDF should not be stored locally, it is a severe security hole leaving traces of this PDF on the filesystem.
Is this a problem Adobe is aware of? When can we expect this to be fixed?
Regards,
GustavHi Michael,
Thank you for you quick response!
In Acrobat 9, I cannot find the PDFs in the Temp-folder after the browser has been closed.
In Acrobat 10, PDFs are left behind in the Temp-folder even after browser close.
To me, this looks like a bug in Acrobat 10. Would you not agree?
Regards,
Gustav -
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) -
I'm new to Flex. I'm an ASP.Net developer. We have an ASP.Net application that gets information about the user in http headers. Can a Flex app get info from http headers?
Ok, i filed an enhancement CR103654.
I am not sure when this will be fixed.
Please contact support if you need an urgent fix.
regards,
-manoj
"Steve Watson" <[email protected]> wrote in message
news:3e9d765b$[email protected]..
>
This could work, but we want to distinguish between the different codesespecially
500, 502, and 503.
Steve
"manoj cheenath" <[email protected]> wrote:
There is no API in Web service client to get HTTP response
code. This is because, the web service client can be invoked
using other protocols.
If the return code is not 2XX, then the run time will throw
exception. Will that help?
-manoj
"Steve Watson" <[email protected]> wrote in message
news:[email protected]..
I am coding an asycronous web services client and need to check thestatus
code
in the HTTP response. How can I do this?
Steve Watson
Maybe you are looking for
-
I have multiple devices used by family members, how do you make sure the kids don't see Moms messages from Dad and visa versa?
-
Function Module for Update Payment Terms in Vendor Master
Hi Guys, I have to update Payment Terms in Vendor General and Compnr code level by ABAP Program. If any guys come accross pl help me to send the FM Details. Thanks in advance.
-
it is difficult to get refund, i have cancelled the product within 15 days, but I have not received my money back yet. Not sure how to claim the money
-
How to determine which albums are available in AAC 256kbps?
Hi, I've uploaded all my iTunes library in iTunes Match and now I'd like to delete my low-quality MP3s to re-download AAC 256kbp songs from iTunes Match.. my problem is how can I understand if one of my uploaded albums has been uploaded in my low-qua
-
Printing is a bitch ! My eyes mat be 72 years old but I'm not blind but I seem about ready to go that way. I don't know why Firefox 4 beta affects whatever I try to print but it sure does ! every letter is about four spaces from the next letter. You