You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Deborah Wus <de...@activant.com> on 2008/09/04 17:41:54 UTC

Axis 2 manage session not working - Cookies and axis not working

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: deborah.wus@activant.com <ma...@activant.com>  
Web site: www.activant.com <http://www.activant.com/>  
_________________________________ 

 

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
http://www.hankandsonsauto.com/ProjectDataStub.java

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Thursday, September 04, 2008 4:51 PM
To: axis-user@ws.apache.org
Subject: RE: Axis 2 manage session not working - Cookies and axis not
working


either cut and paste inline into the body of the email 
or
publish a text view java class onto your webserver
and let us know what the url is

if you have a ftp server put it up to your ftp server
and let us know what the url is

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: RE: Axis 2 manage session not working - Cookies and axis not
working
Date: Thu, 4 Sep 2008 14:51:45 -0400
From: deborah.wus@activant.com
To: axis-user@ws.apache.org


it is too big for me to send it.  Can I put it up some other way?

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Thursday, September 04, 2008 12:03 PM
To: axis-user@ws.apache.org
Subject: RE: Axis 2 manage session not working - Cookies and axis not
working


the wsdl you published is messy
can you publish the plain class that the service implements
e.g.
class Fu
{
 int bar;
 Fu()
};

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: Axis 2 manage session not working - Cookies and axis not
working
Date: Thu, 4 Sep 2008 11:41:54 -0400
From: deborah.wus@activant.com
To: axis-user@ws.apache.org


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: deborah.wus@activant.com <ma...@activant.com>  
Web site: www.activant.com <http://www.activant.com/>  
_________________________________ 

 

________________________________

Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn
Now
<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-c
ns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_getmore_092008>  

________________________________

See how Windows connects the people, information, and fun that are part
of your life. See Now
<http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/>  

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Martin Gainty <mg...@hotmail.com>.
either cut and paste inline into the body of the email 
or
publish a text view java class onto your webserver
and let us know what the url is

if you have a ftp server put it up to your ftp server
and let us know what the url is

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: RE: Axis 2 manage session not working - Cookies and axis not working
Date: Thu, 4 Sep 2008 14:51:45 -0400
From: deborah.wus@activant.com
To: axis-user@ws.apache.org










it is too big for me to send it.  Can I put it up some other 
way?



From: Martin Gainty [mailto:mgainty@hotmail.com] 

Sent: Thursday, September 04, 2008 12:03 PM
To: 
axis-user@ws.apache.org
Subject: RE: Axis 2 manage session not working 
- Cookies and axis not working


the wsdl you published is messy
can you publish the plain class 
that the service implements
e.g.
class Fu
{
 int 
bar;
 Fu()
};

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: Axis 2 manage session not working - Cookies and axis not 
working
Date: Thu, 4 Sep 2008 11:41:54 -0400
From: 
deborah.wus@activant.com
To: axis-user@ws.apache.org



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.™ 
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. Learn Now 

_________________________________________________________________
See how Windows connects the people, information, and fun that are part of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
it is too big for me to send it.  Can I put it up some other way?

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Thursday, September 04, 2008 12:03 PM
To: axis-user@ws.apache.org
Subject: RE: Axis 2 manage session not working - Cookies and axis not
working


the wsdl you published is messy
can you publish the plain class that the service implements
e.g.
class Fu
{
 int bar;
 Fu()
};

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: Axis 2 manage session not working - Cookies and axis not
working
Date: Thu, 4 Sep 2008 11:41:54 -0400
From: deborah.wus@activant.com
To: axis-user@ws.apache.org


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: deborah.wus@activant.com <ma...@activant.com>  
Web site: www.activant.com <http://www.activant.com/>  
_________________________________ 

 

________________________________

Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn
Now
<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-c
ns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008>  

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Martin Gainty <mg...@hotmail.com>.
the wsdl you published is messy
can you publish the plain class that the service implements
e.g.
class Fu
{
 int bar;
 Fu()
};

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: Axis 2 manage session not working - Cookies and axis not working
Date: Thu, 4 Sep 2008 11:41:54 -0400
From: deborah.wus@activant.com
To: axis-user@ws.apache.org








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.™ 
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

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
What does this mean?
 
Thanks,
Deborah

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Friday, September 05, 2008 8:26 PM
To: axis-user@ws.apache.org
Subject: RE: Axis 2 manage session not working - Cookies and axis not
working


Deepal et al

I was able to generate the service from the service ( i have a zip with
the entire service) which deployed
but in creating the client I discovered this problem with a hard
reference to org.apache.axis2.soap.SOAPEnvelope

