How to get the cookie from a web service using Axis
I used the AXIS wizard to consume a WSDL and create a bunch of boiler plate code. It works great in that I can talk to the web service and submit requests.
The problem is that I need to retrieve the cookie from the login request and use it when making subsequent requests. I have been unable to find the cookie and would appreciate a point in the right direction.
Currently I'm trying something like this
String cookie = (String)((Stub)service)._getCall().getMessageContext().getProperty(HTTPConstants.HEADER_COOKIE);
Thanks in advance.
Answered on my own:
Just have to use
x_result = http_client->response->get_data( ).
instead of
x_result = http_client->response->to_xstring( ).
Just don't knwo why the filesize is wrong also - but I can work with this image!
Similar Messages
-
How to get the values from struct data type using java code..?
Hi ,
I am newer to java.
we are using oracle database.
How to get the data from struct data type using java code.
Thanks in Advance.
Regards,
kumarHi Rajeev,
To retrieve a FilterContainer you will need to traverse the report structure:
ReportStructure boReportStructure = boDocumentInstance.getStructure();
ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
FilterContainer boFilterContainer = null;
if (boReportContainer.hasFilter()) {
boFilterContainer = boReportContainer.getFilter();
} else {
boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
Hope this helps.
Regards,
Dan -
Why I can't get the cookie from this web site when I can get it from google
public static void main(String[] args) throws Exception {
// I can get the cookie from "http://www.baidu.com"
// String domain1 = "http://www.baidu.com/";
// String domain2 = "www.baidu.com";
// I can get the cookie from "http://www.google.com"
// String domain1 = "http://www.google.com/";
// String domain2 = "www.google.com";
// I can not get the cookie from "http://www.csdn.net"
String domain1 = "http://www.csdn.net/";
String domain2 = "www.csdn.net";
URL url = new URL(domain1);
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestProperty("User-Agent", "Internet Explorer");
httpConn.setRequestProperty("Host", domain2);
httpConn.connect();
String cookie = httpConn.getHeaderField("Set-Cookie");
System.out.println(cookie);
My question is: How can I get the cookie from the web site:http://www.csdn.net?I found it in my computer , the location is: C:\Documents and Settings\zhijun\Cookies\zhijun@csdn[2].txt
and there are many characters, they are:
__utma
17226283.1339458738.1221633513.1223535733.1223539291.58
csdn.net/
1600
786595712
30107528
1029600608
29960677
__utmz
17226283.1223539291.58.57.utmccn=(organic)|utmcsr=baidu|utmctr=VB.NET%B2%BB%C4%DC+%B6%CF%B5%E3|utmcmd=organic
csdn.net/
1600
4189609856
29997389
1029910608
29960677
LastVisitedForum
b7e466c6-291a-4072-acee-15d2be78c647*b5f1380c-f04c-4682-861a-54357b14186a*0a4a010e-8694-4139-b91f-a4ee1374981b*caa7532e-956b-4661-a53f-d46e3f1a8187*8b327318-2c42-4a49-8aed-ef8c33697e7f
csdn.net/
1536
2105548800
29964700
960690608
29960677
userid
2018946
csdn.net/
1536
1900813440
29963485
771368976
29960669
__utmb
17226283
csdn.net/
1600
1849111424
29960681
1029760608
29960677
ABCDEF
X1rZPCiZupWekhlTu78xWhr2Oj5GmFwk0J%252b8COfIv7IvVh2PgEPu2V7ooeZuUnene2j%252fDKJsNnZWYBSQxVkTfunvGq%252fDYuzFALM0ugLUmppZAHgfUWgQ%252bziPRLLJyFdzUpHwfG%252fReU8SfFy588HH02NPWPsO8RjgtHym%252bcJdUOnIH5J%252bkPEj%252b%252bZwlSPb5u0M0mPQRU1gOScfY4b981MifF4ksep8sZp1Ro2ofGHIg6l%252bgJ0P0XFASz2cJU8Objo%252f
csdn.net/
1536
1900813440
29963485
770898976
29960669
QWERTOP
6695
csdn.net/
1536
1900813440
29963485
771058976
29960669
activeUserName
boxiuzhen
csdn.net/
1536
1900813440
29963485
771058976
29960669
UserName
boxiuzhen
csdn.net/
1536
1900813440
29963485
771058976
29960669
PName
542a00960558bf1690fe08696d1245f407130025d59bd14ad6430f
csdn.net/
1536
1900813440
29963485
771368976
29960669
Is this prove that the csdn web site which I can not get the cookie is not using url-rewriting? -
Hi,
I have table called Employe. And the Columns are Emp_ID,EMP_NAME,SRC_SYS_CD,DOB
I have Query like
Select
COALESCE(MAX(CASE WHEN src_sys_cd='1' THEN Emp_id END), MAX(CASE WHEN src_sys_cd='2' THEN Emp_Id END))Emp_Id,
COALESCE(MAX(CASE WHEN src_sys_cd='1' THEN Emp_name END), MAX(CASE WHEN src_sys_cd='2' THEN Emp_Name END))Emp_name,
COALESCE(MAX(CASE WHEN src_sys_cd='1' THEN dob END), MAX(CASE WHEN src_sys_cd='2' THEN dob END))dob ,
from Employe
group by dob.
I want to generalize the query like get the columns from SYS.ALL_COLUMNS table for that table name and want to pass it to COALEACE() function. I tried with Cursor. But i didnt get the appropriate results.
Is there any way to achieve this? Please help me out in this regard.
Thanks,Is this the kinda thing you're after?
Add a filter to the queries to get just a single table/
WITH allCols AS (
SELECT s.name as sName, o.name AS oName, c.name AS cName, column_id,
CASE WHEN st.name in ('float','bigint','tinyint','int','smallint','bit','datetime','money','date','datetime2','uniqueidentifier','sysname','geography','geometry') THEN st.name
WHEN st.name in ('numeric','real') THEN st.name + '('+CAST(c.scale AS VARCHAR)+','+CAST(c.precision AS VARCHAR)+')'
WHEN st.name in ('varbinary','varchar','binary','char','nchar','nvarchar') THEN st.name + '(' + CAST(ABS(c.max_length) AS VARCHAR) + ')'
ELSE st.name + ' unknown '
END + ' '+
CASE WHEN c.is_identity = 1 THEN 'IDENTITY ' ELSE '' END +
CASE WHEN c.is_nullable = 0 THEN 'NOT ' ELSE '' END + 'NULL' AS bText,
f.name AS fileGroupName
FROM sys.columns c
INNER JOIN sys.objects o
ON c.object_id = o.object_id
AND o.type = 'U'
INNER JOIN sys.systypes st
ON c.user_type_id = st.xusertype
INNER JOIN sys.schemas s
ON o.schema_id = s.schema_id
INNER JOIN sys.indexes i
ON o.object_id = i.object_id
AND i.index_id = (SELECT MIN(index_id) FROM sys.indexes WHERE object_ID = o.object_id)
INNER JOIN sys.filegroups f
ON i.data_space_id = f.data_space_id
), rCTE AS (
SELECT sName, oName, cName, column_id, CAST(cName + ' ' + bText AS VARCHAR(MAX)) as bText, CAST(cName AS VARCHAR(MAX)) AS colList, fileGroupName
FROM allCols
WHERE column_id = 1
UNION ALL
SELECT r.sName, r.oName, r.cName, c.column_id, CAST(r.bText +', ' + c.cName + ' ' +c.bText AS VARCHAR(MAX)), CAST(r.colList+ ', ' +c.cName AS VARCHAR(MAX)), c.fileGroupName
FROM allCols c
INNER JOIN rCTE r
ON c.oName = r.oName
AND c.column_id - 1 = r.column_id
), allIndx AS (
SELECT 'CREATE '+CASE WHEN is_unique = 1 THEN ' UNIQUE ' ELSE '' END+i.type_desc+' INDEX ['+i.name+'] ON ['+CAST(s.name COLLATE DATABASE_DEFAULT AS NVARCHAR )+'].['+o.name+'] (' as prefix,
CASE WHEN is_included_column = 0 THEN '['+c.name+'] '+CASE WHEN ic.is_descending_key = 1 THEN 'DESC' ELSE 'ASC' END END As cols,
CASE WHEN is_included_column = 1 THEN '['+c.name+']'END As incCols,
') WITH ('+
CASE WHEN is_padded = 0 THEN 'PAD_INDEX = OFF,' ELSE 'PAD_INDEX = ON,' END+
CASE WHEN ignore_dup_key = 0 THEN 'IGNORE_DUP_KEY = OFF,' ELSE 'IGNORE_DUP_KEY = ON,' END+
CASE WHEN allow_row_locks = 0 THEN 'ALLOW_ROW_LOCKS = OFF,' ELSE 'ALLOW_ROW_LOCKS = ON,' END+
CASE WHEN allow_page_locks = 0 THEN 'ALLOW_PAGE_LOCKS = OFF' ELSE 'ALLOW_PAGE_LOCKS = ON' END+
')' as suffix, index_column_id, key_ordinal, f.name as fileGroupName
FROM sys.indexes i
LEFT OUTER JOIN sys.index_columns ic
ON i.object_id = ic.object_id
AND i.index_id = ic.index_id
LEFT OUTER JOIN sys.columns c
ON ic.object_id = c.object_id
AND ic.column_id = c.column_id
INNER JOIN sys.objects o
ON i.object_id = o.object_id
AND o.type = 'U'
AND i.type <> 0
INNER JOIN sys.schemas s
ON o.schema_id = s.schema_id
INNER JOIN sys.filegroups f
ON i.data_space_id = f.data_space_id
), idxrCTE AS (
SELECT r.prefix, CAST(r.cols AS NVARCHAR(MAX)) AS cols, CAST(r.incCols AS NVARCHAR(MAX)) AS incCols, r.suffix, r.index_column_id, r.key_ordinal, fileGroupName
FROM allIndx r
WHERE index_column_id = 1
UNION ALL
SELECT o.prefix, COALESCE(r.cols,'') + COALESCE(', '+o.cols,''), COALESCE(r.incCols+', ','') + o.incCols, o.suffix, o.index_column_id, o.key_ordinal, o.fileGroupName
FROM allIndx o
INNER JOIN idxrCTE r
ON o.prefix = r.prefix
AND o.index_column_id - 1 = r.index_column_id
SELECT 'CREATE TABLE ['+sName+'].[' + oName + '] ('+bText+') ON [' + fileGroupName +']'
FROM rCTE r
WHERE column_id = (SELECT MAX(column_id) FROM rCTE WHERE r.oName = oName)
UNION ALL
SELECT prefix + cols + CASE WHEN incCols IS NOT NULL THEN ') INCLUDE ('+incCols ELSE '' END + suffix+' ON [' + fileGroupName +']'
FROM idxrCTE x
WHERE index_column_id = (SELECT MAX(index_column_id) FROM idxrCTE WHERE x.prefix = prefix) -
How to get the value from a JavaScript and send the same to Java file?
Hi.
How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
Thanks and regards,
Leslie VYes, I am trying with web application.
In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
How to send this 'message' with and to the 'request'?
Thanks for the help :-)
The actual JS code is:
function productdeselection()
var i=0;
var j=0;
var deselectedproduct = new Array(5);
var message = "Are you sure to delete Product ";
mvi=document.forms[0].MVI;
mei=document.forms[0].MEI;
lpi=document.forms[0].LPI;
if(null != mvi)
++i;
if(null != mei )
++i;
if(null != lpi)
++i;
if(null != mvi && mvi.checked)
deselectedproduct[++j]="MVI?";
if(null != mei && mei.checked)
deselectedproduct[++j]="GAP?";
if(null != lpi && lpi.checked)
deselectedproduct[++j]="LPI?";
if( 0!=j)
if(i!=j)
for (x=0; x<deselectedproduct.length; x++)
if(null != deselectedproduct[x])
message =message+ "-" +deselectedproduct[x];
alert(message);
else
//alert(" You cannot remove all products!");
return false;
return true;
} -
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
Need how to get the data from the external file in eCatt
Hi ,
Could any body suggest how to get the values from the external file(Excel,CSV file,Text file) and pass it as varaiable in ecatt Test script.
Problem: Need to execute FK01-Vendor creation Transaction with multiple set of data .As per my understanding we could achive through Variants in Testdata set in eCatt .
But is there any way to store the data in excell file and get the data and pass it to FK01 Test scripts
Appreciate response on thisHi
See the links they may be useful
check these link,
eCATT- An Introduction
/people/sumeet.kaul/blog/2005/07/26/ecatt-an-introduction
Creating Test Scripts
/people/sumeet.kaul/blog/2005/08/10/ecatt-creating-test-scripts
eCATT Logs
/people/sapna.modi/blog/2006/04/18/ecatt-logs-part-vi
eCATT Scripts Creation TCD Mode
/people/sapna.modi/blog/2006/04/10/ecatt-scripts-creation-150-tcd-mode-part-ii
Creation of Test Data Container
/people/sumeet.kaul/blog/2005/08/24/ecatt-creation-of-test-data-container
eCATT Scripts Creation - SAPGUI Mode
/people/sapna.modi/blog/2006/04/10/ecatt-scripts-creation--sapgui-mode-part-iii
Integrating ECATT & MERCURY QTP Part -1
/people/community.user/blog/2007/01/02/integrating-ecatt-mercury-qtp-part-1
Using eCatt to Test Web Dynpro ABAP
/people/thomas.jung/blog/2006/03/21/using-ecatt-to-test-web-dynpro-abap
and
-command reference
http://help.sap.com/saphelp_nw04/helpdata/en/c6/3c333b40389c46e10000000a114084/content.htm
/people/sapna.modi/blog/2006/04/10/ecatt--an-introduction-part-i
http://prasadbabu.blogspot.com
https://www.sdn.sap.com/sdn/developerareas/was.sdn?page=test_tool_integration_for_sap_e-catt.htm
http://help.sap.com/saphelp_nw04/helpdata/en/1b/e81c3b84e65e7be10000000a11402f/frameset.htm
http://www.erpgenie.com/ecatt/index.htm
hope this helps.
Reward points for useful Answers
Regards
Anji -
How to get the original version of Web report in BW ?
Hello Friends ,
I have transported one Web report from BW development to BW Production System.
But unfortunately , the desired result not me met .
So I have been asked to keep the original version of the Web report.
As the new version of Web report has replaced the previous one ,
So could anybody tell me how to get the original version of Web report in BW ?
Many thanks in advance !!!!!!!!Hi,
You can use the Transaction STMS choose the option "Import Overview" . In the GOTO tab select "History" and choose "Import History".
Here you can find the history of requests imported to the prod system.
Regards,
K.Manikandan. -
How to get the values from popup window to mainwindow
HI all,
I want to get the details from popup window.
i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
now i am able to display popup window with values.How to get the values from popup window now.
I can anybody explain me clearly.
Thanks&Regards
kranthiHi Kranthi,
Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
Regards,
Uday -
How to get the value from databank
Hi,
How to get the value from databank? and how to set the same value to visual script object?
thanks,
raHi,
You can use GetDatabankValue(HeaderName, Value) to get the value from databank and SetDataBankValue(HeaderName, Value) to set the value to databank.
You can refer to the API Reference to see list of associated functions and techniques we can use with related to Data Bank.
This is the for OFT but if you are using Open Script then you have direct access for getting the databank value but when it comes to setting a value you have to use File operation and write you own methods to do the set operation.
Thanks
Edited by: Openscript User 100 on Nov 13, 2009 7:01 AM -
How to get the values from html:select? tag..?
i tried with this, but its not working...
<html:select styleClass="text" name="querydefs" property="shortcut"
onchange="retrieveOptions()" styleId="firstBox" indexed="true">
<html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
</html:select>
<td align="left" class="rowcolor1">
<script language="javascript" type="text/javascript">
function retrieveOptions(){
var sel = document.querydefs.options;
var selectedOption = sel[sel.selectedIndex].value;
document.write(selectedOption);
</script><td align="left" class="rowcolor1">
<script language="javascript" type="text/javascript">
function retrieveOptions(){
var sel = document.querydefs.options;
var selectedOption = sel[sel.selectedIndex].value;
document.write(selectedOption);
</script>This java script is not working at all..its not printing anything in document.write();
This is code..
<td class="rowcolor1" width="20%">
<html:select styleClass="text" name="querydefs" property="shortcut"
onchange="retrieveSecondOptions()" styleId="firstBox"
indexed="true">
<html:options collection="advanced.choices" property="shortcut"
labelProperty="label" />
</html:select>i tried with this also. but no use..i'm not the getting the seleced option...
function retrieveOptions(){
firstBox = document.getElementById('firstBox');
if(firstBox.selectedIndex==0){
return;
selectedOption = firstBox.options[firstBox.selectedIndex].value;
}actually , how to get the values from <html:select> ...?
my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window -
How to get the values from repeated frame?.
Hi
how to get the values from repeated frame?. i have to disply the first 3 digits in another place in my report.
i have field empno in repeated frame and i want to disply first 3 digits in another place in the same report.
thanksHow often do you need to display it? It sounds like you might want to base a summary on that formula with a function of first or last. If it's a per page basis, it can be a page level summary. If it's at a higher level repeating frame, then you can create the summary at that level. I'd suggest taking a look at the online help for summaries using the first/last functions.
Hope that helps,
Toby -
How to get the data from multiple nodes to one table
Hi All,
How to get the data from multiple nodes to one table.examples nodes are like A B C D E relation also maintained
Regards,
IndraHI Indra,
From Node A, get the values of the attributes as
lo_NodeA->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = ls_attributesA ).
Similarily get all the node values from B, C, D and E.
Finally append all your ls records to the table.
Hope you are clear.
BR,
RAM. -
How to get the data from pcl2 cluster for TCRT table.
Hi frndz,
How to get the data from pcl2 cluster for tcrt table for us payroll.
Thanks in advance.
Harisumanth.ChPL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
~Suresh -
How to get the data from Pooled Table T157E.
Hi Experts,
How to get the data from Pooled Table T157E.
Any help.
Thanks in Advance,
Ur's Harsha.create some internal table similar to T157E and pass all data as per SPRAS.
After that use internal table in your program as per the requirement.
Regds,
Anil
Maybe you are looking for
-
ADOBE INTERACTIVE FORMS in Web dynpro ABAP
Hi Iam new to this Web dynpro ABAP.I can able to import the pdf file in the Web dynpro ABAP.While i was taking the values in the "Data View"....Iam getting "Adobe live cycle designer" has encountered a problem.we are sorry for the inconvinience..." P
-
Windows XP & IE6, trouble refreshing
Hi, I am using CodeGuide 3.01 to write Swing applets. But after I have written, compiled and saved my Applet I run in some trouble. Maybe someone can help. I load the HTML file (wich has the reference to the Applet) into IE6 and everything goes fine.
-
Want to Learn Web page composer ?
Hi Experts, I want to learn Web Page composer ..... Can you please send me some documents or guide me in some way how can I start to learn Web Page Composer. Any Help will be appreciated. Thanks, Iqbal
-
OCP Oracle Database 11g: Advanced PL/SQL material
Hi All, Could anyone please tell me where can I get free download PDF or material or tutorial for OCP Oracle Database 11g: Advanced PL/SQL Thanks in Advance.
-
Boot issues (IE won't boot)
Well, this may or may not be one of the 34890235457302 issues with 10.4.8. I'm not sure. I was booted to windows (as I am now), when 10.4.8 came out. I did NOT actively update the computer. Now, when I start up, I get the tone, and then the apple com