Question about stateful webservice

hello
who can tell me how can i keep the session status in webservice,or where can i find such tutorial?
thanks

thanks i use jbuilder8+axis+weblogic7 to test the stateful webservice,my code as following: ________________________________________________________________________________________
1 the javabean that is publish as webservice:
package test;
import org.apache.axis.MessageContext;
import org.apache.axis.session.*;
public class TestService {
int count=0;
public TestService() { }
public int count(){
Session session=MessageContext.getCurrentContext().getSession();
Integer cnt;
if((cnt=(Integer)session.get("count"))!=null){
count=cnt.intValue();
int c=++count; session.set("count",new Integer(c));
return c;
2 my "deploy.wsdd" file:
<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:ns="http://test" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="TestService" provider="java:RPC">
<parameter name="className" value="test.TestService"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="Session"/>
</service>
</deployment> ________________________________________________________________________________________
3 my test client:
public class Client {
public Client() { }
public static void main(String[] args) {
try {
String endpoint ="http://localhost:7001/testservice/services/TestService";
Service service = new Service();
service.setMaintainSession(true);
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new Name "http://localhost:7001/testservice/services/TestService", "count"));
Integer ret1 = (Integer) call.invoke(new Object[] {});
System.out.println("************************" + ret1 +"*********************************");
Integer ret2 = (Integer) call.invoke(new Object[] {});
System.out.println("************************" + ret1 +"*********************************");
catch (Exception e) {
System.err.println(e.toString());
after i execute the "client.class",the output as:
************************1********************************* ************************1*********************************
as you can see the status can't be keep,what i want is:
************************1********************************* ************************2*********************************
help please,thanks again!

Similar Messages

  • General questions about using webservices and xml as opposed to an oracle driver

    Dear Experts; I have a general question which I have yet to test. Is it faster to use an ODBC driver to connect and retrieve data from an Oracle database than creating a .net webservices and using an XML to get the data for your web application. THank you

    At some point in the architecture stack some component will need to access the database in order to get the information from the database. That component will need to use an Oracle client driver.

  • Hi I have a question about shooting in Raw with my Canon EOS 6d. I'm in the process of learning photography and my goal was to start shooting in raw. I have Photoshop CS5. When I tried to edit my images in raw I received an error message stating, "The pho

    Hi I have a question about shooting in Raw with my Canon EOS 6d.
    I'm in the process of learning photography and my goal was to start shooting in raw.
    I have Photoshop CS5. When I tried to edit my images in raw I received an error message stating, "The photoshop camera raw plug-in did not recognize the format. If these files are from a camera, you may need to update your camera raw plug in."
    In researching the issue I read that to edit in raw you need a camera model requirement of at least 7.3 which only works with CS6. My version of CS5 is 6.0.0.205. Being new to all this I see that my options are to upgrade to CS6 or convert by using DNG converter and paying a monthly fee. Two things I know nothing about and don't know which is would be more beneficial.
    I'd appreciate any advise on which route to go and how upgrade and what it may cost. THANKS in advance!
    Heather

    In researching the issue I read that to edit in raw you need a camera model requirement of at least 7.3 which only works with CS6.
    That is correct. Your camera was first supported by Camera Raw 7.3. Camera Raw 7.3 will not work with CS5. You need CS6 or CC.
    Being new to all this I see that my options are to upgrade to CS6 or convert by using DNG converter and paying a monthly fee. Two things I know nothing about and don't know which is would be more beneficial.
    I'd appreciate any advise on which route to go and how upgrade and what it may cost.
    It all depends on your preferred workflow and your budget.
    Using the DNG converter is free. There is no monthly fee. You use the converter to convert all Raw files from the EOS 6D to DNGs then edit the DNGs in CS5. That's an extra step every time - every photo. Some people don't like the extra step. Others don't mind.
    Camera raw, DNG | Adobe Photoshop CC
    Or you can upgrade to CS6 (non-Cloud) and pay the upgrade fee
    Creative Suite 6
    Or join the Cloud and pay the monthly fee
    Or join the Photoshop Photography Program (US9.99/month) and get PS CC+LR

  • Stateful webservice using topdownAssemble task.

    Hi,
    I have looked all over to find documentation on how to assemble a "stateful" webservice using the topdownAssemble task in Ant. It looks stateful webservice creation is supported using the bottom up approach but not the top-down approach. All the documentation I have found so far refer to the "assemble" task. Is my assumption true that topdownAssemble does NOT support stateful webservice creation?
    Thanks!

    Smok,
    Are you just trying to up your post count?
    My question is NOT about runtime support for stateful services. Nor is it about JDevelopers capabilities to support stateful service. I know that you can develop stateful services using JDeveloper and deploy them into OC4J/SOA Suite.
    My question is about an ANT task called "topdownAssemble" - thats the exact name of the task; and its ability to generate java code out of WSDL for **stateful** webservices.
    Get it now? By the way, I do consider this part of SOA development. So unless you tell me there is better forum for this question, don't be suggesting that it belongs elsewhere.
    Edited by: user645090 on Oct 7, 2008 11:21 AM

  • Question about Kurts comments discussing the seperation of AIA & CDP - Test Lab Guide: Deploying an AD CS Two-Tier PKI Hierarchy - Kurt L Hudson MSFT

    Question about the sentence in bold. What is the meaning behind this comment?
    How would you separate the role of the AIA and CDP from a CA subordinate server? I can see where I add a CES and CEP server which has those as well, but I don't completely understand his comment. Because in this second step, (http://technet.microsoft.com/en-us/library/tlg-key-based-renewal.aspx)
    he shows how to implement CES and CEP.
    This is from the guide located at: http://technet.microsoft.com/library/hh831348.aspx
    Step 3: Configure APP1 to distribute certificates and CRLs
    In the extensions of the root CA, it was stated that the CRL from the root CA would be available via http://www.contoso.com/pki. Currently, there is not a PKI virtual directory on APP1, so one must be created.
    In a production environment, you would typically separate the issuing CA role from the role of hosting the AIA and CDP.
    However, this lab combines both in order to reduce the number of resources needed to complete the lab.
    Thanks,
    James

    My concern is, they have a 2-3k base of xp systems, over this year they are migrating them to Windows 7. During this time they will also be upgrading hardware for the existing windows 7 machines. The turnover of certificates are going to be high, which
    from what I've read here, it worries me.
    http://blogs.technet.com/b/askds/archive/2009/06/24/implementing-an-ocsp-responder-part-i-introducing-ocsp.aspx
    The application then can go to those locations to download the CRL. There are, however, some potential issues with this scenario. CRLs over time can get rather large
    depending on the number of certificates issued and revoked. If CRLs grow to a large size, and many clients have to download CRLs, this can have a negative impact on network performance. More importantly, by
    default Windows clients will timeout after 15 seconds while trying to download a CRL. Additionally,
    CRLs have information about every currently valid certificate that has been revoked, which is an excessive amount of data given the fact that an application may only need the revocation status for a few certificates. So,
    aside from downloading the CRL, the application or the OS has to parse the CRL and find a match for the serial number of the certificate that has been revoked.
    With the above limitations, which mostly revolve around scalability, it is clear that there are some drawbacks to using CRLs. Hence, the introduction of Online Certificate
    Status Protocol (OCSP). OCSP reduces the overhead associated with CRLs. There are server/client components to OCSP: The OCSP responder, which is the server component, and the OCSP Client. The OCSP Responder accepts status
    requests from OCSP Clients. When the OCSP Responder receives the request from the client it then needs to determine the status of the certificate using the serial number presented by the client. First the OCSP Responder determines if it has any cached responses
    for the same request. If it does, it can then send that response to the client. If there is no cached response, the OCSP Responder then checks to see if it has the CRL issued by the CA cached locally on the OCSP. If it does, it can check the revocation status
    locally, and send a response to the client stating whether the certificate is valid or revoked. The response is signed by the OCSP Signing Certificate that is selected during installation. If the OCSP does not have the CRL cached locally, the OCSP Responder
    can retrieve the CRL from the CDP locations listed in the certificate. The OCSP Responder then can parse the CRL to determine the revocation status, and send the appropriate response to the client.

  • Few questions about iPhone 4S

    Hi,
    Recently I got an iPhone 4S, it is my first new phone in a long time, before this I had an old nokia, so I just have a few questions about it.
    I havve read a alot of horror stories about the 4S battery life, mine seems ok, here is what I would like to know
    1) How long should a healthy battery last?
    2) how long should it take to charge to 100% from 1 or 2%?
    On my daily commute I use listen it to music and sometimes user twiiter/facebook. I also get alerted of emails when they come in. So far it has just about lasted just about two days maybe before I had to recharge. Is this about right? As stated above I am coming from an old nokia, which is very dated now but the battery lasted almost a week before I had to charge, so having to charge my phone this often is new to me. My iPhone is really great and I just don't want any problems. I have turned off all extras that I don't need.
    BTW are the iPhone 4S battery issues a software or hardware issue?
    Thanks

    I attempted to read your post, but in amongst all the random, unrelated waffling, I couldn't actually find exactly what your iPhone related question for this "Using iPhone" forum was.
    Would you like to clarify? Concisely.

  • Question about document/literal web service

    Hello every body.
    I have some question about document/literal web service.
    I’ve been working with Axis before.
    Axis has four valid signatures for your message-style service methods:
    public Element [] method(Element [] bodies);
    public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
    public Document method(Document body);
    public void method(SOAPEnvelope req, SOAPEnvelope resp);
    The same I am trying to do with WebLogic API for webservices.
    But when I am trying to test web service (public Document method (Document body); )
    I have serialized exceptions for org.w3c.dom.Document.
    Do I have to write a custom class for org.w3c.dom.Document serialization?
    If yes can you give me some idea or example?
    The all idea behind this web service is. I have just one web service and mane classes for XML processing. Depends what xml document will be during runtime, web service will be using different class for xml processing. It works fine with Axis, but in case of WebLogic I have some problem.
    One more question… How I have to call this web service from java client?
    I have seen this example http://www.manojc.com/?sample31 ,
    but this web service looks like (Document helloDom()). I need to send Document.
    This example works for Dynamic Proxy, but does not work for static call.
    Any ideas?? Thank in advance.

    Hi,
    I am getting a similar issue. I created a Document-style/literal webservice and deployed on Weblogic 9.2 . Then I generated client stubs using clientgen. I get the following exception stack trace:
    java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SOAPException:
    failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on
    class=class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl TypeMapping=TYPEMAPPING SIZE=3
    ENTRY 1:
    class: java.lang.Object
    xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocumentResponse
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@1125127
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@18dfef8
    ENTRY 2:
    class: java.lang.Object
    xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocument
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@15e83f9
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@2a5330
    ENTRY 3:
    class: java.lang.Object
    xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@bb7465
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@d6c16c

  • Am I misunderstanding stateful webservice or doing something wrong?

    Hi there...
    I am trying to create a stateful webservice... this is what I did exactly in JDeveloper
    1: created the following class
    *public class test {*
    public int O;
    *public test() {*
    *public String getIt() {*
    O++;
    return String.valueOf(O);
    2: Created a webservice out of it exposing the getIt method. I made sure that it is a stateful webservice. I set its scope to be for the session, lasting for 3000 second.
    3: run the webservice
    4: connected to it from VB.NET using the wizard
    5: adding the following code in vb :
    Dim J As New ServiceReference1.MyWebService1Client
    J.Open() ' open the connection with the service
    For I = 1 To 100  ' execute the call 100 times
    MsgBox(J.getIt) ' call the method and display the result in a message box
    Next
    J.Close() ' close the connection
    what I was expecting is that the counter should return the the values 1,2,3,...
    however what I am getting is the value 1 all the time. This means that the object test is being destroyed and created again with each call.
    I am doing something wrong here for sure, what I want to do is that the object test is being created once , and it should last for the whole session so that I can get the values 1,2,3,4, .
    kindly if you know how what I am doing wrong let me know.
    thanks.

    Hi there...
    thank you so much for these links. I just modified the webservice to generate an application module and store it in the session of the user. When doing multiple calls I was able manage different transactions.
    for now I am not releasing the application module. The question is now if the session of the user is destroyed, will all the resources of the application module go back to the system? I assume so...
    thanks again for your help.
    yours
    mkaatr

  • Question about /usr/local/bin in Mavericks ...

    I just did a clean install of Mavericks on a 2010 MacPro. I understand Mavericks does not replicate this path (/usr/local/bin) when doing a clean install. Prior to this I was running 10.7.xx and I had a few compiled binaries installed in the bin folder. How do I address this? Can I simply recreate the path manually without risk?
    Thanks.
    -paul.

    etresoft The 905
    Re: Question about /usr/local/bin in Mavericks ... 
    Jan 15, 2014 9:30 AM (in response to Paul Figgiani)
    So why would you expect /usr/local/bin to be there? If you install custom, low-level software like this on one system, it will not get migrated to the new system.
    As I stated in my original post I did not expect it to be there. All I'm asking is how do I adreess the issue? Do I recreate it manually without any risk of screwing something up?

  • Have a few questions about iPad before I get one

    I have a few questions about getting an ipad before I committ to get one.
    I have about 24 gb of itunes purchases in my itunes library, I am thinking of getting the 64 gb ipad. However, after you purchase the 64 gb, it will not truly be 64 gb,
    1) how much actual storage space would I have on a 64 gb ipad accounting for the os? On my macbook now I have a 164 gb hard drive but only access to about 148 gb for example.
    2) Would I be able to store the 24 gb of itunes purchases in icloud? How would I do that? Would I keep needing to go into the Purchase History tab in the ITunes store and download the song when I want to listen to it? My concern with this is that the item will no longer be "available in the Itunes store" and I will lose access to my music I purchased? 
    I would like to ditch the laptop and just have the ipad as my computer but want to know about these questions I have first.
    3) Can ipad and iphone now be charged without needing a laptop? Per last year's June 2011 conference when Lion and ICloud were announced, it was stated in Fall 2011 with iOS5 that people could get ipads and iphones and charge them without needing a laptop for syncing?

    1. About 57 on mine
    2. Subscribe to iTunes Match at a cost of about $25 per year - 25000 song limit I think
    http://www.apple.com/icloud/features/
    3. The iPad comes with a power adapter that plugs into a wall socket and that is the recommended way to charge it anyway. - not by using a computer
    http://www.apple.com/batteries/ipad.html
    You do not absolutely need a computer in order to use an iPad but you have to do more research to figure out if it will fit your needs that way.

  • Questions about Adobe Interactive Forms

    Hi everybody,
    I have some questions about Adobe Interactive Forms with CRM 2007.
    I can create AIFs with the Template Designer via the WebUI. These templates appear e.g. for the account in the selection PopUp "Create from template". But these templates are not interactive at all, just the BP-information is displayed.
    Is the template-function only a static way to create a static PDF from the BP-information? Or is there a way to have the BP-information loaded to the PDF but still interactive input to communicate via a webservice?
    Thanks a lot for answers.
    Regards,
    Ben.

    My really modify is :
    CLASS: CL_CRM_WFD_ASSIGNMENT_FOLLOWUP
    METHOD: GET_ATTACHMENT
    ORIGINAL CODE:
    cl_crm_oi_ads=>call_ads(
            EXPORTING
              iv_xml_string      = lv_ws_data
              iv_xdp_string      = lv_template_data
              iv_returntype      = lv_doc_type      "cl_crm_oi_ads=>gc_doc_type_pdf
            IMPORTING
              ev_result_document = lv_pdf_xstring
    NEW CODE
    cl_crm_oi_ads=>call_ads(
            EXPORTING
              iv_xml_string      = lv_ws_data
              iv_xdp_string      = lv_template_data
    *{   INSERT         CRDK900138                                        1
    * Modify for correct Interactive Form
              iv_fillable        = 'X'
    *}   INSERT
              iv_returntype      = lv_doc_type      "cl_crm_oi_ads=>gc_doc_type_pdf
            IMPORTING
              ev_result_document = lv_pdf_xstring

  • Hi Everyone Im New, Got Question About Upgrading MSI GT60 0ND With SSD

    Hi Everyone I'm New, Got Question About Upgrading MSI GT60 0ND With SSD.
     :welcome:So As I've stated I'm new here, or at least got a new MSI notebook.
    Ive got the new MSI gt60 0ND with 750GB HD and 675 Ge-Force GTX , anyways to the bottom line.
    I would like to Upgrade my computer with SSD that I bought and install the win8 on it, in order to speed things up, but I have encountered a few problems..
    1. there is no sticker on the back of the computer that gives information about the serial number of my windows 8...
    2. lets say in some magical way I could get the serial number out, can I use it to reinstall ? because Ive heard that you cannot use this CD key anyways unless you got a special win8 installation CD key from MSI because its MSI branded windows 8.
    am I screwed    ? ?? ? I thought it is possible to upgrade with SSD but it seems like MSI made it very hard, I do not understand why they even putted the warranty void sticker on the expansion bay's .... WEIRD..
    Please help !! Thanks in advance,
    David

    Quote from: dudiz10 on 10-January-13, 19:20:54
    Hi Everyone I'm New, Got Question About Upgrading MSI GT60 0ND With SSD.
     :welcome:So As I've stated I'm new here, or at least got a new MSI notebook.
    Ive got the new MSI gt60 0ND with 750GB HD and 675 Ge-Force GTX , anyways to the bottom line.
    I would like to Upgrade my computer with SSD that I bought and install the win8 on it, in order to speed things up, but I have encountered a few problems..
    1. there is no sticker on the back of the computer that gives information about the serial number of my windows 8...
    2. lets say in some magical way I could get the serial number out, can I use it to reinstall ? because Ive heard that you cannot use this CD key anyways unless you got a special win8 installation CD key from MSI because its MSI branded windows 8.
    am I screwed    ? ?? ? I thought it is possible to upgrade with SSD but it seems like MSI made it very hard, I do not understand why they even putted the warranty void sticker on the expansion bay's .... WEIRD..
    Please help !! Thanks in advance,
    David
    I think serial key of windows is in your bios which you cannot See however it should be automatically activates windows

  • Questions about your new HP Products? HP Expert Day: January 14th, 2015

    Thank you for coming to Expert Day! The event has now concluded.
    To find out about future events, please visit this page.
    On behalf of the Experts, I would like to thank you for coming to the Forum to connect with us.  We hope you will return to the boards to share your experiences, both good and bad.
     We will be holding more of these Expert Days on different topics in the months to come.  We hope to see you then!
     If you still have questions to ask, feel free to post them on the Forum – we always have experts online to help you out.
    So, what is HP Expert Day?
    Expert Day is an online event when HP employees join our Support Forums to answer questions about your HP products. And it’s FREE.
    Ok, how do I get started?
    It’s easy. Come out to the HP Support Forums, post your question, and wait for a response! We’ll have experts online covering our Notebook boards, Desktop boards, Tablet boards, and Printer and all-in-one boards.
    We’ll also be covering the commercial products on the HP Enterprise Business Community. We’ll have experts online covering select boards on the Printing and Digital Imaging and Desktops and Workstations categories.
    What if I need more information?
    For more information and a complete schedule of previous events, check out this post on the forums.
    Is Expert Day an English-only event?
    No. This time we’ll have experts and volunteers online across the globe, answering questions on the English, Simplified Chinese, and Korean forums. Here’s the information:
    Enterprise Business Forum: January 14th 7:00am to 12:00pm and 6:00pm to 11:00pm Pacific Time
    Korean Forum: January 15th 10am to 6pm Korea Time
    Simplified Chinese Forum: January 15th 10am to 6pm China Time
    Looking forward to seeing you on January 14th!
    I am an HP employee.

    My HP, purchased in June 2012, died on Saturday.  I was working in recently installed Photoshop, walked away from my computer to answer the phone and when I came back the screen was blank.  When I turned it on, I got a Windows Error Recovery message.  The computer was locked and wouldn't let me move the arrow keys up or down and hitting f8 didn't do anything. 
    I'm not happy with HP.  Any suggestions?

  • Have questions about your Creative Cloud or Subscription Membership?

    You can find answers to several questions regarding membership to our subscription services.  Please see Membership troubleshooting | Creative Cloud - http://helpx.adobe.com/x-productkb/policy-pricing/membership-subscription-troubleshooting- creative-cloud.html for additional information.  You can find information on such topics as:
    I need help completeing my new purchase or upgrade.
    I want to change the credit card on my account.
    I have a question about my membership price or statement charges.
    I want to change my membership: upgrade, renew, or restart.
    I want to cancel my membership.
    How do I access my account information or change update notifications?

    Branching to new discussion.
    Christym16625842 you are welcome to utilize the process listed in Creative Cloud Help | Install, update, or uninstall apps to install and evaluate the applications included with a Creative Cloud Membership.  The software is fully supported on recent Mac computers.  You can find the system requirements for the Creative Cloud at System requirements | Creative Cloud.

  • Questions about using the Voice Memos app

    I'm currently an Android user, but will be getting an iPhone 6 soon. My most used app is the voice memos app on my Android phone. I have a couple questions about the iPhone's built-in voice memos app.
    -Am I able to transfer my voice memos from my Android phone to my iPhone, so my recordings from my Android app will show up in the iPhone's voice memos app?
    -When exporting voice memos from the iPhone to computer, are recordings in MP3 format? If not, what format are they in?
    -In your opinion, how is the recording quality of the voice memos app?

    You cannot import your Android voice memos to your iPhone's voice memo app.  You might be able to play the Android memos and have the iPhone pick up the audio and record it.
    Here is the writeup about sending voice memos from the iPhone to your computer (from the iPhone User Guide):
    App quality is excellent.

Maybe you are looking for