axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Junit Test, Cookies and Axis
Date Wed, 03 Sep 2008 21:10:03 GMT

please supply wsdl

thanks,
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender.
This transmission is of a confidential nature and Sender does not endorse distribution to
any party other than intended recipient. Sender does not necessarily endorse content contained
within this transmission. 


Subject: Junit Test, Cookies and Axis
Date: Wed, 3 Sep 2008 17:04:35 -0400
From: deborah.wus@activant.com
To: axis-user@ws.apache.org









I am working with 
Webservices through a third party application.  I have loaded the axis jars 
and am able to get a response of ACK from the ping Service.  I am also able 
to use the Login method without receiving a fault code.  However, when I 
attempt to perform another function after the login (one which requires a login) 
I receive an error of Invalid Access.  The support line for the third party 
services said that if using .NET I would need to set the 
CookieContainer().  I thought this translated to the setMaintainSession 
propery for Axis on the Locator/Stub.
 
I have created the 
following Junit test and receive the same error.  The login is successful 
but the subsequent call does not have the proper information and returns an 
Invalid Access fault code.  How do I maintain the cookies needed for 
subsequent calls after the login?
 
    
public void test52ProjectDataSoapLogin() throws Exception 
{
        
com.perseus.www.Pdc_WS.ProjectDataSoapStub 
binding;
        try 
{
            binding 
= 
(com.perseus.www.Pdc_WS.ProjectDataSoapStub)
                          
new 
com.perseus.www.Pdc_WS.ProjectDataLocator().getProjectDataSoap();
            
binding.setMaintainSession(true);
        
}
        catch 
(javax.xml.rpc.ServiceException jre) 
{
            
if(jre.getLinkedCause()!=null)
                
jre.getLinkedCause().printStackTrace();
            
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: 
" + jre);
        
}
        assertNotNull("binding is null", 
binding);
 
        // Time out 
after a minute
        
binding.setTimeout(60000);
 
        // Test 
operation
        java.lang.String value = 
null;
        value = 
binding.login("username","password");
 
        // Test 
operation
        
com.perseus.www.Pdc_WS.GetProfileListResponseGetProfileListResult pvalue = 
null;
        pvalue = 
binding.getProfileList();
    }
 
Thank 
you,
Deborah Wus 


 
_________________________________ 
Deborah Wus 
Senior Development Engineer 

Wholesale Distribution 
Group 
Activant Solutions 
Inc.™ 
19 W. 
College Ave. 
Yardley, 
PA  19067 
T: 215.493.8900 x6725 

E-mail: deborah.wus@activant.com 
Web site: www.activant.com 
_________________________________ 
 

_________________________________________________________________
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
Mime
View raw message