Return-Path: Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 77967 invoked by uid 500); 10 Apr 2003 01:34:33 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 77938 invoked from network); 10 Apr 2003 01:34:33 -0000 Message-ID: From: "Savantraj, Chennamakal Subramanian" To: "'axis-dev@ws.apache.org'" Subject: Question on scope="session" Date: Thu, 10 Apr 2003 09:34:39 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Dear All, I am new to Axis and trying out its options one by one. I am trying to deploy a simple web service with scope=session. This service have 3 methods. 1. Will set the Name 2. Will set the Address 3. Will return Name & Address What I am expecting is ,the web service to remember the values set during each call from the same client. The execution of the client program is as below. 1. Call the method to set the name 2. Call the method to set the address 3. Call the method which will return the name & address My expectation here is to get the value whichever I set from my call 1 & 2. But call 3 will just retun empty. Am I trying the wrong thing? Is there any way to do this way of programming with axis? Pls help.. Here is the source codes =================================== Service: ScopeTest.java =================================== package wsaxis; public class ScopeTest { String myName=""; String myAddress=""; public ScopeTest() { } public void setMyName(String mName) { myName=mName; } public void setMyAddress(String mAddress) { myAddress=mAddress; } public String display() { return "My Name is "+myName+" and my Address is "+myAddress; } } =================================== WSDD: Deploy.wsdd =================================== =================================== WSDD: Client =================================== package wsaxis; import javax.xml.namespace.QName; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import java.util.*; public class TestClient { public TestClient() { } public static void main(String args[]) { try { String endpoint = "http://localhost:1000/axis/services/ScopeTest"; Service service = new Service(); Call call = (Call)service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(new QName("ScopeTest", "setMyName")); call.invoke(new Object[] { "XXXYYY" }); call.setOperationName(new QName("ScopeTest", "setMyAddress")); call.invoke(new Object[] { "AAABBB" }); call.setOperationName(new QName("ScopeTest", "display")); String abc=(String)call.invoke(new Object[] { }); System.out.println(abc); } catch(Exception e) { System.err.println(e.toString()); } } } Savantraj C.S Sony Information Systems Solutions (AP) (A division company of Sony Electronics (S) Pte. Ltd.) 2 International Business Park #01-10 Tower One The Strategy Singapore 609930 Tel: (65) 6544 8000 DID:(65) 6544 7414 Fax : (65) 6544 7007 E-mail : Savant.Rcs@ap.sony.com ------------------------------------------------------------------- This email is confidential and intended only for the use of the individual or entity named above and may contain information that is privileged. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone and destroy the original message. Thank you. - This mail is sent via Sony Asia Pacific Mail Gateway. -------------------------------------------------------------------