How to keep alive a session in Web Services?

I have to do my project, that will be including some following features:
1. Login to Application through Web Services method. For example:
http://mydomain.com/web-services/Login?WSDL
2. After logging in, use mySms method to send message to Cellphone through Web Services! For example:
http://mydomain.com/web-services/mySms?WSDL
My questions are:
1. How can I keep alive the session after logging in the application in Web Services? In Web, I can use "Session".
2. If someone has not logged in the Application, he/she could not use mySms method for sending Sms. How can I do that?
3. I know, when I invoke a Web Services, one JavaBean has been called, and this bean is persistence with his own states. It means, if I set value to parameters of this bean, these values are persistence for invoked methods by other persons.
For example:
mySms bean has a private field "jid" inited with NULL value.
Person A invoked mySms.
Then, A set jid of mySms to value "A".
Person B invoked mySms. B got jid value. He receive the result value is "A".
The question is, how can I set mySms bean so that mySms bean is not persistence?
Thanks many!

Hi,
I can right away answer your FIRST Question.
Since WebServices are PURELY Based on SOAP which is in tern based on HTTP, they rely on a Stateless protocol.
I am sure you know that the HTTP is the STATELESS Protocol and so you can not maintain Session and so EACH Http REQUEST is considered as a SEPERATE REQUEST.
Now, still you want to maintain the Session in WebServices,
The simple answer is PASSING PARAMETERS.
Just Maintain your Session on Client (If you are using JSPs or Servlets to CAll WEBSERVICES then maintain Session through your HTTPSession) and each time you Invoke WebService PASS ON REQUIRED Parameters.
This Approach is Exactly like your URL REWriting OR your Parameters Passing through QUERY STRINGS.
I hope you got what I am saying!
Take care,
Himanshu/