https://issues.apache.org/jira/browse/AXIS2-4014

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: RE: Axis 2 manage session not working - Cookies and axis not
working
> Date: Fri, 5 Sep 2008 12:15:54 -0400
> From: deborah.wus@activant.com
> To: axis-user@ws.apache.org
> 
> To clarify. What I want to do in Axis 2 was accomplished in Axis 1 by
> going the following: I need to create a signle cookie string and I
need
> to create a configuration to use XMLStringProvider below.
> 
> Thanks in advance.
> 
> /* change the cookie
> passing mechanisam of axis from
> Cookie: a=a1
> Cookie: b=b2
> Cookie: c=c3
> to
> Cookie: a=a1;b=b2;c=c3
> 
> */
> 
> 
> DefaultHttpParams.getDefaultParams().setBooleanParameter(
> HttpMethodParams.SINGLE_COOKIE_HEADER,true);
> 
> //Create a custom engine configuration
> for the custom cilent-wsdd file
> EngineConfiguration e =
> getEngineConfiguration();
> 
> // get the panel data service locator
> locator = new ProjectDataLocator(e);
> 
>
locator.setProjectDataSoapEndpointAddress("http://efm.activant.com/ws/pr
> ojectdata.asmx");
> 
> // maintain the session
> locator.setMaintainSession(true);
> 
> //create the service for the paneldata
> pdService =
> locator.getProjectDataSoap();
> 
> //set the session properties on service
> level
> ((Stub)
> pdService).setMaintainSession(true);
> ((Stub)
> pdService)._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new
> Boolean(true));
> 
> 
> // method to set the custom engine configuration for axis 
> protected org.apache.axis.EngineConfiguration
> getEngineConfiguration() 
> {
> java.lang.StringBuffer sb = new
> java.lang.StringBuffer();
> sb.append("<?xml version=\"1.0\"
> encoding=\"UTF-8\"?>\r\n");
> sb.append("<deployment
> name=\"defaultClientConfig\"\r\n");
> 
> sb.append("xmlns=\"http://xml.apache.org/axis/wsdd/\"\r\n");
> 
>
sb.append("xmlns:java=\"http://xml.apache.org/axis/wsdd/providers/java\"
> >\r\n");
> sb.append("<transport name=\"http\"
> pivot=\"java:org.apache.axis.transport.http.CommonsHTTPSender\"
> />\r\n");
> sb.append("<transport name=\"local\"
> pivot=\"java:org.apache.axis.transport.local.LocalSender\" />\r\n");
> sb.append("<transport name=\"java\"
> pivot=\"java:org.apache.axis.transport.java.JavaSender\" />\r\n");
> sb.append("</deployment>\r\n");
> org.apache.axis.configuration.XMLStringProvider
> config = 
> new
> org.apache.axis.configuration.XMLStringProvider(sb.toString());
> return config;
> } 
> 
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
> Sent: Friday, September 05, 2008 10:09 AM
> To: axis-user@ws.apache.org
> Subject: Re: Axis 2 manage session not working - Cookies and axis not
> working
> 
> hehe , no worries . If you get that working then thats what we want.
> 
> Thank you!
> Deepal
> 
> 
> Deborah Wus wrote:
> > Actually thank you very much I think I was identifying the wrong
> > variable. When I changed the custom cookie to ASP.NET_Ses, it does
> work!
> > Thank you all very much.
> >
> >
>
------------------------------------------------------------------------
> > *From:* Deborah Wus [mailto:deborah.wus@activant.com]
> > *Sent:* Friday, September 05, 2008 9:37 AM
> > *To:* axis-user@ws.apache.org
> > *Subject:* RE: Axis 2 manage session not working - Cookies and axis
> > not working
> >
> > HTTP/1.1 200 OK
> > Date: Fri, 05 Sep 2008 13:34:35 GMT
> > Server: Microsoft-IIS/6.0
> > X-Powered-By: ASP.NET
> > X-AspNet-Version: 2.0.50727
> > Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/;
> HttpOnly
> > Cache-Control: private, max-age=0
> > Content-Type: application/soap+xml; charset=utf-8
> > Content-Length: 328
> > Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
> > <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> > xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
> >
>
<http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CLoginResponse>
> > xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
> > <http://www.perseus.com/Pdc.WS%22%3E%3CLoginResult>
> > /></LoginResponse></soap:Body></soap:Envelope>
> > Thank you so much for your help and guidance - I am completely new
to
> > webservices. Let me know if I sent the correct portion.
> >
> >
>
------------------------------------------------------------------------
> > *From:* keith chapman [mailto:keithgchapman@gmail.com]
> > *Sent:* Thursday, September 04, 2008 11:57 PM
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: Axis 2 manage session not working - Cookies and axis
> > not working
> >
> > You can use TCPMotitor [1] to trace the SOAP messages
> >
>
<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
> vice.html>.
> >
> > Thanks,
> > Keith.
> >
> > [1]
> >
>
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
> ice.html
> >
> > On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe
> > <deepal@opensource.lk <ma...@opensource.lk>> wrote:
> >
> > can you please paste the HTTP header of the messages I mean HTTP
> > header
> > of the response and the second request.
> >
> > Deborah Wus wrote:
> > > 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:keithgchapman@gmail.com
> > <ma...@gmail.com>]
> > > *Sent:* Thursday, September 04, 2008 12:47 PM
> > > *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
> > > *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
> > <deborah.wus@activant.com <ma...@activant.com>
> > > <mailto:deborah.wus@activant.com
> > <ma...@activant.com>>> 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: _deborah.wus@activant.com_
> > <mailto:your.email@activant.com <ma...@activant.com>>
> > > 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
> >
> > --
> > Thanks,
> > Deepal
> > ................................................................
> > http://blogs.deepal.org/
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > <ma...@ws.apache.org>
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > <ma...@ws.apache.org>
> >
> >
> >
> >
> > -- 
> > Keith Chapman
> > Senior Software Engineer
> > WSO2 Inc.
> > Oxygenating the Web Service Platform.
> > http://wso2.org/
> >
> > blog: http://www.keith-chapman.org
> 
> -- 
> Thanks,
> Deepal
> ................................................................
> http://blogs.deepal.org/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


________________________________

See how Windows Mobile brings your life together-at home, work, or on
the go. See Now
<http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/>  

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Martin Gainty <mg...@hotmail.com>.
Deepal et al

I was able to generate the service from the service ( i have a zip with the entire service) which deployed
but in creating the client I discovered this problem with a hard reference to  org.apache.axis2.soap.SOAPEnvelope

https://issues.apache.org/jira/browse/AXIS2-4014

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: RE: Axis 2 manage session not working - Cookies and axis not working
> Date: Fri, 5 Sep 2008 12:15:54 -0400
> From: deborah.wus@activant.com
> To: axis-user@ws.apache.org
> 
> To clarify.  What I want to do in Axis 2 was accomplished in Axis 1 by
> going the following:  I need to create a signle cookie string and I need
> to create a configuration to use XMLStringProvider below.
> 
> Thanks in advance.
> 
> 				/*		change the cookie
> passing mechanisam of axis from
> 				       	Cookie: a=a1
> 					     Cookie: b=b2
> 					     Cookie: c=c3
> 					     to
> 					     Cookie: a=a1;b=b2;c=c3
> 
> 					     */
> 				
> 	
> DefaultHttpParams.getDefaultParams().setBooleanParameter(
> HttpMethodParams.SINGLE_COOKIE_HEADER,true);
> 				
> 				//Create a custom engine configuration
> for the custom cilent-wsdd file
> 				EngineConfiguration e =
> getEngineConfiguration();
> 			
> 				// get the panel data service locator
> 				locator = new ProjectDataLocator(e);
> 	
> locator.setProjectDataSoapEndpointAddress("http://efm.activant.com/ws/pr
> ojectdata.asmx");
> 				
> 				// maintain the session
> 				locator.setMaintainSession(true);
> 				
> 				//create the service for the paneldata
> 				pdService =
> locator.getProjectDataSoap();
> 				
> 				//set the session properties on service
> level
> 				((Stub)
> pdService).setMaintainSession(true);
> 				((Stub)
> pdService)._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new
> Boolean(true));
> 
> 
> 	// method to set the custom engine configuration for axis 
> 	protected org.apache.axis.EngineConfiguration
> getEngineConfiguration() 
> 	{
> 		    java.lang.StringBuffer sb = new
> java.lang.StringBuffer();
> 		    sb.append("<?xml version=\"1.0\"
> encoding=\"UTF-8\"?>\r\n");
> 		    sb.append("<deployment
> name=\"defaultClientConfig\"\r\n");
> 	
> sb.append("xmlns=\"http://xml.apache.org/axis/wsdd/\"\r\n");
> 	
> sb.append("xmlns:java=\"http://xml.apache.org/axis/wsdd/providers/java\"
> >\r\n");
> 		    sb.append("<transport name=\"http\"
> pivot=\"java:org.apache.axis.transport.http.CommonsHTTPSender\"
> />\r\n");
> 		    sb.append("<transport name=\"local\"
> pivot=\"java:org.apache.axis.transport.local.LocalSender\" />\r\n");
> 		    sb.append("<transport name=\"java\"
> pivot=\"java:org.apache.axis.transport.java.JavaSender\" />\r\n");
> 		    sb.append("</deployment>\r\n");
> 		    org.apache.axis.configuration.XMLStringProvider
> config = 
> 	        new
> org.apache.axis.configuration.XMLStringProvider(sb.toString());
> 	    return config;
> 	} 
> 
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
> Sent: Friday, September 05, 2008 10:09 AM
> To: axis-user@ws.apache.org
> Subject: Re: Axis 2 manage session not working - Cookies and axis not
> working
> 
> hehe , no worries . If you get that working then thats what we want.
> 
> Thank you!
> Deepal
> 
> 
> Deborah Wus wrote:
> > Actually thank you very much I think I was identifying the wrong
> > variable. When I changed the custom cookie to ASP.NET_Ses, it does
> work!
> > Thank you all very much.
> >
> >
> ------------------------------------------------------------------------
> > *From:* Deborah Wus [mailto:deborah.wus@activant.com]
> > *Sent:* Friday, September 05, 2008 9:37 AM
> > *To:* axis-user@ws.apache.org
> > *Subject:* RE: Axis 2 manage session not working - Cookies and axis
> > not working
> >
> > HTTP/1.1 200 OK
> > Date: Fri, 05 Sep 2008 13:34:35 GMT
> > Server: Microsoft-IIS/6.0
> > X-Powered-By: ASP.NET
> > X-AspNet-Version: 2.0.50727
> > Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/;
> HttpOnly
> > Cache-Control: private, max-age=0
> > Content-Type: application/soap+xml; charset=utf-8
> > Content-Length: 328
> > Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
> > <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> > xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
> >
> <http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CLoginResponse>
> > xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
> > <http://www.perseus.com/Pdc.WS%22%3E%3CLoginResult>
> > /></LoginResponse></soap:Body></soap:Envelope>
> > Thank you so much for your help and guidance - I am completely new to
> > webservices. Let me know if I sent the correct portion.
> >
> >
> ------------------------------------------------------------------------
> > *From:* keith chapman [mailto:keithgchapman@gmail.com]
> > *Sent:* Thursday, September 04, 2008 11:57 PM
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: Axis 2 manage session not working - Cookies and axis
> > not working
> >
> > You can use TCPMotitor [1] to trace the SOAP messages
> >
> <http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
> vice.html>.
> >
> > Thanks,
> > Keith.
> >
> > [1]
> >
> http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
> ice.html
> >
> > On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe
> > <deepal@opensource.lk <ma...@opensource.lk>> wrote:
> >
> >     can you please paste the HTTP header of the messages I mean HTTP
> >     header
> >     of the response and the second request.
> >
> >     Deborah Wus wrote:
> >     > 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:keithgchapman@gmail.com
> >     <ma...@gmail.com>]
> >     > *Sent:* Thursday, September 04, 2008 12:47 PM
> >     > *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
> >     > *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
> >     <deborah.wus@activant.com <ma...@activant.com>
> >     > <mailto:deborah.wus@activant.com
> >     <ma...@activant.com>>> 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: _deborah.wus@activant.com_
> >     <mailto:your.email@activant.com <ma...@activant.com>>
> >     > 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
> >
> >     --
> >     Thanks,
> >     Deepal
> >     ................................................................
> >     http://blogs.deepal.org/
> >
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> > -- 
> > Keith Chapman
> > Senior Software Engineer
> > WSO2 Inc.
> > Oxygenating the Web Service Platform.
> > http://wso2.org/
> >
> > blog: http://www.keith-chapman.org
> 
> -- 
> Thanks,
> Deepal
> ................................................................
> http://blogs.deepal.org/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 

_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
To clarify.  What I want to do in Axis 2 was accomplished in Axis 1 by
going the following:  I need to create a signle cookie string and I need
to create a configuration to use XMLStringProvider below.

Thanks in advance.

				/*		change the cookie
passing mechanisam of axis from
				       	Cookie: a=a1
					     Cookie: b=b2
					     Cookie: c=c3
					     to
					     Cookie: a=a1;b=b2;c=c3

					     */
				
	
DefaultHttpParams.getDefaultParams().setBooleanParameter(
HttpMethodParams.SINGLE_COOKIE_HEADER,true);
				
				//Create a custom engine configuration
for the custom cilent-wsdd file
				EngineConfiguration e =
getEngineConfiguration();
			
				// get the panel data service locator
				locator = new ProjectDataLocator(e);
	
locator.setProjectDataSoapEndpointAddress("http://efm.activant.com/ws/pr
ojectdata.asmx");
				
				// maintain the session
				locator.setMaintainSession(true);
				
				//create the service for the paneldata
				pdService =
locator.getProjectDataSoap();
				
				//set the session properties on service
level
				((Stub)
pdService).setMaintainSession(true);
				((Stub)
pdService)._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new
Boolean(true));


	// method to set the custom engine configuration for axis 
	protected org.apache.axis.EngineConfiguration
getEngineConfiguration() 
	{
		    java.lang.StringBuffer sb = new
java.lang.StringBuffer();
		    sb.append("<?xml version=\"1.0\"
encoding=\"UTF-8\"?>\r\n");
		    sb.append("<deployment
name=\"defaultClientConfig\"\r\n");
	
sb.append("xmlns=\"http://xml.apache.org/axis/wsdd/\"\r\n");
	
sb.append("xmlns:java=\"http://xml.apache.org/axis/wsdd/providers/java\"
>\r\n");
		    sb.append("<transport name=\"http\"
pivot=\"java:org.apache.axis.transport.http.CommonsHTTPSender\"
/>\r\n");
		    sb.append("<transport name=\"local\"
pivot=\"java:org.apache.axis.transport.local.LocalSender\" />\r\n");
		    sb.append("<transport name=\"java\"
pivot=\"java:org.apache.axis.transport.java.JavaSender\" />\r\n");
		    sb.append("</deployment>\r\n");
		    org.apache.axis.configuration.XMLStringProvider
config = 
	        new
org.apache.axis.configuration.XMLStringProvider(sb.toString());
	    return config;
	} 

-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
Sent: Friday, September 05, 2008 10:09 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 2 manage session not working - Cookies and axis not
working

hehe , no worries . If you get that working then thats what we want.

Thank you!
Deepal


Deborah Wus wrote:
> Actually thank you very much I think I was identifying the wrong
> variable. When I changed the custom cookie to ASP.NET_Ses, it does
work!
> Thank you all very much.
>
>
------------------------------------------------------------------------
> *From:* Deborah Wus [mailto:deborah.wus@activant.com]
> *Sent:* Friday, September 05, 2008 9:37 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: Axis 2 manage session not working - Cookies and axis
> not working
>
> HTTP/1.1 200 OK
> Date: Fri, 05 Sep 2008 13:34:35 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> X-AspNet-Version: 2.0.50727
> Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/;
HttpOnly
> Cache-Control: private, max-age=0
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: 328
> Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
>
<http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CLoginResponse>
> xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
> <http://www.perseus.com/Pdc.WS%22%3E%3CLoginResult>
> /></LoginResponse></soap:Body></soap:Envelope>
> Thank you so much for your help and guidance - I am completely new to
> webservices. Let me know if I sent the correct portion.
>
>
------------------------------------------------------------------------
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Thursday, September 04, 2008 11:57 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2 manage session not working - Cookies and axis
> not working
>
> You can use TCPMotitor [1] to trace the SOAP messages
>
<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
vice.html>.
>
> Thanks,
> Keith.
>
> [1]
>
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
ice.html
>
> On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe
> <deepal@opensource.lk <ma...@opensource.lk>> wrote:
>
>     can you please paste the HTTP header of the messages I mean HTTP
>     header
>     of the response and the second request.
>
>     Deborah Wus wrote:
>     > 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:keithgchapman@gmail.com
>     <ma...@gmail.com>]
>     > *Sent:* Thursday, September 04, 2008 12:47 PM
>     > *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
>     > *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
>     <deborah.wus@activant.com <ma...@activant.com>
>     > <mailto:deborah.wus@activant.com
>     <ma...@activant.com>>> 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: _deborah.wus@activant.com_
>     <mailto:your.email@activant.com <ma...@activant.com>>
>     > 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
>
>     --
>     Thanks,
>     Deepal
>     ................................................................
>     http://blogs.deepal.org/
>
>
>
>
---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org

-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
The third party sent me this.  How would I accomplish this in Axis2?

By default, Axis sends the cookies in separate key-value pairs like
this:

Cookie: a=a1
Cookie: b=b2
Cookie: c=c3

While .Net OTOH expects the cookies in the format

Cookie: a=a1;b=b2;c=c3 

-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
Sent: Friday, September 05, 2008 10:09 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 2 manage session not working - Cookies and axis not
working

hehe , no worries . If you get that working then thats what we want.

Thank you!
Deepal


Deborah Wus wrote:
> Actually thank you very much I think I was identifying the wrong
> variable. When I changed the custom cookie to ASP.NET_Ses, it does
work!
> Thank you all very much.
>
>
------------------------------------------------------------------------
> *From:* Deborah Wus [mailto:deborah.wus@activant.com]
> *Sent:* Friday, September 05, 2008 9:37 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: Axis 2 manage session not working - Cookies and axis
> not working
>
> HTTP/1.1 200 OK
> Date: Fri, 05 Sep 2008 13:34:35 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> X-AspNet-Version: 2.0.50727
> Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/;
HttpOnly
> Cache-Control: private, max-age=0
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: 328
> Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
>
<http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CLoginResponse>
> xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
> <http://www.perseus.com/Pdc.WS%22%3E%3CLoginResult>
> /></LoginResponse></soap:Body></soap:Envelope>
> Thank you so much for your help and guidance - I am completely new to
> webservices. Let me know if I sent the correct portion.
>
>
------------------------------------------------------------------------
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Thursday, September 04, 2008 11:57 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2 manage session not working - Cookies and axis
> not working
>
> You can use TCPMotitor [1] to trace the SOAP messages
>
<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
vice.html>.
>
> Thanks,
> Keith.
>
> [1]
>
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
ice.html
>
> On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe
> <deepal@opensource.lk <ma...@opensource.lk>> wrote:
>
>     can you please paste the HTTP header of the messages I mean HTTP
>     header
>     of the response and the second request.
>
>     Deborah Wus wrote:
>     > 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:keithgchapman@gmail.com
>     <ma...@gmail.com>]
>     > *Sent:* Thursday, September 04, 2008 12:47 PM
>     > *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
>     > *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
>     <deborah.wus@activant.com <ma...@activant.com>
>     > <mailto:deborah.wus@activant.com
>     <ma...@activant.com>>> 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: _deborah.wus@activant.com_
>     <mailto:your.email@activant.com <ma...@activant.com>>
>     > 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
>
>     --
>     Thanks,
>     Deepal
>     ................................................................
>     http://blogs.deepal.org/
>
>
>
>
---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org

-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
Actually - now I am getting the error intermittently...  I can run it
ten times in a row (no hcnages in code or credentials)  And I only get
it successfully maybe once in 7-10 tries.

I tried adding a cleanup to the service but that has not changed.  Any
suggestions?

Thank you,
Deborah

    public void testAxis2Login() {
        ServiceClient sender;
        try {

            ProjectDataStub _stub = new
ProjectDataStub("http://efm.activant.com/ws/projectdata.asmx");
            sender = _stub._getServiceClient();
            Options options = sender.getOptions();
            options.setProperty("customCookieID" ,"ASP.NET_SessionId");
            options.setManageSession(true);
            sender.setOptions(options);
            
            ProjectDataStub.Ping ping = new ProjectDataStub.Ping();
            ProjectDataStub.PingResponse res;
            ProjectDataStub.LoginResponse loginResponse;
            ProjectDataStub.Login login = new ProjectDataStub.Login();
            
            ProjectDataStub.GetSurveyListResponse gres;
            ProjectDataStub.GetSurveyList glist = new
ProjectDataStub.GetSurveyList();
            
            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.GetSurveyList(glist);
                ProjectDataStub.GetSurveyListResult_type0 type =
gres.getGetSurveyListResult();  
                try {
                    OMElement omElement =
type.getOMElement(ProjectDataStub.GetSurveyList.MY_QNAME,
OMAbstractFactory.getOMFactory());
                    String omElementString;
                    try {
                        omElementString =
omElement.toStringWithConsume();
                        System.out.println("OMElement ==> " +
omElementString);
                        XMLStreamReader xmlReader =
                                StAXUtils.createXMLStreamReader(new
ByteArrayInputStream(omElementString.getBytes()));
                    } catch (XMLStreamException e3) {
                        // TODO Auto-generated catch block
                        e3.printStackTrace();
                    }
                } catch (ADBException e2) {
                    // TODO Auto-generated catch block
                    e2.printStackTrace();
                }
                
            } catch (RemoteException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            } finally {
            sender.cleanup();
            sender.cleanupTransport();
            }    
            
        } catch (AxisFault e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }    
    } 

-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
Sent: Friday, September 05, 2008 10:09 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 2 manage session not working - Cookies and axis not
working

hehe , no worries . If you get that working then thats what we want.

Thank you!
Deepal


Deborah Wus wrote:
> Actually thank you very much I think I was identifying the wrong
> variable. When I changed the custom cookie to ASP.NET_Ses, it does
work!
> Thank you all very much.
>
>
------------------------------------------------------------------------
> *From:* Deborah Wus [mailto:deborah.wus@activant.com]
> *Sent:* Friday, September 05, 2008 9:37 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: Axis 2 manage session not working - Cookies and axis
> not working
>
> HTTP/1.1 200 OK
> Date: Fri, 05 Sep 2008 13:34:35 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> X-AspNet-Version: 2.0.50727
> Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/;
HttpOnly
> Cache-Control: private, max-age=0
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: 328
> Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
>
<http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CLoginResponse>
> xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
> <http://www.perseus.com/Pdc.WS%22%3E%3CLoginResult>
> /></LoginResponse></soap:Body></soap:Envelope>
> Thank you so much for your help and guidance - I am completely new to
> webservices. Let me know if I sent the correct portion.
>
>
------------------------------------------------------------------------
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Thursday, September 04, 2008 11:57 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2 manage session not working - Cookies and axis
> not working
>
> You can use TCPMotitor [1] to trace the SOAP messages
>
<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
vice.html>.
>
> Thanks,
> Keith.
>
> [1]
>
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
ice.html
>
> On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe
> <deepal@opensource.lk <ma...@opensource.lk>> wrote:
>
>     can you please paste the HTTP header of the messages I mean HTTP
>     header
>     of the response and the second request.
>
>     Deborah Wus wrote:
>     > 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:keithgchapman@gmail.com
>     <ma...@gmail.com>]
>     > *Sent:* Thursday, September 04, 2008 12:47 PM
>     > *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
>     > *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
>     <deborah.wus@activant.com <ma...@activant.com>
>     > <mailto:deborah.wus@activant.com
>     <ma...@activant.com>>> 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: _deborah.wus@activant.com_
>     <mailto:your.email@activant.com <ma...@activant.com>>
>     > 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
>
>     --
>     Thanks,
>     Deepal
>     ................................................................
>     http://blogs.deepal.org/
>
>
>
>
---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org

