RE: howto avoid service isolation
I too have the same use case. I tried it with the get/set attributes, but could not make it work. Any advice on this will be very helpful. Thanks, Subhro. -Original Message- From: Stefan Lischke [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2008 8:01 PM To: axis-user@ws.apache.org Subject: howto avoid service isolation Hi, I have two Services, that needs to share a cache. How can i avoid service isolation so that both service are using the same object? thx in advance Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sharing data among services in same service group.
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: axis-user@ws.apache.org 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.xx..z.service.xmlbeans.MultiPortTypes2Skeleto n messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.xx..z.service.xmlbeans.MultiPortTypes2Message ReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.xx..z.service.xmlbeans.MultiPort Types2Skeleton/parameter parameter name=ServiceTCCL locked=falseservice/parameter /service service name=MultiPortTypes1 scope=transportsession class=com.xx..z.service.xmlbeans.MultiPortTypes1Skeleto n messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.xx..z.service.xmlbeans.MultiPortTypes1Message ReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.xx..z.service.xmlbeans.MultiPort Types1Skeleton/parameter parameter name=ServiceTCCL locked=falseservice/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, 10); 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
RE: Sharing data among services in same service group.
stub1 = new MultiPortTypes1Stub(http://localhost:8080/axis2/services/MultiPortTypes 1); stub1._getServiceClient().getOptions().setProperty(org.apache.axis2.tran sport.http.HTTPConstants.REUSE_HTTP_CLIENT,new Boolean(true)); stub1._getServiceClient().getOptions().setProperty(org.apache.axis2.tran sport.http.HTTPConstants.SO_TIMEOUT /* CONNECTION_TIMEOUT */,new Integer(720)); // 2hr for now. stub1._getServiceClient().getOptions().setTimeOutInMilliSeconds(720L ); stub1._getServiceClient().getOptions().setManageSession(true); stub2 = new MultiPortTypes2Stub(http://localhost:8080/axis2/services/MultiPortTypes 2); stub2._getServiceClient().getOptions().setProperty(org.apache.axis2.tran sport.http.HTTPConstants.REUSE_HTTP_CLIENT,new Boolean(true)); stub2._getServiceClient().getOptions().setProperty(org.apache.axis2.tran sport.http.HTTPConstants.SO_TIMEOUT /* CONNECTION_TIMEOUT */,new Integer(720)); // 2hr for now. stub2._getServiceClient().getOptions().setTimeOutInMilliSeconds(720L ); stub2._getServiceClient().getOptions().setManageSession(true); The browser is returning some XML Parsing error not only for this service but all other services as well. Is something wrong with the axis installation? Thanks, Subhro. From: keith chapman [mailto:[EMAIL PROTECTED] Sent: Thursday, May 08, 2008 1:15 PM To: axis-user@ws.apache.org Subject: Re: Sharing data among services in same service group. 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: axis-user@ws.apache.org 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.xx..z.service.xmlbeans.MultiPortTypes2Skeleto n messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.xx..z.service.xmlbeans.MultiPortTypes2Message ReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.xx..z.service.xmlbeans.MultiPort Types2Skeleton/parameter parameter name=ServiceTCCL locked=falseservice/parameter /service service name=MultiPortTypes1 scope=transportsession class=com.xx..z.service.xmlbeans.MultiPortTypes1Skeleto n messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.xx..z.service.xmlbeans.MultiPortTypes1Message ReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.xx..z.service.xmlbeans.MultiPort Types1Skeleton/parameter parameter name=ServiceTCCL locked=falseservice/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, 10); else System.out.println(\t\t SGC is null cannot set sesionId); SessionContext sc=mc.getSessionContext(); if(sc!=null) sc.setProperty(sessionId, sessiontransport
Sharing data among services in same service group.
Hi All, I have the following services.xml serviceGroup service name=MultiPortTypes2 scope=application class=com.xx..z.service.xmlbeans.MultiPortTypes2Skeleto n messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.xx..z.service.xmlbeans.MultiPortTypes2Message ReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.xx..z.service.xmlbeans.MultiPort Types2Skeleton/parameter parameter name=ServiceTCCL locked=falseservice/parameter /service service name=MultiPortTypes1 scope=transportsession class=com.xx..z.service.xmlbeans.MultiPortTypes1Skeleto n messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.xx..z.service.xmlbeans.MultiPortTypes1Message ReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.xx..z.service.xmlbeans.MultiPort Types1Skeleton/parameter parameter name=ServiceTCCL locked=falseservice/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, 10); 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.
Query regarding aar-maven-plugin
Hi All, Our team is using aar-maven-plugin to build .aar file. We see that all our dependencies are getting in the lib directory of the aar file. We do want some of these dependencies to go into the lib dir.. but not all of them. How do I restrict which files goes into the lib dir of the aar bundle? Please help. Thanks a lot in advance. Subhro.