Similar Messages

  • How to keep alive a session with a timeout

    my session have a timeout of 20 minutes (it's a system setting i cannot change)
    i run a program that generates a file excel that need 60 minutes to  end.
    i cannot run the program in background because OLE and creating excel is not supported
    is there a way to avoid my session time out?
    is there a way to make the sistem don't close my session while it's creating my file excel?
    thanks,
    Giacomo

    Giacomo,
    Try it.
    REPORT  zz_keep_alive.
    CLASS lcl_trigger DEFINITION.
      PUBLIC SECTION.
        METHODS: fim_timer FOR EVENT finished OF cl_gui_timer.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    CLASS lcl_trigger IMPLEMENTATION.
      METHOD fim_timer.
        cl_gui_cfw=>set_new_ok_code( new_code = 'ONLI' ). "ONLI = Executar
      ENDMETHOD.                    "fim_timer
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    DATA: r_timer   TYPE REF TO cl_gui_timer.
    DATA: r_trigger TYPE REF TO lcl_trigger.
    PARAMETERS: p_uzeit TYPE sy-uzeit.
    AT SELECTION-SCREEN OUTPUT.
      p_uzeit = sy-uzeit.
      CREATE OBJECT: r_timer, r_trigger.
      SET HANDLER r_trigger->fim_timer FOR r_timer.
      r_timer->interval = 60.
      r_timer->run( ).
    Hope it helps.
    Rgs
    Paulo Afonso Cordeiro

  • Keep alive a session between 2 BAPI calls

    Hi -
    I am calling several BAPIs to maintain data. I am calling from an outside system as I published the BAPIs as Web Services.
    I would like that the session between 2 BAPI calls is kept, so I don't miss some session info between call #1 and call #2.
    Anyone knows a way of keeping alive a session between 2 BAPI calls?
    Thanks !

    Try this..
    <b>ARFC with Resource Management (Parallel Remote Function Call)</b>
    CALL FUNCTION 'MYFUNC'
    STARTING NEW TASK 'T1'
    DESTINATION IN GROUP 'PRFC'
    EXPORTING ...
    TABLES ...
    EXCEPTIONS ...
    communication_failure = 100
    system_failure = 101
    resource_failure = 200.
    IF sy-subrc= 102.
    wait and retry...
    ENDIF.
    <b>Define ‘PRFC’via RZ12</b>
    Amandeep

  • Keep alive a session in CRM

    Dear CRM folks -
    I am calling CRM using BAPIs. The BAPIs are published as Web Services.
    I would like that the session between 2 BAPI calls is maintained in an optimized way so I don't make specific calls to the DB to store my session info.
    Anyone knows a way of keeping alive a session in the CRM between 2 BAPI calls?
    Thanks !

    BAPIs are just basically function modules.  Two function modules which are in the same function group are able to share information while the session is open.
    If your two BAPIs are not in the same function group(you didn't mention the names or I could have checked) then you can create a wrapper function module which has it's own variables to store the information.  Unfortunately once the RFC session/ICM Web Session is closed then you'll lose that in-memory information.
    I assume that you're making the two BAPI calls at different times which is why you're having this problem.  Like one to get user information and then one more to get some other detailed info once the user inputs something.
    Without knowing much about what you are really trying to do, my quick idea is to create a Stateful BSP in CRM which accepts all your requests.  The BSP can simply call the BAPIs(eliminate the need for the web service - unless you have some reason you need it) and then between the first and second BAPI call, the BSP will keep the state of the BAPI results in-memory.
    If you give more info, might be easier to answer your question.

  • How to Keep Alive a specific HFM application

    My PRD landscape has 2-3 applications. Whenever any application loads for the first time in the memory, it takes quite some time before it is loaded. Once the application is loaded, the response times are pretty quick and acceptable.
    During specific parts of the day / month, a specific application becomes active. During this time, other applications may or may not be used, but one specific application is definitely used. I want to keep this application's cubes loaded in the RAM, so that response times are quick, whenever the user needs it - whether for the first time or otherwise.
    How to keep alive a specific application's cubes alive and loaded in RAM? I am not looking for general solution like setting the "FM Service" to Automatic (currently it is set Manual) - setting this to Automatic, will affect all applications. However, I am looking for a specific application at a specific period of time.
    I am ok with a custom solution if required. Let me know, what are my options.

    I think you are looking for an inappropriate solution to your problem. Most HFM applications take a few seconds to start up. If your application takes such a long time to start up you really need to examine the root cause. Start by removing the Sub NoInput and Sub Input routines in your rules to see if this is the reason the application takes so long to start.
    If the removal of those routines does not significantly change the startup time, look through the event logs for possible causes. It is possible you have a connection problem with the Oracle database for example, or you have an environment configuration problem where the HFM application servers have a very slow connection to the database server, or possibly the database server performs poorly.
    I strongly suggest you investigate these root casues first before trying to make HFM behave in a non-standard way. Certainly you can start the HFM Management Service, which will start all of your HFM applications and keep them all up and running. This approach does not allow the applications to shut down on their own though. Only use this if you have exchausted your investigations (as I suggsted above).
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Sessions in Web Services

    I'm trying to manage sessions in Web Service. Can sombody tell me how to do this

    a bit unspecific, anyway, here a solution for a plain JAX-RPC implementation
    in a JAX-RPC client, use
    ((javax.xml.rpc.Stub)myProxy)._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);
    to let the client maintain session state
    in JAX-RPC server, implement ServiceLifecycle and call getHttpSession() on the servlet endpoint context
    Merten

  • How to retrieve the HttpSession from Axis Web Service

    hello,
    How can I get the HttpSession in Web Service ???
    Eric

    Hi,
    I have generated the java classes from a WSDL using WSDL2Java using the following command line options.
    java -classpath .;%AXISCLASSPATH%;%CLASSPATH% org.apache.axis.wsdl.WSDL2Java -s -S true -d Session -Nhttp://localhost:
    7001/axis=samples.grapha -a samples\grapha\grapha.wsdl
    I need to retrieve HTTPSession in the generated GraphASOAPBindingImpl class. Can you help me?
    Thanks,
    vc

  • How can I create a query with web service data control?

    I need to create a query with web service data control, in WSDL, it's query operation, there is a parameter message with the possible query criteria and a return message contains the results. I googled, but cannot find anything on the query with web service. I cannot find a "Named Criteria" in web service data control like normal data control. In Shay's blog, I saw the topics on update with web service data control. How can I create a query with web service data control? Thanks.

    Hi,
    This might help
    *054.     Search form using ADF WS Data Control and Complex input types*
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • How can I authenticate and authorize with Web Service on ESB ?

    Hello,
    I want to authenticate and authorize client with Web Service published
    by HTTP/SOAP BC.
    Simply if it is an Web Service as J2EE application, I will use
    Basic Authentication with JAX-RPC and Realm.
    But I think that Web Service published by HTTP/SOAP BC is not belong
    to J2EE Application. Threre is no place to describe security role mapping
    (like web.xml).
    JBI 1.0 the section "5.5.1.1.3 Normalized Message Properties" comments
    JAAS Subject is given in the NM Properties. Really in this package
    com.sun.jbi.internal.security.*
    implements JAAS autentication and authorization (at JaasAuthenticator).
    But I can't see how to configure my Service to use this.
    How can I authenticate and authorize with Web Service on ESB ?
    I referred to the resources.
    Mutual Authentication for Web Services: A Live Example
    http://developers.sun.com/prodtech/appserver/reference/techart/mutual_auth.html
    XML and Web Services Security
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security7.html
    JAAS Authentication Tutorial
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
    Thanks,
    Takurou
    - environment ---------------------------------------------
    OpenESB : Project Open ESB Starter Kit
    AppServer : Sun Java Systems Application Server 9.0 PE
    OS : Windows XP
    I don't assume to use SSL (if It's necessary I will try).
    User information is stored in a LDAP Server.
    -----------------------------------------------------------

    Hello,
    I read this resource.
    SecurityDesign
    http://www.glassfishwiki.org/jbiwiki/Wiki.jsp?page=SecurityDesign
    Then I think [non-ssl and ssl/tls and so on] securing by basic authentication is ongoing feature at this time.
    But I can't see well why this page comments 'HTTP over SSL, TLS'.
    HTTP/SOAP Binding Component Overview
    http://download.java.net/general/open-esb/docs/jbi-components/httpsoap-bc.html
    Does BC support only "SSL server authentication" ?
    Doesn't BC support "SSL client authentication" by username/password ?
    Thanks,
    Takurou

  • Handling sessions in Web Services

    Hi all,
    I am quite new to Web Services. I am facing problems in handling sessions in Web Services.
    I am using Apache Axis as SOAP engine. I have different Web Services like AuthenticationService, DataService and ReportService.
    The problem is in handling authentication. I need to authenticate only once using AuthenticationService and maintain the
    session for rest of the calls to different web services like DataService, ReportService.
    Has anyone faced similar situation?
    Please help.
    Thanks,
    Prashanth

    a bit unspecific, anyway, here a solution for a plain JAX-RPC implementation
    in a JAX-RPC client, use
    ((javax.xml.rpc.Stub)myProxy)._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);
    to let the client maintain session state
    in JAX-RPC server, implement ServiceLifecycle and call getHttpSession() on the servlet endpoint context
    Merten

  • How to expose ODI scenario as a web service

    How to expose ODI scenario as a web service?
    Can we generate wsdl of ODI scenario if yes then how?

    SSZ wrote:
    Yes.But couldn't understand where to start.In that case use the magic wand.
    Ask specific questions, Many of your posts have an underlying tone , that of you not having read any documentation of bothered to research anything yourself I havent got the time to tell you how if you havent got the time to tell me what you have read , what you grasp and what you do not grasp.

  • How to access HTTP Header from within Web service?

    Hello,
    Is there a way to access HTTP header variables like CONTENT_TYPE, CONTENT_LENGTH from within Web Logic web service.
    I was able to get the HTTP header variable from within Apache AXIS services by calling context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
    How can i do this from weblogic web service.
    I need this to verify the client SSL_CLIENT_DN
    In access I can get the header as follows.
    HttpServletRequest req = (HttpServletRequest) context
              .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
    clientID = req.getHeader("SSL_CLIENT_S_DN_Email");
    Thanks
    --Arun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    hi
    the following link may helpful to you
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
    Regards
    Prasanna Yalam

  • How to integrate Microsoft and SAP using Web Services?

    Hi All
    How to integrate Microsoft and SAP using Web Services? If any one has document please send it to me. My id is [email protected]... Please
    Help me
    Best Regards
    Ravi Shankar

    Hi Ravi,
    This is for Customizing Email and Other Web Services.
    Create addresses
    The address maintenance of R/3 users is carried out either via the R/3 User Maintenance (Transaction SU01) or the Private office settings (Transaction SO12):
    Address --> Other communication...
    Selection of the required communication service.
    Enter address.
    Copy or save.
    b) Configuration of SAPconnect (Transaction SCOT)
    Set communication method
    4.0 + 4.5: Goto --> Customizing --> Communication methods
    as of 4.6: Settings --> Communication methods
    Set the method of the required communication service to the value 'SAPCONNECT' and save the setting.
    Customized the same for Internet mailing.
    C) If you want to Transfer Table Structure Values from SAP R/3 to Web Services then
           1. Create BAPI and Transfer whichever things you want.(Note: The Structure
               of BAPI should be similar to Web Structure (Datatypes).
           2. Create a BDC and Schedule it in the Background.
    Hope it helps you, Awaiting for the Reward Points.
    Thanks
    Subrato Chowdhury

  • HFM Web Sever Configuration--Keep Alive and Session Time Out Optimal Config

    We recently implemented an HFM 9.3.1 environment. We are using Windows 2003 Enterprise SP2 servers with IIS6. We have two HFM Web servers connecting to an application cluster with two application servers in the cluster. We were getting some errors when trying to unlock HFM cells in Workspace, but we were able to perform the functions fine on the application using the WIN32 client.
    I opened a ticket with support and they recommended modifying the subcontext.properties file located in %HYPERION_HOME%\deployments\WebLogic9\servers\Workspace\webapps\workspace\conf. They recommended changing the following settings:
    #KeepAliveInterval=30
    #SessionTimeout=60
    From what I understand, these settings are for the communication between the HFM Web Servers and the application cluster servers. I'm wondering how changing these settings may affect our environment. Are there negative effects and/or trade-offs for changing these settings? Is there a recommended threshold or maximum value?

    Hi Dinesh,
    This cannot be achieved without development enhancements to some standard SAP framework component, to introduce a "keep-alive" concept. If you are using a CMS for CTI or email integration, you need to ensure it supports keeping the communications session alive also.
    Sincerely,
    Glenn
    Glenn Abel
    Covington Creative
    www.covingtoncreative.com

  • How to keep track of sessions ?

    Hi,
    Recently at an interview I was asked that how do you keep track of n number of user sessions in JSP ?
    Can somebody help me with the answer that I should have given ?
    Thanks.

    You would have to extend the session handling system using the various listeners for Session events. Check out the package javax.servlet.http.
    SessionListener: responds to sessionCreated/sessionDestroyed - so you can keep track of sessions as they come/go.
    You then also keep in memory (either a singleton, or in application scope) a permanent map of all the sessions. That way you knoe exactly how many sessions there are, and can get at the data for any or all of them.
    (Note this is a potential security risk, which is why the functionality was removed from the servlet framework)
    Another approach would be to use a SessionBindingListener, on a user object. This listener fires events when the object is bound/removed from a session
    Assuming it is an Intranet, where a user logs in, and after login, a "User" object is placed into session. This will let the user object fire an event whenever it is bound - ie when you log in. Thus you can keep track of who is logged in, and if they are logged in multiple times.
    Hope this helps some,
    evnafets

Maybe you are looking for

  • Failing to create new SQL farm with FSconfig.exe for ADFS federation Services on an Azure SQL

    I'm building ADFS in Azure. My plan is to use the Azure SQL. The problem is that FSconfig seams not to work with Azure SQL. Here's what i did untill now: - I followed the documentation and created a new login and user (adfslogin, adfsuser) in a new "

  • Mtl_system_items_b tables web_status and orderable_on_web_flag

    Hi, I have updated the web_status='UNPUBLISHED' and orderable_on_web_flag='N' columns of mtl_system_items_b table but still I am able to search for the item in iStore 11.5.10. Can you please let me know what needs to be done so that the items are not

  • Building netui:tree from XML

              Hi,           I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for data in           an XML file).           The BEA docs say that we have to assign the TreeNode object to the 'tree' attribute           in the netui:tree ta

  • System Status update

    I am tyring to change user status to "X" in an action expecting system should change system status to "Rel" and "Activate" the config is if we set to "X"  system status will be "Rel" and once "Rel" it should set to Activate. This is success sometimes

  • Firefox freezes when attempting to interact with a page.

    Whenever I start up Firefox (4beta7 portable) it acts normally. I can visit web sites without a problem. However as soon as I click on any page (including about: pages) it freezes forever. I have to use Windows to manually close it with the program i