-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis 2 manage session not working - Cookies and axis not working

Posted by Deepal Jayasinghe <de...@opensource.lk>.
hehe , no worries . If you get that working then thats what we want.

Thank you!
Deepal


Deborah Wus wrote:
> Actually thank you very much I think I was identifying the wrong
> variable. When I changed the custom cookie to ASP.NET_Ses, it does work!
> Thank you all very much.
>
> ------------------------------------------------------------------------
> *From:* Deborah Wus [mailto:deborah.wus@activant.com]
> *Sent:* Friday, September 05, 2008 9:37 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: Axis 2 manage session not working - Cookies and axis
> not working
>
> HTTP/1.1 200 OK
> Date: Fri, 05 Sep 2008 13:34:35 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> X-AspNet-Version: 2.0.50727
> Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/; HttpOnly
> Cache-Control: private, max-age=0
> Content-Type: application/soap+xml; charset=utf-8
> Content-Length: 328
> Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
> <http://www.w3.org/2001/XMLSchema%22%3E%3Csoap:Body%3E%3CLoginResponse>
> xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
> <http://www.perseus.com/Pdc.WS%22%3E%3CLoginResult>
> /></LoginResponse></soap:Body></soap:Envelope>
> Thank you so much for your help and guidance - I am completely new to
> webservices. Let me know if I sent the correct portion.
>
> ------------------------------------------------------------------------
> *From:* keith chapman [mailto:keithgchapman@gmail.com]
> *Sent:* Thursday, September 04, 2008 11:57 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis 2 manage session not working - Cookies and axis
> not working
>
> You can use TCPMotitor [1] to trace the SOAP messages
> <http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html>.
>
> Thanks,
> Keith.
>
> [1]
> http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html
>
> On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe
> <deepal@opensource.lk <ma...@opensource.lk>> wrote:
>
>     can you please paste the HTTP header of the messages I mean HTTP
>     header
>     of the response and the second request.
>
>     Deborah Wus wrote:
>     > 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:keithgchapman@gmail.com
>     <ma...@gmail.com>]
>     > *Sent:* Thursday, September 04, 2008 12:47 PM
>     > *To:* axis-user@ws.apache.org <ma...@ws.apache.org>
>     > *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
>     <deborah.wus@activant.com <ma...@activant.com>
>     > <mailto:deborah.wus@activant.com
>     <ma...@activant.com>>> 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.™*
>     > 19 W. College Ave.
>     > Yardley, PA 19067
>     > *T:* 215.493.8900 x6725
>     > E-mail: _deborah.wus@activant.com_
>     <mailto:your.email@activant.com <ma...@activant.com>>
>     > 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
>
>     --
>     Thanks,
>     Deepal
>     ................................................................
>     http://blogs.deepal.org/
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>
>
>
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org

