How is your client implemented? as I said before transport sessions uses the HTTPSession to maintain state. So unless your client is using the same HTTPSessions this will not work. Try invoking the two services via a browser.
Thanks, Keith. On Thu, May 8, 2008 at 12:21 PM, Subhro Moitra (smoitra) <[EMAIL PROTECTED]> wrote: > Thanks Keith For replying. > I did what you said. Both the scopes are "transportsession". > > But still the stub2.newOperation1() call is returning null. > > Please help!! > > Thanks, > Subhro. > > ------------------------------ > *From:* keith chapman [mailto:[EMAIL PROTECTED] > *Sent:* Wednesday, May 07, 2008 8:54 PM > *To:* [email protected] > *Subject:* Re: Sharing data among services in same service group. > > Hi, > > I think the problem here is that the two services are in two scopes. When > transport session is used its the underlying transport that depends how the > session is managed. For e.g when http is used the HTTPSession is used to > manage the session. Can you try deploying both services on the same scope, > then this should work. > > Thanks, > Keith. > > On Wed, May 7, 2008 at 7:18 PM, Subhro Moitra (smoitra) <[EMAIL PROTECTED]> > wrote: > > > > > Hi All, > > > > I have the following services.xml > > > > <serviceGroup> > > <service name="MultiPortTypes2" scope="application" > > class="com.xxxxxxxxxx.yyyy.zzzzz.service.xmlbeans.MultiPortTypes2Skeleton"> > > <messageReceivers> > > <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" > > class="com.xxxxxxxxxx.yyyy.zzzzz.service.xmlbeans.MultiPortTypes2MessageReceiverInOut"/> > > </messageReceivers> > > <parameter > > name="ServiceClass">com.xxxxxxxxxx.yyyy.zzzzz.service.xmlbeans.MultiPortTypes2Skeleton</parameter> > > <parameter name="ServiceTCCL" locked="false">service</parameter> > > </service> > > <service name="MultiPortTypes1" scope="transportsession" > > class="com.xxxxxxxxxx.yyyy.zzzzz.service.xmlbeans.MultiPortTypes1Skeleton"> > > <messageReceivers> > > <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" > > class="com.xxxxxxxxxx.yyyy.zzzzz.service.xmlbeans.MultiPortTypes1MessageReceiverInOut"/> > > </messageReceivers> > > <parameter > > name="ServiceClass">com.xxxxxxxxxx.yyyy.zzzzz.service.xmlbeans.MultiPortTypes1Skeleton</parameter> > > <parameter name="ServiceTCCL" locked="false">service</parameter> > > </service> > > </serviceGroup> > > > > > > How can i share data between "MultiPortTypes1" and "MultiPortTypes2"? > > > > > > In MultiPortTypes1 we have an operation with the below code. > > MessageContext mc=MessageContext.getCurrentMessageContext(); > > if(mc!=null){ > > ServiceGroupContext sgc=mc.getServiceGroupContext(); > > if(sgc!=null)sgc.setProperty("sessionId", "100000"); > > else System.out.println("\t\t SGC is null cannot set sesionId"); > > > > SessionContext sc=mc.getSessionContext(); > > if(sc!=null) sc.setProperty("sessionId", "sessiontransport"); > > else System.out.println("\t\t session context is null cannot set > > sessionId"); > > > > } > > > > In MultiPortTypes2 we have an operation with the below code: > > > > MessageContext mc=MessageContext.getCurrentMessageContext(); > > if(mc!=null){ > > System.out.println("\t\t MCCtx: "+mc.getProperty("sessionId")); > > ServiceGroupContext sgc=mc.getServiceGroupContext(); > > if(sgc!=null) System.out.println(" \t\t ServiceGroupContext: > > "+sgc.getProperty("sessionId")); > > else System.out.println("\t\t SGC is null"); > > > > SessionContext sc=mc.getSessionContext(); > > if(sc!=null) System.out.println("\t\t sessionContext: > > "+sc.getProperty("sessionId")); > > else System.out.println("\t\t session context is null cannot set > > sessionId"); > > > > } > > > > The output for "MultiPortTypes2 " is null. Please help. > > > > Thanks, > > Subhro. > > > > > > -- > Keith Chapman > Senior Software Engineer > WSO2 Inc. > Oxygenating the Web Service Platform. > http://wso2.org/ > > blog: http://www.keith-chapman.org > -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
