How to use Session ID info to send sequent requests to Https Server ?
Hey , Gurus!
Another problem for your talents :
By using InputStream , I gain all info sent back from the Https server . And Session ID info is included , such as
Session ID: {130, 17, 0, 0, 130, 170, 25, 235, 97, 13, 66, 95, 24, 241, 214, 8, 121, 216, 121, 64, 168, 15, 69, 65, 191, 192, 216, 68, 247, 130, 9, 164}
How do I use this info in my Java Application to send next request to the Https Server ?
Should I change the above Session ID info into another format ?
Should I include the converted info in the Request Header or the Body ?
Would you please give me an example ?
Thanks a lot ...
Have a nice day !
Hi,
You have to catpture the "set-cookie" header from the response which you got in the first request. The same "set-cookie" value has to be set in the subsequent requests' header. Please see the below code snippet to collect the "set-cookie" and set the cookie in the subsequest requests.
//how to Collect the "set-cookie" from the response
if (urlConnection != null)
for (int i = 1;(key = urlConnection.getHeaderFieldKey(i)) != null; i++)
System.out.println(urlConnection1.getHeaderFieldKey(i) + ": " + urlConnection.getHeaderField(key));
if (key.equalsIgnoreCase("set-cookie"))
String cookiValue = urlConnection1.getHeaderField(key);
//How to set the cookie value in the subsequent requests
urlConnection2.setRequestProperty("Cookie", cookiValue);
Good luck.
Similar Messages
-
Hi All,
I have a small C# console app.
I have been facing some timeout issue with Sql Azure for a while now.
I now decided to use the retry logic and Reliable connections - using the
TransientFaultHandling Enterprise lib
RetryPolicy myretrypolicy = new RetryPolicy<SqlAzureTransientErrorDetectionStrategy>(3, TimeSpan.FromSeconds(3));
What should be the correct max tries and interval that actually works for SQL AZURE?
The issue i have is when i use this lib i keep getting error :
Failed to establish a MARS session in preparation to send the request to the server.
As anyone used this library successfully in a console app before.If yes can you share some resources or some sample snippet code.
CheersHey there and apologies for the slow response. Is this still an issue for you? And do you still need help?
Thanks Guy -
How to use session in webservice?
In C#, can use session variable in a webservice object.
How to use session in Java webservice?
Who can give me a example?
Thanks a lotDid I use session in a wrong way?No, you are using the session correctly. The code looks fine.
Check
- your spelling of the attribute names - obviously they must match
- the ids of the sessions you get both times: session.getId(). If they have different ids, then most probably the session is being lost somewhere.
There are a number of reasons to lose a session. If you close the browser, invalidate the session in code, or lose the cookie recording the id. This happens when you change from https to http, so a session can be lost that way.
The session is normally maintained by session cookies. If you close your browser you lose the cookie. If you have disabled cookies on your machine then it also might not work.
In cases such as that you should be using the method response.encodeURL() to maintain the session for you in any hyperlinks you produce. Struts normally handles that for you though if necessary.
Hope this helps,
evnafets -
How to use session object in jsp
hi all
marry christmas
can anyone plz tell me how to use session obect in jsp
rachna
Message was edited by:
rachna_arora82hi rachna,
JSP has a default(implicit) session object...... use the getSession(true) method on the session object and then going u can either get or set attributes depending on the requirement
That was in general and now with the issue u have got..... what u can do is that the u can create session for every user who logs in and when he/she tries to login again then u can probably check for the existing session object in the JSP and perform the logic as required..... any clarifications plzzzzzzz let me know
Thanks n Regards
Naveen M
Message was edited by:
Novice_inJAVA
Message was edited by:
Novice_inJAVA -
How to use Stored Procedure Call in Sender JDBC adapter
Hi All,
Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
XierHi Xler
refer these links
/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Also, you can check Sriram's blog for executing Stored Procedures,
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
This blog might be helpfull on stored procedures for JDBC
JDBC Stored Procedures
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Please go through these threads and see if it helps...
Re: How to execute Stored Procedure?
Re: Problem with JDBC stored procedure
Thnaks !! -
How to send SOAP request by HTTP POST?
I want to access a SOAP webservice using mx.rpc.soap.mxml.WebService.
Following is my code:
<mx:WebService id="miner_service" wsdl="http://localhost:8080"> <mx:operation name="hello" result="echoResultHandler(event);"></mx:operation></mx:WebService>
When debugging with that, I got such error message:
[Fault] exception, information=[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://localhost:8080)"]
Then I use Fiddler try to capture the response returned by server, it's like this:
Error responseError code 501. Message: Unsupported method ('GET'). Error code explanation: 501 = Server does not support this operation.
But when I use python to send SOAP request by HTTP POST, the server will return correct response.
So how can I send SOAP request by HTTP POST?
(I tried <mx:WebService wsdl="http://localhost:8080" method="POST">, but no luck..)Sorry for my late reply..
There's no WSDL for that SOAP service -
How to configure IPS 4240 - K9 to send log file to syslog server
I am looking for the commands in how to configure IPS 4240-k9 to send log file to SYSLOG server. If anybody has or came across similer issue please advice.
Thanks in advanced.Ali -
I am sorry to tell you, but the Cisco IPS Sensors do not send Syslog messages. Your only options for sending signature event information are:
SDEE (an TLS Encrypted XML formatted message) the sensor is the SDEE Host and your event receiver (MARS, IME, Intelitactics, etc) is the client.
SNMP Traps - You need to set the "Action" on each signature you want the sensor to send a trap.
- Bob -
Hi,
I have a CAS, primary site and a DP. On Site properties I have set client communication : HTTP or HTTPS and PKI. on management point properties as well I have set Client communication as HTTPS PKI.
1. On primary site Multicast_servicepoint status is "error": I checked the mcsmgr.log and found below details:
Failed to send http request /SMS_MCS/.sms_mcs?op=healthcheck. Error 12030
Call to HttpSendRequestSync failed for port 443 with 12030 error code.
Health check operation failed, error code is 12030
Health check operation failed, error code is 12030
2. When I deploy any package to client it stuck in software center as "Downloading the information". no content has been getting copied. I checked the log 'datatransferservice.log' and found below error :
"Successfully sent location services HTTPS failure message.
Error sending DAV request. HTTP code 600, status ''
GetDirectoryList_HTTP mapping original error 0x80072efe to 0x800704cf.
GetDirectoryList_HTTP('https://myDPaddress.com:443/NOCERT_SMS_DP_SMSPKG$/CAS00028') failed with code 0x800704cf.
Job {CFD64352-918B-4C1D-A9C4-9C52ABAC6524} reverted impersonation.
Error retrieving manifest (0x800704cf). Will attempt retry 1 in 30 seconds.
Failed to send request to /NOCERT_SMS_DP_SMSPKG$/CAS00028 at host Mydpaddress, error 0x2efe
[CCMHTTP] ERROR: URL=https://mydpaddress.com:443/NOCERT_SMS_DP_SMSPKG$/CAS00028, Port=443, Options=480, Code=12030, Text=ERROR_WINHTTP_CONNECTION_ERROR
Raising event:
instance of CCM_CcmHttp_Status
ClientID = "GUID:41932A1A-ADDE-450F-8F16-22DC875D2E39";
DateTime = "20141225182459.543000+000";
HostName = "mydpaddress.comt";
HRESULT = "0x80072efe";
ProcessID = 7356;
StatusCode = 600;
ThreadID = 6936;
Successfully sent location services HTTPS failure message.
Error sending DAV request. HTTP code 600, status ''
I think there is some issue with IIS configuration on site server or DP or on both. Please let me know a solution..
RegardsI have corrected the PKI certificate. still Issue not resolved.
I checked further and found sms_mp_control_manager was stopped and was offline, Unable to communicate with component (error below)
Unable to query the component.
This is a child primary server. not on production yet. Removing and adding MP will resolve the issue ? if yes what are the prerequesite you suggest. pls share any link .
or any quick resolution you have ? please share...
Log: mpmsi.lasterror
Property(S): SMSCWSADSPATH = IIS://LocalHost/W3SVC/1
Property(S): CCMSHAREMODE = 1
MSI (s) (5C:EC) [08:22:19:157]: Note: 1: 1729
MSI (s) (5C:EC) [08:22:19:157]: Product: ConfigMgr Management Point -- Configuration failed.
MSI (s) (5C:EC) [08:22:19:157]: Windows Installer reconfigured the product. Product Name: ConfigMgr Management Point. Product Version: 5.00.7804.1000. Product Language: 1033. Manufacturer: Microsoft Corporation. Reconfiguration success or error status:
1603.
MSI (s) (5C:EC) [08:22:19:368]: Deferring clean up of packages/files, if any exist
MSI (s) (5C:EC) [08:22:19:368]: MainEngineThread is returning 1603
MSI (s) (5C:B0) [08:22:19:372]: RESTART MANAGER: Session closed.
MSI (s) (5C:B0) [08:22:19:372]: No System Restore sequence number for this installation.
=== Logging stopped: 12/26/2014 8:22:19 ===
MSI (s) (5C:B0) [08:22:19:375]: User policy value 'DisableRollback' is 0
MSI (s) (5C:B0) [08:22:19:375]: Machine policy value 'DisableRollback' is 0
MSI (s) (5C:B0) [08:22:19:375]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (5C:B0) [08:22:19:375]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (5C:B0) [08:22:19:376]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (5C:B0) [08:22:19:376]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (5C:B0) [08:22:19:377]: Destroying RemoteAPI object.
MSI (s) (5C:00) [08:22:19:377]: Custom Action Manager thread ending.
MSI (c) (30:B0) [08:22:19:378]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (30:B0) [08:22:19:379]: MainEngineThread is returning 1603
=== Verbose logging stopped: 12/26/2014 8:22:19 === -
Error sending DAV request. HTTP code 500, status 'Internal Server Error'
Hi All,
I am getting the error On SCCM R2 Environment .. on the client machine we are getting the below issue and software center
is not showing any information..
While checking on the client's DatatransferService.log.. i am getting the below issues..
Successfully sent location services HTTP failure message.
Error sending DAV request. HTTP code 500, status 'Internal Server Error'
GetDirectoryList_HTTP('http://MachineName:80/SMS_DP_SMSPKG$/7ea0b105-5592-48cd-8b8e-81777537c34f') failed with code 0x87d0027e.
i realize it because of Isapi filter issues.. can any one guide me to resolve the issues..
KJSUBBUHi,
In addition, I recommend you check whether you have additional Authentication methods (like ASP.NET Impersonation) enabled.
Disable the authentication method and try again.
Also, please review the link below, here is a article about troubleshoot ISAPI filter issue.
Error message when you visit a Web site that is hosted on IIS 7.0: "HTTP Error 500.0 – Internal Server Error"
http://support.microsoft.com/kb/942031
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
SCCM 2012 - Error sending DAV request. HTTP code 401, status 'Unauthorized'
Hi everyone!
I have a SCCM 2012 install with SQL 2008 R2 RU6 on it. All roles on the same server.
Application deployment was working last week and suddently, today, it's not working anymore.
Client fail to download applications. When I see the log "dataTransfertService.log" I got:
<![LOG[Enumerating DTS jobs for logged on user 'S-1-5-21-3498061407-3801314532-3722532443-1799'.]LOG]!><time="16:45:51.388-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="3536" file="dtslogon.cpp:135">
<![LOG[Enumeration of DTS jobs for logged on user 'S-1-5-21-3498061407-3801314532-3722532443-1799' is complete.]LOG]!><time="16:45:51.878-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="3536" file="dtslogon.cpp:151">
<![LOG[Enumerating DTS jobs for helper user 'S-1-5-21-3498061407-3801314532-3722532443-1799'.]LOG]!><time="16:45:51.878-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="3536" file="dtslogon.cpp:154">
<![LOG[Enumeration of DTS jobs for helper user 'S-1-5-21-3498061407-3801314532-3722532443-1799' is complete.]LOG]!><time="16:45:51.939-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="3536" file="dtslogon.cpp:170">
<![LOG[UpdateURLWithTransportSettings(): OLD URL - http://xxx.com/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1]LOG]!><time="16:48:31.738-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="5616" file="ccmutillib.cpp:3083">
<![LOG[UpdateURLWithTransportSettings(): NEW URL - http://xxx.com:80/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1]LOG]!><time="16:48:31.738-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="5616" file="ccmutillib.cpp:3095">
<![LOG[DTSJob {451ACA72-8FCC-4083-B7B5-C4C68D5E5786} created to download from 'http://xxx.com:80/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1' to 'C:\WINDOWS\ccmcache\3f'.]LOG]!><time="16:48:31.816-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="5616" file="datatransferservice.cpp:186">
<![LOG[DTSJob {451ACA72-8FCC-4083-B7B5-C4C68D5E5786} in state 'DownloadingManifest'.]LOG]!><time="16:48:31.816-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="2432" file="dtsjob.h:157">
<![LOG[[CCMHTTP] ERROR: URL=http://xxx.com:80/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1, Port=80, Options=224, Code=0, Text=CCM_E_BAD_HTTP_STATUS_CODE]LOG]!><time="16:48:32.281-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="ccmhttperror.cpp:291">
<![LOG[Raising event:
instance of CCM_CcmHttp_Status
ClientID = "GUID:4D48BE30-A5BE-40C1-A946-B0773DE7C060";
DateTime = "20120723144832.297000+000";
HostName = "xxx.com";
HRESULT = "0x87d0027e";
ProcessID = 2236;
StatusCode = 401;
ThreadID = 4204;
]LOG]!><time="16:48:32.297-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="event.cpp:729">
<![LOG[Successfully sent location services HTTP failure message.]LOG]!><time="16:48:32.312-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="ccmhttperror.cpp:395">
<![LOG[Error sending DAV request. HTTP code 401, status 'Unauthorized']LOG]!><time="16:48:32.312-120" date="07-23-2012" component="DataTransferService" context="" type="3" thread="4204" file="util.cpp:629">
<![LOG[GetDirectoryList_HTTP('http://xxx.com:80/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1') failed with code 0x80070005.]LOG]!><time="16:48:32.312-120" date="07-23-2012" component="DataTransferService" context="" type="3" thread="4204" file="util.cpp:688">
<![LOG[Job {451ACA72-8FCC-4083-B7B5-C4C68D5E5786} impersonating Network Access Account.]LOG]!><time="16:48:32.825-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="netaccessaccount.cpp:429">
<![LOG[[CCMHTTP] ERROR: URL=http://xxx.com:80/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1, Port=80, Options=224, Code=0, Text=CCM_E_BAD_HTTP_STATUS_CODE]LOG]!><time="16:48:32.887-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="ccmhttperror.cpp:291">
<![LOG[Raising event:
instance of CCM_CcmHttp_Status
ClientID = "GUID:4D48BE30-A5BE-40C1-A946-B0773DE7C060";
DateTime = "20120723144832.887000+000";
HostName = "xxx.com";
HRESULT = "0x87d0027e";
ProcessID = 2236;
StatusCode = 401;
ThreadID = 4204;
]LOG]!><time="16:48:32.887-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="event.cpp:729">
<![LOG[Successfully sent location services HTTP failure message.]LOG]!><time="16:48:32.902-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="ccmhttperror.cpp:395">
<![LOG[Error sending DAV request. HTTP code 401, status 'Unauthorized']LOG]!><time="16:48:32.902-120" date="07-23-2012" component="DataTransferService" context="" type="3" thread="4204" file="util.cpp:629">
<![LOG[GetDirectoryList_HTTP('http://xxx.com:80/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1') failed with code 0x80070005.]LOG]!><time="16:48:32.902-120" date="07-23-2012" component="DataTransferService" context="" type="3" thread="4204" file="util.cpp:688">
<![LOG[Job {451ACA72-8FCC-4083-B7B5-C4C68D5E5786} reverted impersonation.]LOG]!><time="16:48:32.902-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="4204" file="netaccessaccount.h:93">
<![LOG[DTSJob {451ACA72-8FCC-4083-B7B5-C4C68D5E5786} in state 'Cancelled'.]LOG]!><time="16:48:33.011-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="5616" file="dtsjob.h:157">
<![LOG[DTSJob {451ACA72-8FCC-4083-B7B5-C4C68D5E5786} cancelled by client.]LOG]!><time="16:48:33.011-120" date="07-23-2012" component="DataTransferService" context="" type="1" thread="5616" file="dtsjob.cpp:2771">
I already verified every single permissions, NAA is configured and has correct rights. I really don't understand what has changed...
any suggestion???
Thank you very much!SMS_DP_SMSPKG$ has Windows Authentication Enabled.
IIS Logs:
2012-07-23 15:10:08 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.81.79 ccmhttp 200 0 0 339
2012-07-23 15:11:38 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.81.52 ccmhttp 200 0 0 38
2012-07-23 15:11:38 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.81.52 ccmhttp 200 0 0 166
2012-07-23 15:11:38 10.28.80.98 PROPFIND /SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1 - 80 - 10.28.81.52 SMS+CCM+5.0 401 2 5 1
2012-07-23 15:11:39 10.28.80.98 PROPFIND /SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1 - 80 - 10.28.81.52 SMS+CCM+5.0 401 2 5 0
2012-07-23 15:11:39 10.28.80.98 PROPFIND /SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1 - 80 - 10.28.81.52 SMS+CCM+5.0 401 1 3221225581 11
2012-07-23 15:11:39 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.81.52 ccmhttp 200 0 0 384
2012-07-23 15:13:01 fe80::31df:ba5:7c1:caf6%11 GET /SMS_MP/.sms_aut MPLIST 80 - fe80::31df:ba5:7c1:caf6%11 SMS_MP_CONTROL_MANAGER 200 0 0 4
2012-07-23 15:13:11 10.28.80.98 CCM_POST /ccm_system_windowsauth/request - 80 - 10.29.73.101 ccmhttp 401 2 5 6
2012-07-23 15:14:01 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.82.72 ccmhttp 200 0 0 23
2012-07-23 15:15:40 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.81.52 ccmhttp 200 0 0 348
2012-07-23 15:15:55 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.28.81.79 ccmhttp 200 0 0 363
2012-07-23 15:16:12 10.28.80.98 CCM_POST /ccm_system/request - 80 - 10.29.73.101 ccmhttp 200 0 0 393
2012-07-23 15:17:06 10.28.80.98 CCM_POST /ccm_system_windowsauth/request - 80 - 10.28.81.79 ccmhttp 401 2 5 0
In "ContentTransferManager.log" i see that error:
<![LOG[Starting CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89}.]LOG]!><time="17:11:38.999-120" date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5400" file="ctmjob.cpp:2980">
<![LOG[Created CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89} for user S-1-5-18]LOG]!><time="17:11:39.030-120" date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5400" file="ctmanager.cpp:487">
<![LOG[Created and Sent Location Request '{996973D0-911C-4929-BE9D-39CB4D759265}' for package Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c]LOG]!><time="17:11:39.092-120" date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5332"
file="ccmpkglocation.cpp:83">
<![LOG[CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA]LOG]!><time="17:11:39.092-120" date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5332" file="ctmjob.cpp:1432">
<![LOG[Queued location request '{996973D0-911C-4929-BE9D-39CB4D759265}' for CTM job '{1C23F5FF-8ED3-43D2-91ED-169F82A24E89}'.]LOG]!><time="17:11:39.139-120" date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5332" file="ctmjob.cpp:151">
<![LOG[Persisted locations for CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89}:
(LOCAL) <a href="http://xxx.com/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1]LOG]!><time="17:11:39.452-120">http://xxx.com/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1]LOG]!><time="17:11:39.452-120" date="07-23-2012"
component="ContentTransferManager" context="" type="1" thread="5392" file="ctmjob.cpp:1894">
<![LOG[CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89} (corresponding DTS job {D22196C4-A803-42F4-B4FD-6F5FA777A778}) started download from 'http://xxx.com/SMS_DP_SMSPKG$/Content_1173b7a8-9bbf-42cc-8b0f-abd1c3f3065c.1' for full content download.]LOG]!><time="17:11:39.514-120"
date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5392" file="ctmjob.cpp:413">
<![LOG[CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA]LOG]!><time="17:11:39.577-120" date="07-23-2012" component="ContentTransferManager" context="" type="1" thread="5188" file="ctmjob.cpp:1432">
<![LOG[CTM job {1C23F5FF-8ED3-43D2-91ED-169F82A24E89} encountered error 0x80070005 during download ('Error processing manifest.')- The error maps to denied access.]LOG]!><time="17:11:40.217-120" date="07-23-2012" component="ContentTransferManager"
context="" type="3" thread="5400" file="ctmjob.cpp:2489"> -
How to use Session Key-based Request Targeting Mechanism in OCCAS ??
I read Session Key-Based Request Targeting(chapter 5) in Developing SIP Applications.
But, I don't work my application using this mechanism.
I add sesssionKey function with @SipApplicationKey annotation.
I deploy this application. And then, other machine send INVITE request.
My application received INVITE request. But sessionKey function is not called before doInvite function is called.
I used @SipApplicationKey(applicationName="...") annotation.
It didn't work.
sample code is following.
Could someone help me?
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.sip.SipFactory;
import javax.servlet.sip.SipServlet;
import javax.servlet.sip.SipServletMessage;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.SipServletResponse;
import javax.servlet.sip.SipURI;
import javax.servlet.sip.URI;
import javax.servlet.sip.annotation.SipApplicationKey;
public class app2SipServlet extends SipServlet {
private static final long serialVersionUID = 1L;
public static SipFactory sipFactory;
public static ServletContext sc;
public void init(ServletConfig cfg) throws ServletException {
super.init(cfg);
sipFactory = getSipFactory();
sc = getServletContext();
trace("+++ app2SipServlet Initialization");
@SipApplicationKey
public static String sessionKey(SipServletRequest req) {
String appid = req.getHeader("ApplicationID");
System.out.println("application id : " + appid);
return appid;
@Override
public void doRequest(SipServletRequest req) throws ServletException, IOException {
trace(req, "doRequest()");
super.doRequest(req);
@Override
protected void doInvite(SipServletRequest req) throws ServletException, IOException {
URI from = req.getFrom().getURI();
String user = ((SipURI)from).getUser();
trace(user + " : " + req.getSession().getApplicationSession().getId());
trace(user + " : " + req.getSession().getApplicationSession().getApplicationName());
SipServletResponse resp = req.createResponse(200);
resp.send();
trace(resp);
}How many servlets you have defined in your sip.xml .If there are multiple you may want to check if
-- You have defined main-servlet ?
-- or Is deployment descriptor version 1.0 or 1.1 -
How to use the same channel to send a file and messages to the server
I'm trying to develop a simple program that will send and receive files from the server and in the same time I need to communicate with the server through the messages
I'm using TCP Socket
my problem is
I have only one channel
so, I have no option, either I can use it for sending the file itself or sending the message .. but not both !
my question is : How can I use the same channel for sending and receiving (file & message)
I would appreciate for any clue or hint
bestkajbj wrote:
kmarwani wrote:
Thanks for reply
yes, that what I'm thinking to do
but, in case of sending binary file, if I attached a flag on its header, will it corrupt the file ?
bestThe other end would of course need to decode the messages that you get, and only write the "data" part to the file.Thanks
I'm gonna try to hard-code what you suggest and i will post what happen with me here
even though I'm not sure how can I add header to a binary file and remove it from the file at other end. (coz I read it as stream and send as array without touching its contents)
this how I'm sending the file
ConnSocket = CSocket.accept();
ToClient = new DataOutputStream(ConnSocket.getOutputStream());
File myFile = new File("abc.jpg");
FileInputStream myFileInStream = new FileInputStream(myFile);
BufferedInputStream mybuffInStream = new BufferedInputStream(myFileInStream);
myBytArray = new byte[(int) myFile.length()];
mybuffInStream.read(myBytArray, 0, myBytArray.length);
ToClient.write(myBytArray, 0, myBytArray.length);
ToClient.flush();
myFileInStream.close();best -
How to use Session scope in jsp page
Hello, I have login form, where user provides username and password. Then click on submit, it will forward to validation.jsp. Where it will check in database make sure username and password exit. Now i can also retrive accountid of perticular user. I want to put that username and accountid in session scope. so all other pages can use that username and accountid. How can i do that. I'm new at this, so please provide me example too. Here is my code for login.jsp and validation.jsp..
Validation.jsp
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
//String name = request.getParameter( "username" );//
//session.setAttribute( "accountID",accountID );//
<%
String connURL = "jdbc:oracle:thin:@orca.csc.ncsu.edu:1521:ORCL";
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
conn = DriverManager.getConnection(connURL, "vapatel","pjdas");
stmt = conn.createStatement();
String user=request.getParameter("userName");
String password=request.getParameter("password");
boolean entrance=false;
stmt.excuteQuery("SELECT AccountID From Password WHERE USERNAME='"+user+"'");
rs = stmt.executeQuery("SELECT * FROM Password WHERE USERNAME='"+user+"' AND PASSWORD='"+password+"'");
while(rs.next()){
String dbUser = rs.getString("USERNAME");
String dbPassword= rs.getString("PASSWORD");
if ((user.equals(dbUser)) && (password.equals(dbPassword))){
entrance=true;
if (entrance==true){%>
<jsp:forward page="form.jsp"/>
<%}
else{%>
<jsp:forward page="login.jsp"/>
<%}
%>hi,
to put something into session scope in a jsp page use:
session.setAttribute("counter", Integer.toString(5));to retrieve is from a jsp page use:
String counterAttribute = (String)session.getAttribute("counter"); -
How to use session variable in JSP function & How to use both JSP Servlet
Hi,
I am new to JSP and servlets
Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
I try to keep the hard coding part out of JSP.
I dont how to use both JSP and Servlets in combination.
Hence If needed I write some functions in JSP.
but it gives me error
+<%! public void abc()+
+{+
int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
+}+
+%>+
Saying cannot find symbol session
1) So can u please tell how can I access session variables within JSP function
2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
Thanks
VenkatThe application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...
-
Hello, there:
It's a simple question.
I have a web app which has a login page, in its action class I create an object, user, and save it into session by using request.getSession(true).setAttribute("user", user).
In another action class, I want to use the info of user then I use request.getSession(true).getAttribute("user"); however, the returned object is NULL. Did I use session in a wrong way?
Thanks,
SwayDid I use session in a wrong way?No, you are using the session correctly. The code looks fine.
Check
- your spelling of the attribute names - obviously they must match
- the ids of the sessions you get both times: session.getId(). If they have different ids, then most probably the session is being lost somewhere.
There are a number of reasons to lose a session. If you close the browser, invalidate the session in code, or lose the cookie recording the id. This happens when you change from https to http, so a session can be lost that way.
The session is normally maintained by session cookies. If you close your browser you lose the cookie. If you have disabled cookies on your machine then it also might not work.
In cases such as that you should be using the method response.encodeURL() to maintain the session for you in any hyperlinks you produce. Struts normally handles that for you though if necessary.
Hope this helps,
evnafets
Maybe you are looking for
-
How do I keep iPhone Contacts from being visible in iMessage on MacBook?
I've disabled iMessage, but if you open it and try to type a message, you can easily see all the Contacts from my iPhone. How do I prevent that?
-
Duplicate invoices check criteria
Hello Gurus, I have a quick question, We have set the duplicate invoice checkbox in Vendor master records to check for duplicate invoices and the reference field in FB60 is a mandatory field, now as per the documentations, If a reference number was s
-
I cannot log-in to accounts on other websites e.g. eBay, Amazon, for starters. I get messages that I need to turn on cookies. They are on and I can see the cookies in the cookie file but the programs are not making the connections and not finding the
-
Having some troubles while playing Counter Strike: Source
Hi guys, Currently I'm using the Macbook Pro 13.3" 2nd version ( 2.9GHz, etc.). It's from Mid 2012 I believe. Anyway, I got it for passing my finals, so I've got it for less than a month now. And the thing is, I'm not really satisfied with the way it
-
How i can automatic start WLS_Forms WLS_Report & Web Logic Server?
How i can automatic start just like oracle (auto start /shtudown through windows)