-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
Actually thank you very much I think I was identifying the wrong
variable.  When I changed the custom cookie to ASP.NET_Ses, it does
work!
 
Thank you all very much.

________________________________

From: Deborah Wus [mailto:deborah.wus@activant.com] 
Sent: Friday, September 05, 2008 9:37 AM
To: axis-user@ws.apache.org
Subject: RE: Axis 2 manage session not working - Cookies and axis not
working


HTTP/1.1 200 OK
 
Date: Fri, 05 Sep 2008 13:34:35 GMT
 
Server: Microsoft-IIS/6.0
 
X-Powered-By: ASP.NET
 
X-AspNet-Version: 2.0.50727
 
Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/; HttpOnly
 
Cache-Control: private, max-age=0
 
Content-Type: application/soap+xml; charset=utf-8
 
Content-Length: 328
 
Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
 
 
 
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
/></LoginResponse></soap:Body></soap:Envelope>
 
 
Thank you so much for your help and guidance - I am completely new to
webservices.  Let me know if I sent the correct portion.

________________________________

From: keith chapman [mailto:keithgchapman@gmail.com] 
Sent: Thursday, September 04, 2008 11:57 PM
To: axis-user@ws.apache.org
Subject: Re: Axis 2 manage session not working - Cookies and axis not
working


