That did not work either. I also tried setting the customCookieId
before maintiaining the sessions as I saw listed elsewhere.
options.setProperty("customCookieID" ,"NSC_fgn_ns_bqq");
But that also did not work.
________________________________
From: keith chapman [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2008 12:47 PM
To: [email protected]
Subject: Re: Axis 2 manage session not working - Cookies and axis not
working
Hi,
Can you try using
_stub._getServiceClient().getOptions.setManageSession(true); instead. We
use transport session a lot in our projects and it works.
Thanks,
Keith.
On Thu, Sep 4, 2008 at 9:11 PM, Deborah Wus <[EMAIL PROTECTED]>
wrote:
I attempted to do this in Axis 2 to see if solved the problem I
was having, but I am still receiving an invalid access, meaning that the
session cookies are not being handled. Any calls which require a login
are failing although the login itself is succeeding.
Ping does not required a login. GetProfileList does required a
login. Ping receives an ACK, Login succeeds. GetProfileList returns an
Invalid Access error. Support from the third party who created the
service said if I am using .NET I should set the CookieContainer. They
have no input so far for Axis or Axis 2.
Any help would be appreciated.
package com.p21.test.web;
import java.rmi.RemoteException;
import org.apache.axis2.AxisFault;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import junit.framework.TestCase;
import com.perseus.www.pdc_ws.ProjectDataStub;
public class WSTest extends TestCase {
public void testLogin() {
try {
Options options = new Options();
options.setManageSession(true);
ProjectDataStub _stub = new
ProjectDataStub("http://efm.activant.com/ws/projectdata.asmx");
ServiceClient sender = _stub._getServiceClient();
sender.setOverrideOptions(options);
ProjectDataStub.Ping ping = new
ProjectDataStub.Ping();
ProjectDataStub.PingResponse res;
ProjectDataStub.LoginResponse loginResponse;
ProjectDataStub.Login login = new
ProjectDataStub.Login();
ProjectDataStub.GetProfileListResponse gres;
ProjectDataStub.GetProfileList glist = new
ProjectDataStub.GetProfileList();
login.setUserName("username");
login.setPassword("password");
try {
res = _stub.Ping(ping);
System.out.println(res.getPingResult());
loginResponse = _stub.Login(login);
System.out.println(loginResponse.getLoginResult());
gres = _stub.GetProfileList(glist);
System.out.println(gres.getGetProfileListResult());
} catch (RemoteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
_________________________________
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/>
_________________________________
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org