Maintain HTTP Session in Webservice

Hi,
I configured a Webservice as an External Resource, just for consume it.
It works OK for a single method invocation in this webservice, but I need to maintain a HTTP session between more than one invocation to this webservice. How I can configure a Webservice External resource to maintain HTTP session between methods invocations?

The option that you mentioned is just for WebServices that needs HTTP Authentication.
Is not my case.
http://twitpic.com/i2f3h
Image: !http://web7.twitpic.com/img/30345965-80ad8fb7ebd3282957694547d6e3cda0.4ab27651-full.gif!

Similar Messages

  • Maintain Http Session in a thick client

    hi ,
    Can anyone tell me how to maintain or recognise the session from a thick client. I am talking to the appserver by making the HttpUrl Connection object everytime, now i am making use of VLH and how do i recognise the httpsession object from the thick client for the second request.
    Thanks in advance
    Sane

    In order to do this you would need to have code to support cookies or URL re-writing as a brower does. This would include interacting with the HTTP headers. This is not a trival task to try on your own. You might want to look at the source for the catcus testing framework (it supports this type of interaction).
    http://jakarta.apache.org/cactus/

  • Maintaining an HTTP session in SOAP

    Is it possible to maintain an HTTP session when using RPC style SOAP services?
    If not, how do people maintain conversational state between a client and a SOAP
    server?

    All is not lost though!!! Apache's SOAP implementation supports Stateful session.
    Maybe u should take a look at it...
    "Kumar Mettu" <[email protected]> wrote:
    Naresh,
    BEA's webservices implementation is at Stateless Session Bean level .
    And
    hence you are never working at servlet/jsp level. So there is no way
    you can
    use HTTP Session.
    Also BEA's webservices doesn't support Header Element.
    Kumar.
    "Naresh Bhatia" <[email protected]> wrote in message
    news:3bc72918$[email protected]..
    Well, if that is the case, we could maintain state manually by "inventing"our
    own session objects. All we would have to do is to maintain a map atthe
    server
    end that maps a sessionId to a session. The sessionId would have tobe
    passed
    as a parameter to every method. (Yuck. Or can it be put into the soapheader somehow
    - so as to keep the method signatures clean?) Do you see any holeswith
    this approach?
    "Mullai Murugan" <[email protected]> wrote:
    It looks like maintaining state is not possible in the current release.
    The documentation
    says clearly that only stateless beans are supported.
    "Naresh Bhatia" <[email protected]> wrote:
    Is it possible to maintain an HTTP session when using RPC style SOAP
    services?
    If not, how do people maintain conversational state between a client
    and a SOAP
    server?

  • Maintain the HTTP session

    I am building a small J2ME application that opens a HTTP connection to the server. The application requires user authentication.
    But, each time I open a HTTP connection to the server, the server creates a new HTTP session.
    Is there any way to maintain the session between server calls?
    Thanks

    [ssljivic],
    Perhaps you may want to post parts of your code that is doing the HttpConnection calls before any of us on the forum can advise or share our experiences.
    Session management should be done by the webserver that your J2ME application is making HttpConnection to. The CLDC/MIDP APIs provides the RMS javax.microedition.rms package that offers a developer a way to persistently stored data on the device. Data from the RMS store can be compared with the data by the session manager on the webserver to identify the J2ME client and thus obtaining back the previous sessions' state, very much like the concepts of cookies in a normal HTTP browser.
    My 2 cents worth, HTH.
    ~Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Is it possible to debug a webservice (HTTP session)?

    Can I debug an HTTP session? That is, as soon as I call a webservice (which wraps a function module), I want ABAP to stop in the debugger when I have SAP Gui open (similar to what is possible with the JCo abap_debug parameter for RFC calls).
    I have been able to trace the HTTP session using se30. Also, in principle it shouldn't be too hard for the backend to detect whether there is a  SAP GUI running on the client that originated the HTTP request. But has this been implemented?
    -- Sebastian

    Yes it is. You will have to go into SE38 and under Utilities --> Settings, and in the Debugging TAB set the user that is calling the RFC and check the option "Session Breakpoint active Imed.". Then create an external breakpoint for that user in the RFC and it should stop there.

  • How to maintain HTTP Destinations for Adaptive WebService in Netweaver 7.1

    hi ,
      i  am working with adaptive webservices. i hv created HTTP Destinations for Webservices on server. In Netweaver 04s i used to write code as follows
    wdContext.currentNodeTest.modelObject()._setHTTPDestinationName("DESTINATION_NAME");
    just b4 executing modelObject.
    But in Netweaver 7.1 , no method _setHTTPDestinationName available for  wdContext.currentNodeTest.modelObject() . I want to change host  for wsdl , as my production and development servers are different. How can i use HTTP Destinations in Netweaver 7.1?

    Kavita,
    Are you creating adaptive webservice model, if so then you just need to import webservice model once in your code and when you deploy your application you must define two logical destinations in visual admin.
    DEFAULT_WS_METADATA_DEST
    DEFAULT_WS_EXECUTION_DEST
    How to define logical destinations, check out following link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    if you are running application in your development or production server just define these destinations and your application will run smoothly.
    Regards,
    Jawed Ali

  • Closing ejb based webservice created http sessions

    I have few ejb based web services deployed on netweaver application server 7.0.As per my understanding nw deploys a web service as a web application which means its gonna get hosted by a web container.Now as this is a web app when an external system makes a call to this service a httpsession is opened up .I would like to monitor these httpsessions which get opened up on receving requests for these services from different clients.I went to web container option inside sap mmc but no luck.There is one option called currenthttpsessions but this always remains greyed out.Also i want to make sure that this http session should get closed once that request is processed.I doubt this is not happening right now on the setup which i have.

    I am also having the same problem... trying to revive this thread? any solutions out there?

  • 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 lot

    Did 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

  • HTTP Session caching possible using WL7 JAX-RPC ?

    We're using WL7, and using the JAX-RPC API to access external webservices.
    Basically, we create the appropriate 'stubs' from the target WSDL using
    clientgen. Then we invoke the target method. Code looks something like this:
    Client_Impl client = new Client_Impl; // implementation of target
    ClientPort_Stub stub = client.getClientPort();
    stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, url)
    stub.invoke(args);
    Now, when is the actual endpoint URL being created ? Is it when the invoke()
    method is called ?
    It cannot be during the constructor since I pass the target URL after that ...
    My problem is that I have to call the 'invoke' method quite frequently, and hence
    would like the HTTP session to be reused, rather than recreated each time. Right
    now,
    I construct the stub each time I have to call the target method, and I'm wondering
    if
    I just cache the stub and keep calling the target method each time, will the underlying
    HTTP session be reused ? Any ideas ?
    Currently, if I do netstat on my Sun Solaris box (where this runs), I see the
    TCP
    connection being recreated during each invocation ...
    -john

    Hi John,
    You can do multiple invokes on the same stub. There is no
    need to create a new one for each invoke.
    WLS 7.0 use HTTP 1.0 with keep alive. If the server respects
    HTTP keep alive, then WLS will not create a new connection.
    HTHs,
    -manoj
    "john" <[email protected]> wrote in message news:[email protected]..
    >
    We're using WL7, and using the JAX-RPC API to access external webservices.
    Basically, we create the appropriate 'stubs' from the target WSDL using
    clientgen. Then we invoke the target method. Code looks something likethis:
    >
    Client_Impl client = new Client_Impl; // implementation of target
    ClientPort_Stub stub = client.getClientPort();
    stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, url)
    stub.invoke(args);
    Now, when is the actual endpoint URL being created ? Is it when theinvoke()
    method is called ?
    It cannot be during the constructor since I pass the target URL after that...
    My problem is that I have to call the 'invoke' method quite frequently,and hence
    would like the HTTP session to be reused, rather than recreated each time.Right
    now,
    I construct the stub each time I have to call the target method, and I'mwondering
    if
    I just cache the stub and keep calling the target method each time, willthe underlying
    HTTP session be reused ? Any ideas ?
    Currently, if I do netstat on my Sun Solaris box (where this runs), I seethe
    TCP
    connection being recreated during each invocation ...
    -john

  • How to view and change HTTP Session Size

    For the SAP Web AS Java, how can i check what size is set for the http session object?
    Thanks,
    Haris

    Hey Vincert,
    Is that parameter maintained on the ABAP stack or the Java stack.
    Specifically i would like to know if the HTTP session object size is viewable/modifiable for Portal (hence standalone Java stack). I believe Portal does not have ICM.
    Thanks,
    Haris

  • Maintaining different sessions in browser tabs in ADF 11g application

    I have a simple ADF 11g application which uses ADF BC 11g.
    I want to maintain different sessions between the tabs in the same browser.
    Currently it is messing up with session variables. Please reply to me ASAP.
    Thanks,
    Bobby
    Edited by: 866444 on Jun 16, 2011 11:35 AM

    Assuming you are having problems because of the usage of JSF Session scope beans, then the answer is to use pageFlowScope for that set of data - then it is not shared between tabs.

  • How to close a HTTP session when a user closes the window

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template and this was implimented on the Menu page, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly.
    If user navigates to the other pages from the main page... then the logoff function was not implimented in the other pages. So many of the users are closing the windows directly. Eevn if we impliment logoff in all the subpages, As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    Regards,
    Tony

    Hi,
    And also take a look on the Genral property of the web template. We solved this problem by changing only this property (no extra things).
    <b>Property:                            Value</b>
    Automatic Session Management:           Active
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • Bw web report plugin http session hangs at the server side

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly. But As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    By the way, we actived our BEX service at the SICF.
    Thanks for help!
    JA

    Hi
    If you want to avoid a blank page with logoff button, add opener=0
    <a href="<SAP_BW_URL CMD='LOG_OFF' ~command='logoff'
    >" onClick="javascript:window.close(opener=0);">Log off</a>
    If you want to close the session via X, use this code:
    create a sapscript function
    function closeSession()
    logoff()
    window.unload=CloseSession()
    However, the Plugin HTTP session isn't killed.
    Regards

  • In-memory replication of http session is not working in BEA7 cluster

              Hi everyone,
              I have 3 managed servers in Bea7.0 SP4 in a cluster. The client requests are sent
              through apache web server. I have given cluster address as URL in httpd.conf of
              apache server which sends the client requests for dynamic pages such as JSPs and
              servlets to the weblogic cluster.
              Load balancing is working fine. I ensured this from the log files of all the 3
              servers. All the 3 servers are getting different client requests and thus load
              balancing is working.
              Now, I wanted to achieve Fail-over. I do not think that i should use proxy plug-in
              for this. I feel the cluster itself will handle fail-over provided i make the
              http session as memory replicated.
              I updated the weblogic.xml with the following entry :
              <session-descriptor>
              <param-name>PersistentStoreType</param-name>
              <param-value>replicated</param-value>
              </session-param>
              </session-descriptor>
              I guess this is sufficient to make the http session as cluster aware.
              But when I shutdown server1, the user connected to server1 will be kicked out
              of the session and come to login page through server2 or server3 which are running
              fine.
              Could anyone help me to achieve http session as cluster aware. Does it indicate
              that I have to go for WLS proxy – HttpClusterServlet to achieve fail over for
              http session ?
              BTW, for your info, i am using setAttribute() and getAttribute() while manipulating
              the session.
              thanks in advance.
              

              Hi Ryan,
              Thanks for ur valuable input.
              I can see failover working.
              But, I can not continue with the same session in my application.
              I printed session Ids before and after failover, I found both are different.
              I guess session replication is a responsibility of weblogic/apache plugin.
              If not please let me know which all settings I should do to make failover working?
              Thanks again.
              Plad
              "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >Plad,
              >
              >Are you trying to gracefully shut down the server? If you are then the
              >problem that you say you can't identify is simply the server's default
              >behavior which is to wait for all non-replicated sessions to be dropped
              >or
              >timed out before killing the process. Try forcing the shutdown: kill
              >-9 the
              >PID or CTRL-C if you started the server from the command line. You can
              >also
              >check the ``Ignore Sessions During Shutdown" checkbox under the server's
              >control tab in the admin console, this should allow you to shut down
              >gracefully without waiting for session timeout. BTW your sequence is
              >off
              >in #5 below, the replication doesn't occur upon failure, the replication
              >has
              >already happened once you created the session object on the first server,
              >I
              >think maybe you're confusing replication with failover.
              >
              >~RU
              >
              >"Plad" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi,
              >> I have 2 managed servers in a cluster.
              >>
              >> 1. I have got a DNS name configured which maps to these 2 managed server's
              >IP
              >> addresses.
              >> 2. I can browse my site using this DNS name.
              >> In HTTPD.conf I have :
              >>
              >> ServerName dev.a.b.net
              >>
              >> <IfModule mod_weblogic.c>
              >> WebLogicCluster 10.1.38.232:7023,10.1.34.51:7023
              >> MatchExpression *.*
              >> </IfModule>
              >>
              >> LoadModule weblogic_module modules/mod_wl_20.so
              >>
              >> 3. I have adeded session descriptor in weblogic.xml , also enabled
              >proxy
              >plugin
              >> in weblogic console.
              >>
              >> 4. I tested accessing my application using DNS url after shutting down
              >alternatively
              >> each manaed server. I can access application.
              >>
              >> 5. Now, problem comes when I access a managed server1 , keeping server2
              >down.
              >> I am able to access my application.
              >> Now, I start the server2.
              >> (Here I am supposing that replication should occur)
              >> Then I am shutting down server1.
              >> But, this time the server log shows me following:
              >>
              >>
              >> 9:58:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 2 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >> 10:00:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 4 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >>
              >> I am unable to make out where the problem is?
              >> Can it be a problem of Liecense? Is there any specialcluster liecense
              >for
              >weblogic8?
              >>
              >> Hoping to get replies.
              >> Thanx.
              >> Plad
              >>
              >> "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >> >See my reply to your first post, but I've also added a few comments
              >here.
              >> >
              >> >"jyothi" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> I guess someone from bea support team only can answer both your
              >question
              >> >and mine.
              >> >> As per my knowledge, we do not need to do any setup at Apache
              >side
              >> >regarding
              >> >> cluster other than mentioning cluster address as URL while
              >contacting
              >> >WLS
              >> >> from apache.
              >> >>
              >> >> I hope someone from Bea, will help us. I do not think that we
              >> >go for
              >> >WLS
              >> >> proxy plug-in using HttpClusterServlet for making session replication.
              >> > I
              >> >strongly
              >> >> feel that the cluster itself be able to manage the fail-over of
              >> >http
              >> >sessions
              >> >> provided we put the entry "PersistentStoreType" in weblogic.xml
              >> >regarding
              >> >> the session replication.
              >> >>
              >> >
              >> >The cluster does handle the management of Sessions. The clustered
              >> >applications still create the Session objects and the cluster manages
              >> >them
              >> >as per your deployment descriptor settings (replicated, JDBC, File)
              >however
              >> >the proxy has to be aware of which server the client has an affinity
              >> >for
              >> >(only with replicated sessions) and it does that by reading a cookie
              >> >passed
              >> >back from the server that handled the initial request and created
              >the
              >> >primary session object. The proxy has a list of both the primary
              >and
              >> >secondary server locations from this cookie that it can use to failover
              >> >the
              >> >request if the primary server fails. Clusters _DO NOT_ failover nor
              >> >do they
              >> >load balance, that's the job of your proxy, whether you're using the
              >> >HTTPClusterServlet, WLS Plug-in or a more sophisticated hardware load
              >> >balancer like Big IPs F5
              >> >
              >> >> jyothi
              >> >>
              >> >
              >> >~RU
              >> >
              >> >
              >>
              >
              >
              

  • How to find the list of users loggin through HTTP session

    Hi All,
    we are using SRM 5.5 system with ITS. I am able to find the list of concurrent users from ABAP level using report "CCUEVAL" but how do I know the list of concurrent users logged in from HTTP session?.
    could you please let us know the SAP note number or any report?
    Thanks in advance,
    Mohan Karri

    Hi Uday,
    thank you very much for your prompt response.
    I need a report because by end of every month I would need the average peak http users list for the reporting month.
    or tell me how to find " how many users logged in through HTTP session in a day?"
    Thanks
    Mohan

Maybe you are looking for