You can use TCPMotitor [1] to trace the SOAP messages
<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
vice.html> .

Thanks,
Keith.

[1]
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
ice.html


On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe <de...@opensource.lk>
wrote:


	can you please paste the HTTP header of the messages I mean HTTP
header
	of the response and the second request.
	

	Deborah Wus wrote:
	> 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:keithgchapman@gmail.com]
	> *Sent:* Thursday, September 04, 2008 12:47 PM
	> *To:* axis-user@ws.apache.org
	> *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
<deborah.wus@activant.com
	
	> <ma...@activant.com>> 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: _deborah.wus@activant.com_
<ma...@activant.com>
	>     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
	
	
	--
	Thanks,
	Deepal
	................................................................
	http://blogs.deepal.org/
	
	
	
	
---------------------------------------------------------------------
	To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
	For additional commands, e-mail: axis-user-help@ws.apache.org
	
	




-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
HTTP/1.1 200 OK
 
Date: Fri, 05 Sep 2008 13:34:35 GMT
 
Server: Microsoft-IIS/6.0
 
X-Powered-By: ASP.NET
 
X-AspNet-Version: 2.0.50727
 
Set-Cookie: ASP.NET_SessionId=jmjmsh45enh2d5553vflpfbl; path=/; HttpOnly
 
