Mailing List
Home
Forum Home
Maven - Project building tool
Axis - Java SOAP implementation
Cocoon - MVC web framework based on XML/XSL
Lucene - Full-featured text search engine APIs
Log4J - A log library
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database error code ...
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Servlet File Download dialog problem (IE6,Adobe 6 0)
Proposal: Adding jar manifest classpath in jar and war plugins
Unsupported major minor version 48 0 problem while running the an
   telope task
java security AccessControlException: access denied (java io FilePermission
axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
jsp data into Excel
Classpath problem
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Running junit tests fails
XDoclet, Struts and Maven: Where to start? SOLUTION
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
AXIS: tomcat timeout ?
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
How does Stub.setMaintainSession(boolean) work

How does Stub.setMaintainSession(boolean) work

2005-06-01       - By Bala Ramakrishnan (balar)

 Back
I have this piece of code that establishes the Soap handle used to make
subsequent API calls.

private Config createConfigHandle() {
     try {
       URL sURL = new URL(hprotocol + "://" + wlse_ip + ":" + httpport
+ "/services/Config");
       m_logger.info("service URL is: " + sURL) ;

       ConfigService service = new ConfigServiceLocator();

       Config config = service.getConfig(sURL) ;
       ConfigSoapBindingStub stub = (ConfigSoapBindingStub)config;
       stub.setMaintainSession(true);
       stub.setUsername(username);
       stub.setPassword(password);
       return config;
     }

I use the handle to invoke all the methods exposed in the "Config"
interface.

If I change the call:
stub.setMaintainSession(true);

to

stub.setMaintainSession(false);

What is the impact? Can I make multiple calls using the same handle?
does Soap automatically create new session for each API call? or do  I
have to invoke setUserName(), and setPassword() before every API
invocation if I call stub.setMaintainSession(false)?



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=823331119-01062005>I have this piece
of
code that establishes the Soap handle used to make subsequent API
calls.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=823331119-01062005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=823331119-01062005>private
Config createConfigHandle() {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; URL sURL = new URL(hprotocol +
"://" + wlse_ip + ":" + httpport +
"/services/Config");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
m_logger.info("service URL is: " + sURL) ;</SPAN></FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ConfigService service = new ConfigServiceLocator();</SPAN></FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Config
config = service.getConfig(sURL) ;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;
ConfigSoapBindingStub stub =
(ConfigSoapBindingStub)config;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stub.setMaintainSession(true);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stub.setUsername(username);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stub.setPassword(password);</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return
config;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=823331119-01062005>I use the
handle to invoke all the methods exposed in the "Config"
interface.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=823331119-01062005>If I change
the call:</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005>stub.setMaintainSession(true);<BR></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005>to</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005>stub.setMaintainSession(false);</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=823331119-01062005><FONT face="Courier New">What
is the impact? Can I make multiple calls using the same handle? does Soap
automatically create new session for each API call? or do&nbsp; I have to
invoke
setUserName(), and setPassword() before every API invocation if I call
stub.setMaintainSession(false)?</FONT></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" size=2><SPAN
class=823331119-01062005></SPAN></FONT><FONT size=2><SPAN
class=823331119-01062005><FONT
face="Courier New"><BR>&nbsp;</DIV></FONT></SPAN></FONT></BODY></HTML>

Earn $52 per hosting referral at Lunarpages.