You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Krzysztof Grodzicki <kg...@gmail.com> on 2010/09/29 03:21:46 UTC
org.apache.cxf.message.MAINTAIN_SESSION doesn't work
Hi,
I am trying to maintain a session using CXF MAINTAIN_SESSION
functionality. It looks like this is not working properly. The code I
use is listed below:
""""
// initialize service
final BindingProvider bp = (BindingProvider) testServiceInterface;
final Map<String, Object> map = bp.getRequestContext();
map.put(BindingProvider.USERNAME_PROPERTY, "test");
map.put(BindingProvider.PASSWORD_PROPERTY, "test");
map.put(org.apache.cxf.message.Message.MAINTAIN_SESSION, Boolean.TRUE);
testServiceInterface.createTestData(/* list of parameters*/); // 1 call
testServiceInterface.testServiceTransactionCommit(""); // 2 call
"""
It seems that those two calls are run in different sessions. I'm using
CXF in version 2.2.6 but I also tested it with newest one.
Thanks in advance...
____________
Best regards
Kris
Re: org.apache.cxf.message.MAINTAIN_SESSION doesn't work
Posted by Krzysztof Grodzicki <kg...@gmail.com>.
I'm trying to send data to ws running on the SAP NetWeaver.
I investigated that those two calls are using different transactions
in cookies. Sending data from SoapUI is working properly. I will try
to generate logs from both (app and soapUI) using wireshark and post
it tomorrow.
____________
Best regards
Krzysztof Grodzicki
On Wed, Sep 29, 2010 at 16:16, Daniel Kulp <dk...@apache.org> wrote:
>
> What are you using for the server side?
>
> Can you wireshark the messages to make sure the cookies are properly being
> passed?
>
> Dan
>
>
>
> On Wednesday 29 September 2010 3:43:52 am Krzysztof Grodzicki wrote:
>> I tried with BindingProvider.SESSION_MAINTAIN_PROPERTY at first time,
>> but I found that changing to
>> org.apache.cxf.message.Message.MAINTAIN_SESSION will solve the problem
>> -
>> http://mail-archives.apache.org/mod_mbox/cxf-users/200909.mbox/<2009092214
>> 34.51128.dkulp@apache.org>.
>>
>> Any other solution for this problem?
>> ____________
>> Best regards
>> Kris
>>
>> On Wed, Sep 29, 2010 at 09:04, <ma...@samsix.com> wrote:
>> > I can't tell from what you've shown, but it looks like
>> > testServiceInterface is a port you retrieved from a class derived from
>> > jax-ws Service. If this is true,
>> > try using:
>> >
>> > BindingProvider.SESSION_MAINTAIN_PROPERTY
>> >
>> > instead of
>> >
>> > org.apache.cxf.message.Message.MAINTAIN_SESSION
>> >
>> > - Lucas
>> >
>> > Quoting Krzysztof Grodzicki <kg...@gmail.com>:
>> >> Hi,
>> >>
>> >> I am trying to maintain a session using CXF MAINTAIN_SESSION
>> >> functionality. It looks like this is not working properly. The code I
>> >> use is listed below:
>> >>
>> >> """"
>> >> // initialize service
>> >>
>> >> final BindingProvider bp = (BindingProvider) testServiceInterface;
>> >> final Map<String, Object> map = bp.getRequestContext();
>> >> map.put(BindingProvider.USERNAME_PROPERTY, "test");
>> >> map.put(BindingProvider.PASSWORD_PROPERTY, "test");
>> >> map.put(org.apache.cxf.message.Message.MAINTAIN_SESSION,
>> >> Boolean.TRUE);
>> >>
>> >>
>> >> testServiceInterface.createTestData(/* list of parameters*/); // 1
>> >> call testServiceInterface.testServiceTransactionCommit(""); // 2 call
>> >> """
>> >>
>> >> It seems that those two calls are run in different sessions. I'm using
>> >> CXF in version 2.2.6 but I also tested it with newest one.
>> >>
>> >> Thanks in advance...
>> >>
>> >> ____________
>> >> Best regards
>> >> Kris
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>
Re: org.apache.cxf.message.MAINTAIN_SESSION doesn't work
Posted by Daniel Kulp <dk...@apache.org>.
What are you using for the server side?
Can you wireshark the messages to make sure the cookies are properly being
passed?
Dan
On Wednesday 29 September 2010 3:43:52 am Krzysztof Grodzicki wrote:
> I tried with BindingProvider.SESSION_MAINTAIN_PROPERTY at first time,
> but I found that changing to
> org.apache.cxf.message.Message.MAINTAIN_SESSION will solve the problem
> -
> http://mail-archives.apache.org/mod_mbox/cxf-users/200909.mbox/<2009092214
> 34.51128.dkulp@apache.org>.
>
> Any other solution for this problem?
> ____________
> Best regards
> Kris
>
> On Wed, Sep 29, 2010 at 09:04, <ma...@samsix.com> wrote:
> > I can't tell from what you've shown, but it looks like
> > testServiceInterface is a port you retrieved from a class derived from
> > jax-ws Service. If this is true,
> > try using:
> >
> > BindingProvider.SESSION_MAINTAIN_PROPERTY
> >
> > instead of
> >
> > org.apache.cxf.message.Message.MAINTAIN_SESSION
> >
> > - Lucas
> >
> > Quoting Krzysztof Grodzicki <kg...@gmail.com>:
> >> Hi,
> >>
> >> I am trying to maintain a session using CXF MAINTAIN_SESSION
> >> functionality. It looks like this is not working properly. The code I
> >> use is listed below:
> >>
> >> """"
> >> // initialize service
> >>
> >> final BindingProvider bp = (BindingProvider) testServiceInterface;
> >> final Map<String, Object> map = bp.getRequestContext();
> >> map.put(BindingProvider.USERNAME_PROPERTY, "test");
> >> map.put(BindingProvider.PASSWORD_PROPERTY, "test");
> >> map.put(org.apache.cxf.message.Message.MAINTAIN_SESSION,
> >> Boolean.TRUE);
> >>
> >>
> >> testServiceInterface.createTestData(/* list of parameters*/); // 1
> >> call testServiceInterface.testServiceTransactionCommit(""); // 2 call
> >> """
> >>
> >> It seems that those two calls are run in different sessions. I'm using
> >> CXF in version 2.2.6 but I also tested it with newest one.
> >>
> >> Thanks in advance...
> >>
> >> ____________
> >> Best regards
> >> Kris
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: org.apache.cxf.message.MAINTAIN_SESSION doesn't work
Posted by Krzysztof Grodzicki <kg...@gmail.com>.
I tried with BindingProvider.SESSION_MAINTAIN_PROPERTY at first time,
but I found that changing to
org.apache.cxf.message.Message.MAINTAIN_SESSION will solve the problem
- http://mail-archives.apache.org/mod_mbox/cxf-users/200909.mbox/<20...@apache.org>.
Any other solution for this problem?
____________
Best regards
Kris
On Wed, Sep 29, 2010 at 09:04, <ma...@samsix.com> wrote:
> I can't tell from what you've shown, but it looks like testServiceInterface
> is a port you retrieved from a class derived from jax-ws Service. If this is
> true,
> try using:
>
> BindingProvider.SESSION_MAINTAIN_PROPERTY
>
> instead of
>
> org.apache.cxf.message.Message.MAINTAIN_SESSION
>
> - Lucas
>
> Quoting Krzysztof Grodzicki <kg...@gmail.com>:
>
>> Hi,
>>
>> I am trying to maintain a session using CXF MAINTAIN_SESSION
>> functionality. It looks like this is not working properly. The code I
>> use is listed below:
>>
>> """"
>> // initialize service
>>
>> final BindingProvider bp = (BindingProvider) testServiceInterface;
>> final Map<String, Object> map = bp.getRequestContext();
>> map.put(BindingProvider.USERNAME_PROPERTY, "test");
>> map.put(BindingProvider.PASSWORD_PROPERTY, "test");
>> map.put(org.apache.cxf.message.Message.MAINTAIN_SESSION, Boolean.TRUE);
>>
>>
>> testServiceInterface.createTestData(/* list of parameters*/); // 1 call
>> testServiceInterface.testServiceTransactionCommit(""); // 2 call
>> """
>>
>> It seems that those two calls are run in different sessions. I'm using
>> CXF in version 2.2.6 but I also tested it with newest one.
>>
>> Thanks in advance...
>>
>> ____________
>> Best regards
>> Kris
>>
>
>
>
>
Re: org.apache.cxf.message.MAINTAIN_SESSION doesn't work
Posted by ma...@samsix.com.
I can't tell from what you've shown, but it looks like
testServiceInterface is a port you retrieved from a class derived from
jax-ws Service. If this is true,
try using:
BindingProvider.SESSION_MAINTAIN_PROPERTY
instead of
org.apache.cxf.message.Message.MAINTAIN_SESSION
- Lucas
Quoting Krzysztof Grodzicki <kg...@gmail.com>:
> Hi,
>
> I am trying to maintain a session using CXF MAINTAIN_SESSION
> functionality. It looks like this is not working properly. The code I
> use is listed below:
>
> """"
> // initialize service
>
> final BindingProvider bp = (BindingProvider) testServiceInterface;
> final Map<String, Object> map = bp.getRequestContext();
> map.put(BindingProvider.USERNAME_PROPERTY, "test");
> map.put(BindingProvider.PASSWORD_PROPERTY, "test");
> map.put(org.apache.cxf.message.Message.MAINTAIN_SESSION, Boolean.TRUE);
>
>
> testServiceInterface.createTestData(/* list of parameters*/); // 1 call
> testServiceInterface.testServiceTransactionCommit(""); // 2 call
> """
>
> It seems that those two calls are run in different sessions. I'm using
> CXF in version 2.2.6 but I also tested it with newest one.
>
> Thanks in advance...
>
> ____________
> Best regards
> Kris
>