Cache-Control: private, max-age=0
 
Content-Type: application/soap+xml; charset=utf-8
 
Content-Length: 328
 
Set-Cookie: NSC_fgn_ns_bqq=ac10005a0050;path=/
 
 
 
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LoginResponse
xmlns="http://www.perseus.com/Pdc.WS"><LoginResult
/></LoginResponse></soap:Body></soap:Envelope>
 
 
Thank you so much for your help and guidance - I am completely new to
webservices.  Let me know if I sent the correct portion.

________________________________

From: keith chapman [mailto:keithgchapman@gmail.com] 
Sent: Thursday, September 04, 2008 11:57 PM
To: axis-user@ws.apache.org
Subject: Re: Axis 2 manage session not working - Cookies and axis not
working


You can use TCPMotitor [1] to trace the SOAP messages
<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
vice.html> .

Thanks,
Keith.

[1]
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
ice.html


On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe <de...@opensource.lk>
wrote:


	can you please paste the HTTP header of the messages I mean HTTP
header
	of the response and the second request.
	

	Deborah Wus wrote:
	> 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:keithgchapman@gmail.com]
	> *Sent:* Thursday, September 04, 2008 12:47 PM
	> *To:* axis-user@ws.apache.org
	> *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
<deborah.wus@activant.com
	
	> <ma...@activant.com>> 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: _deborah.wus@activant.com_
