smashing!!
That gave me a real good idea..Now using what you have said,i can use HTTPSession for stateness of application and use stateless session ejbs...
 
By the way,i see init() and destroy() methods being called for every RPC method even when i set sessions/use sesions on client/server end..
Is it a normal behaviour[which means that for every new rpc request,jax-rpc runtime will be instantiating a new instance of service endpoint interface]
 
Thanks Again
Prashanth


Dies Koper <[EMAIL PROTECTED]> wrote:
Hello Prashanth,

Let your impl file implement the javax.xml.rpc.server.ServiceLifeycle
interface. Cast the object that gets passed to the init method to
javax.xml.rpc.server.ServletEndpointContext. In your busines s methods,
use its getHttpSession() method to get to the HTTP session object
associated with the client's method call.
(see JAX-RPC1.1 spec section 10.1 for details.)

Hope that helps,
Dies


prashanth shivakumar wrote:
> Hi Cyrille/robert,
>
> Thanks for your response!!
> There is nothing called "MessageContext.getCurrentContext()" in websphere
> soap engine!!
> Its only there in axis webservice engine.Dont know the
> reason.Therssomething called
> MessageContext.getCurrentThreadsContext() in one of the MessageContext
> classes[I say one because i found out 3 different MessageContext classes]
>
> I too got stuck into the problem of statefull/stateless webservices and
> after analysing a lot decided to go with "stateless session bean
> with maintaining state in HTTPSession object".
>
> If i go with POJO[simple stupid java beans],hows session maintainence being
> done there??How does it do session tracking??does it use cookies to do
> that??[jsessionID ??]
>
> Many Thanks
> Prashanth
>
>
>
> On 2/14/06, Cyrille Le Clerc <[EMAIL PROTECTED]>wrote:
>> Hi Prashanth ,
>>
>> It is strange to use stateless ejb for a stateful web service?
>>
>> Can you go stateful ? Do you really need ejbs ? Otherwise, simple
>> stupid java beans will gracefully do the job. Syntax will look like a
>> simple "MessageContext.getProperty()" or something like this that will
>> rely on the HttpSession ; I couldn't find Websphere SOAP library
>> documentation to check.
>>
>> Cyrille
>>
>> --
>> Cyrille Le Clerc
>> [EMAIL PROTECTED]
>> [EMAIL PROTECTED]
>>
>> On 2/14/06, prashanth shivakumar < [EMAIL PROTECTED]> wrote:
>>> Hi Cyrille,
>>> Thanks for your response.
>>> SInce iam using ejb endpoint[stateless session EJB] for webservice
>> implementation using ibm websphere,how can i get hold of MessageContext on
>> the server end inside stateless session bean??
>>> Many Thanks
>>>
>>>
>>>
>>>
>>> On 2/13/06, Cyrille Le Clerc <[EMAIL PROTECTED]>wrote:
>>>> Hello Prashanth,
>>>>
>>>> After your invocation, you have to play with
>>>> "binding._getCall().getMessageContext()" and then get properties
>>>> " HTTPConstants.HEADER_COOKIE" and " HTTPConstants.HEADER_COOKIE2".
>>>>
>>>> Here is a sample :
>>>> TestSessionBindingStub binding = (TestSessionBindingStub) new
>>>> testSessionServiceLocator().gettestSessionBinding();
>>>> binding.setMaintainSession(true);
>>>>
>>>> // invoke remote operation
>>>> String result = binding.aMethod();
>>>>
>>>> MessageContext messageContext =
>> binding._getCall().getMessageContext();
>>>> String cookie1 = (String)
>>>> messageContext.getProperty(HTTPConstants.HEADER_COOKIE);
>>>> String cookie2 = (String)
>>>> messageContext.getProperty(HTTPConstants.HEADER_COOKIE2);
>>>> System.out.println("cookie1=" + cookie1);
>>>> System.out.println ("cookie2=" + cookie2);
>>>>
>>>> Hope this helps,
>>>>
>>>> Cyrille
>>>>
>>>> --
>>>> Cyrille Le Clerc
>>>> [EMAIL PROTECTED]
>>>> [EMAIL PROTECTED]
>>>>
>>>> On 2/7/06, prashanth shivakumar <[EMAIL PROTECTED]>
>> wrote:
>>>>> Hello All,
>>>>> Is there any way wherein i can extract cookies from MessageContext
>> inside custom MessageHandler.
>>>>> I tried using msgContext.getProperty ("Cookie"); but it returns NULL
>>>>> Yes..I did set up sessions on both client/server and can see cookie
>> passing between client/server and viceversa
>>>>> Many Thanks
>

--
Dies KOPER <[EMAIL PROTECTED]>(changed on 1 July 2005)
Fujitsu Ltd - MWPF1 (changed from MWPF3 on 21 Nov 2005)
2-15-16, Shin-Yokohama, Kouhoku-ku, Yokohama, 222-0033, Japan
Tel. +81(45)-475-5605 (internal 7181-4217)



Meet your soulmate!
Yahoo! Asia presents Meetic - where millions of singles gather

Reply via email to