Yes in theory AFAIK MessageReceiver per Operation (MEP) make sense. It
make writing a Web Service bit complex. But as users are reusing the 
in built MessageReceiver I think that is ok. So Deepal shall we move
the messageReceiver attribute to the Opeartion level rather than at
the service level?

Thanks
Srinath

On 4/26/05, Jaliya Ekanayake <[EMAIL PROTECTED]> wrote:
> Chathura Herath wrote:
> 
> >Hi Jaliya, Deepal, all
> >
> >Its exactly my point, the MessgeReceiver is per MEP not per operation as the 
> >heading of this thread implies(nor its per service). MEP is a real pain and 
> >there is an unprecedented need for properly handling it.
> >
> >You are right about there is a need of a MessageReciever per given MEP and 
> >the fact that given service can have operations with different MEP can be 
> >resolved making sure we select the right receiver in the Dispatch phase. 
> >Anyway we are doing it now but apparently we have only the IN_OUT MEP 
> >Receiver and infact we are in the process of writing a general framework for 
> >MEPs. I.e. Proper figuring out of MEP aware receives and MEP aware 
> >MEPContexts.
> >So we are converging I think....
> >
> >Btw any thought of my use case stated in the earlier mail. Restating.. If 
> >both the ping operation and the echo operation requires to use the same 
> >transport (e.g. HTTP would be a likely) due to some external constraint like 
> >RM, we ll have to get the engine to reuse same transport for two or more 
> >different MEP.
> >
> >Is this a valid use case??
> >
> >Comments??
> >
> >Thanks,
> >Chathura
> >
> >________________________________________
> >From: Jaliya Ekanayake [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, April 21, 2005 5:22 PM
> >To: [email protected]
> >Subject: RE: [Axis2] Deploying MessageReceivers per Operation
> >
> >Hi Chathura, Deepal and All,
> >
> >I would like to pay your attention to the following class.
> >
> >public class MyService {
> >    public void ping(String pingStr){
> >        //Ping implementation
> >    }
> >
> >    public String echo(String echoStr){
> >       //Echo String implementatino
> >        return echoStr;
> >    }
> >}
> >
> >Now if we need to deploy this as a web service containing two operations 
> >(one with IN-ONLY MEP and the other with IN-OUT MEP) we are in trouble if we 
> >just allow the user to mention one message receiver per service.
> >
> >Further, I am referring to the following lines( in the Axis 1.2 JavaProvider)
> >
> >--------------------------------
> >
> >if (operation != null &&   operation.getMep() == OperationType.ONE_WAY) {
> >                msgContext.setResponseMessage(null);
> >            } else {
> >                Message        resMsg  = msgContext.getResponseMessage();
> >
> >-------------------------------
> >
> >Now in our MessageReceiver we don't need to check the operation type, since 
> >we have some special MEP aware MessageReceivers. Only problem is that we may 
> >have many operations in one service with different MEPs
> >
> >Comments?
> >
> >Thanks,
> >
> >Jaliya
> >
> >
> >________________________________________
> >From: Chathura Herath [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, April 21, 2005 2:48 PM
> >To: [email protected]
> >Subject: RE: [Axis2] Deploying MessageReceivers per Operation
> >
> >Hi Jaliya, Deepal, all
> >
> >I think we haven't looked at the problem in the correct angle. MEP and 
> >Operation have a one to many relation ship so it will not be right to say we 
> >let each operation have its own message receiver, neither it is correct to 
> >say we should have a message receivers per service because the MEP is 
> >defined per operation.
> >
> >Many Operation → use→ One MEP
> >
> >The problem that jaliya has pointed out is very valid and believe we need to 
> >give proper attention. But we have missed out one salient point here. The 
> >original MEP was an IN_ONLY MEP but since the operation requires secure 
> >conversation the security module need to send out a message  and get a 
> >message back.
> >The point in that in this case the security module has created a new 
> >MEP(OUT_IN if you consider this EPR to be a server or it's the client side 
> >of the IN_OUT MEP ) which is orthogonal to the original MEP IN_ONLY. Further 
> >more now the endpoint has two parallel MEP's running
> >1) Original IN_ONLY MEP :- This will have a receiver ? a InOnlyReceiver
> >2) OUT_IN MEP created by the security module :- This will have its own 
> >receiver. (Like a normal client)
> >
> >Now I believe there are no misunderstanding of having MessageReceivers 
> >because above two message receivers will be provided and this operation and 
> >the security module can use them. And any other service who has IN_ONLY MEP 
> >can use the above message receiver. Am I right?
> >
> >Complications come when you want to use the same transport to get everything 
> >done. That we have to figure out a way to get the engine to reuse our old 
> >same transport.
> >
> >Comments?
> >
> >Cheers
> >Chathura
> >
> >
> >________________________________________
> >From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, April 21, 2005 10:30 AM
> >To: [email protected]
> >Subject: Re: [Axis2] Deploying MessageReceivers per Operation
> >
> >Hi Jaliya;
> >
> >I think we can handle operation basic receivers inside Message receiver , 
> >that is because when some one implement a service he has to write a 
> >MessageReciver for his service  , so inside the messagereciver he can write 
> >all the logic he needs to handle operation basis reciever , that is inside 
> >messagereciver.recive() he can implement those logic.
> >
> >as an example
> >
> >MyReciver extends MessageReciver {
> >
> > public void recieve(MessageContext context){
> >    MyOperationReciever myop = new MyOperationReciever();
> >    myop.recieve(context);
> >  }
> >}
> >
> >
> >so if we do that in this way I think we do not need to define per operation 
> >basis receivers.
> >
> >Comments ....
> >
> >Deepal
> >
> >Hi All,
> >
> >According the current implementation of Axis2, when we deploy a service, we 
> >can specify one MessageReceiver (InOnlyMessageReceiver, InOutMessageReceiver 
> >etc..) per service. According to my understanding we should let the user to 
> >register one MessageReceiver per operation basis. Possible example would be 
> >as follows.
> >
> >We have a web service with IN-ONLY operation. However we need to let the 
> >service to implement the RequestSecurityToken operation according to the 
> >WS-SecCon. This operation is an IN-OUT operation. In this situation we have 
> >to register two message receivers to these two operations. In addition, the 
> >MEP is bind to an operation and the MessageReceiver is the one who is 
> >driving the MEP. So I think we have let each operation to have its own 
> >message receiver.
> >
> >thoughts ??
> >
> >Thanks,
> >
> >Jaliya
> >
> >
> >
> >
> >
> >
> >
> Hi Chathura,
> 
> IMHO, there may not be a use case similar to what you have mentioned.
> There may be a case for one MEP to use the same transport or different
> transports, but not between MEPs
> 
> Thanks,
> 
> Jaliya
>

Reply via email to