<ma...@activant.com>
	>     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
	
	
	--
	Thanks,
	Deepal
	................................................................
	http://blogs.deepal.org/
	
	
	
	
---------------------------------------------------------------------
	To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
	For additional commands, e-mail: axis-user-help@ws.apache.org
	
	




-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


Re: Axis 2 manage session not working - Cookies and axis not working

Posted by keith chapman <ke...@gmail.com>.
You can use TCPMotitor [1] to trace the SOAP
messages<http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html>
.

Thanks,
Keith.

[1]
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html

On Fri, Sep 5, 2008 at 6:28 AM, Deepal Jayasinghe <de...@opensource.lk>wrote:

> can you please paste the HTTP header of the messages I mean HTTP header
> of the response and the second request.
>
> Deborah Wus wrote:
> > 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:keithgchapman@gmail.com]
> > *Sent:* Thursday, September 04, 2008 12:47 PM
> > *To:* axis-user@ws.apache.org
> > *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 <deborah.wus@activant.com
> > <ma...@activant.com>> 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.™*
> >     19 W. College Ave.
> >     Yardley, PA 19067
> >     *T:* 215.493.8900 x6725
> >     E-mail: _deborah.wus@activant.com_ <ma...@activant.com>
> >     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
>
> --
> Thanks,
> Deepal
> ................................................................
> http://blogs.deepal.org/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: Axis 2 manage session not working - Cookies and axis not working

