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.(tm) 
19 W. College Ave. 
Yardley, PA  19067 
T: 215.493.8900 x6725 
E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
Web site: www.activant.com <http://www.activant.com/>  
_________________________________ 

 

Reply via email to