Posted by Deepal Jayasinghe <de...@opensource.lk>.
can you please paste the HTTP header of the messages I mean HTTP header
of the response and the second request.

Deborah Wus wrote:
> 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:keithgchapman@gmail.com]
> *Sent:* Thursday, September 04, 2008 12:47 PM
> *To:* axis-user@ws.apache.org
> *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 <deborah.wus@activant.com
> <ma...@activant.com>> 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.™*
>     19 W. College Ave.
>     Yardley, PA 19067
>     *T:* 215.493.8900 x6725
>     E-mail: _deborah.wus@activant.com_ <ma...@activant.com>
>     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

-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis 2 manage session not working - Cookies and axis not working

Posted by Deborah Wus <de...@activant.com>.
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:keithgchapman@gmail.com] 
Sent: Thursday, September 04, 2008 12:47 PM
To: axis-user@ws.apache.org
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 <de...@activant.com>
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: deborah.wus@activant.com
<ma...@activant.com>  
	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


Re: Axis 2 manage session not working - Cookies and axis not working

Posted by keith chapman <ke...@gmail.com>.
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 <de...@activant.com>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.™*
> 19 W. College Ave.
> Yardley, PA  19067
> *T:* 215.493.8900 x6725
> E-mail: *deborah.wus@activant.com* <yo...@activant.com>
> 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