You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Angel Todorov <at...@gmail.com> on 2007/01/12 17:32:49 UTC
Custom Message Receiver use cases
Hi Axis2 developers,
I am interested to know what is the motivation behind using custom
message receivers? For example, if I want to invoke non-java
operations, I can have a helper Java class which manages all this
logic, and still be invoked by one of the existing message receivers,
such as the raw XML message receivers.
Thanks very much for your feedback in advance.
Regards,
Angel
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by robert lazarski <ro...@gmail.com>.
In the axis2 case and the examples in the tutorial, ie, general use,
none of the MR methods are controlled by spring, nor are the methods
defined in service.xml . Even if it were, the end result would be the
same since the idea is an object loaded by ServiceObjectSupplier has
the same exact behavior as a class instatiated at runtime by
AbstractMethodReceiver, only in the former case you have the ability
to let an external framework load and decorate the Service first
however it sees fit.
Anyways, so the end result of a Service class at runtime is its
defined by the MR. The OMElement signature of getValue() - as shown in
the tutorial - is left to the MR just fine. Overriding the
findOperation() is not necessary nor desired, because that is a low
level detail encapsulated from the Spring / Axis2 goal - letting
Spring inject dependencies for a service class independant of
whichever MR is choosen and axis2 defines. So you could use
RawXMLINOutMessageReceiver, an MR generated from DataBinding, or any
one of the MR's axis2 offers, and there would be no difference as
spring is concerned because all it does in this case is inject
dependencies.
HTH,
Robert
On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> Hi Sanka,
>
> Yes that's what i meant - that the default Raw XML Message Receivers
> are restrictive in terms of method signatures. They require that you
> structure your code in a specific way, which leads to unnecesary code
> generation and wrapping - as you said , i must be able to construct
> the SOAP response in any way i want.
>
> I still don't get how Spring overcomes this issue, as they don't
> override the findOperation() in the message receiver default
> implementations, which means the default message receiver still looks
> for an OMElement based signature.
>
> Regards,
> Angel
>
> On 1/13/07, Sanka Samaranayake <ss...@gmail.com> wrote:
> >
> > Hi,
> >
> > You don't necessarily have to have 1:1 operation mapping. You are free to
> > create the response message (if there is a response) any way you want, may
> > be using few library functions.
> >
> > The easy way to write a custom MessageReceiver is to extends one of the
> > abstract MessageReceivers depending on your requirements. You can construct
> > the response the way you want and set it in out MessageContext.
> >
> > Hope this will help ..
> >
> > Sanka
> >
> >
> >
> >
> > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > Hi Paul,
> > >
> > > I've read this doc:
> > >
> > > http://ws.apache.org/axis2/1_1/spring.html
> > >
> > > And I can see the integration with Spring uses the default Axis2
> > > RawXMLINOutMessageReceiver. I get what you're saying but can't see
> > > anywhere a custom Spring message receiver. In the document above, one
> > > doesn't avoid having 1:1 operation <-> java method mapping - i.e one
> > > still generates java code that wraps around existing functionality and
> > > that can be otherwise avoided. Is that correct? Thanks.
> > >
> > > Regards,
> > > Angel
> > >
> > > On 1/13/07, Paul Fremantle < pzfreo@gmail.com> wrote:
> > > > Two points:
> > > >
> > > > 1) the ability to plug in custom message receivers is to handle the
> > > > cases where you want to enable a whole class of services. For example,
> > > > the Spring message receiver allows any Spring bean to be exposed.
> > > > Another example is an EJB session bean message receiver that enables
> > > > EJB session beans to be exposed. To do this with the existing message
> > > > receivers would mean each user writing the code to handle Spring or
> > > > EJB calls. (Which is ok, but not so nice).
> > > >
> > > > 2) WSDL2Java generates custom message receivers because they are
> > > > slightly more efficient than the dynamic approach taken by the RPC
> > > > message receiver.
> > > >
> > > > Paul
> > > >
> > > > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > > > Hi ,
> > > > >
> > > > > Well i was thinking that , assuming the RPC Message Receiver is
> > > > > inadequate for more complex input and output datatypes , we are only
> > > > > left with the RAW XML Message receivers, which assume that one has a
> > > > > compiled java class with a method parameter signature accepting
> > > > > OMElement and returning an OM Element, and a method name which should
> > > > > be *the same* as the name of the operation name. (at least that can be
> > > > > seen from the RawXML MessageReceiver implementations in Axis2, more
> > > > > specifically in the findOperation impl).
> > > > >
> > > > > So maybe if I don't want to restrict my java impl classes to have the
> > > > > same method names as the operation names , I should write a custom
> > > > > Message Receiver.
> > > > >
> > > > > Can anyone clarify this point? Thanks.
> > > > >
> > > > > Best Regards,
> > > > > Angel
> > > > >
> > > > > On 1/13/07, Comain Chen < comain@gmail.com> wrote:
> > > > > > To give the user freedom to decide their own Databinding techniques?
> > > > > >
> > > > > > Also I have this doubt, why does the codegen module generate
> > MessageReceiver
> > > > > > for each Service, not let the binding framework write a general
> > > > > > messageReceiver for all services?
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 1/13/07, Angel Todorov < attodorov@gmail.com> wrote:
> > > > > > >
> > > > > > > Hi Axis2 developers,
> > > > > > >
> > > > > > > I am interested to know what is the motivation behind using custom
> > > > > > > message receivers? For example, if I want to invoke non-java
> > > > > > > operations, I can have a helper Java class which manages all this
> > > > > > > logic, and still be invoked by one of the existing message
> > receivers,
> > > > > > > such as the raw XML message receivers.
> > > > > > >
> > > > > > > Thanks very much for your feedback in advance.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Angel
> > > > > > >
> > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > > > axis-dev-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Best regrads,
> > > > > > Comain Chen
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Paul Fremantle
> > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > >
> > > > http://bloglines.com/blog/paulfremantle
> > > > paul@wso2.com
> > > >
> > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Sanka Samaranayake
> > WSO2 Inc.
> >
> > http://sankas.blogspot.com/
> > http://www.wso2.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Angel Todorov <at...@gmail.com>.
Hi Sanka,
Yes that's what i meant - that the default Raw XML Message Receivers
are restrictive in terms of method signatures. They require that you
structure your code in a specific way, which leads to unnecesary code
generation and wrapping - as you said , i must be able to construct
the SOAP response in any way i want.
I still don't get how Spring overcomes this issue, as they don't
override the findOperation() in the message receiver default
implementations, which means the default message receiver still looks
for an OMElement based signature.
Regards,
Angel
On 1/13/07, Sanka Samaranayake <ss...@gmail.com> wrote:
>
> Hi,
>
> You don't necessarily have to have 1:1 operation mapping. You are free to
> create the response message (if there is a response) any way you want, may
> be using few library functions.
>
> The easy way to write a custom MessageReceiver is to extends one of the
> abstract MessageReceivers depending on your requirements. You can construct
> the response the way you want and set it in out MessageContext.
>
> Hope this will help ..
>
> Sanka
>
>
>
>
> On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > Hi Paul,
> >
> > I've read this doc:
> >
> > http://ws.apache.org/axis2/1_1/spring.html
> >
> > And I can see the integration with Spring uses the default Axis2
> > RawXMLINOutMessageReceiver. I get what you're saying but can't see
> > anywhere a custom Spring message receiver. In the document above, one
> > doesn't avoid having 1:1 operation <-> java method mapping - i.e one
> > still generates java code that wraps around existing functionality and
> > that can be otherwise avoided. Is that correct? Thanks.
> >
> > Regards,
> > Angel
> >
> > On 1/13/07, Paul Fremantle < pzfreo@gmail.com> wrote:
> > > Two points:
> > >
> > > 1) the ability to plug in custom message receivers is to handle the
> > > cases where you want to enable a whole class of services. For example,
> > > the Spring message receiver allows any Spring bean to be exposed.
> > > Another example is an EJB session bean message receiver that enables
> > > EJB session beans to be exposed. To do this with the existing message
> > > receivers would mean each user writing the code to handle Spring or
> > > EJB calls. (Which is ok, but not so nice).
> > >
> > > 2) WSDL2Java generates custom message receivers because they are
> > > slightly more efficient than the dynamic approach taken by the RPC
> > > message receiver.
> > >
> > > Paul
> > >
> > > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > > Hi ,
> > > >
> > > > Well i was thinking that , assuming the RPC Message Receiver is
> > > > inadequate for more complex input and output datatypes , we are only
> > > > left with the RAW XML Message receivers, which assume that one has a
> > > > compiled java class with a method parameter signature accepting
> > > > OMElement and returning an OM Element, and a method name which should
> > > > be *the same* as the name of the operation name. (at least that can be
> > > > seen from the RawXML MessageReceiver implementations in Axis2, more
> > > > specifically in the findOperation impl).
> > > >
> > > > So maybe if I don't want to restrict my java impl classes to have the
> > > > same method names as the operation names , I should write a custom
> > > > Message Receiver.
> > > >
> > > > Can anyone clarify this point? Thanks.
> > > >
> > > > Best Regards,
> > > > Angel
> > > >
> > > > On 1/13/07, Comain Chen < comain@gmail.com> wrote:
> > > > > To give the user freedom to decide their own Databinding techniques?
> > > > >
> > > > > Also I have this doubt, why does the codegen module generate
> MessageReceiver
> > > > > for each Service, not let the binding framework write a general
> > > > > messageReceiver for all services?
> > > > >
> > > > >
> > > > >
> > > > > On 1/13/07, Angel Todorov < attodorov@gmail.com> wrote:
> > > > > >
> > > > > > Hi Axis2 developers,
> > > > > >
> > > > > > I am interested to know what is the motivation behind using custom
> > > > > > message receivers? For example, if I want to invoke non-java
> > > > > > operations, I can have a helper Java class which manages all this
> > > > > > logic, and still be invoked by one of the existing message
> receivers,
> > > > > > such as the raw XML message receivers.
> > > > > >
> > > > > > Thanks very much for your feedback in advance.
> > > > > >
> > > > > > Regards,
> > > > > > Angel
> > > > > >
> > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > > axis-dev-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Best regrads,
> > > > > Comain Chen
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > >
> > > http://bloglines.com/blog/paulfremantle
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Sanka Samaranayake
> WSO2 Inc.
>
> http://sankas.blogspot.com/
> http://www.wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Sanka Samaranayake <ss...@gmail.com>.
Hi,
You don't necessarily have to have 1:1 operation mapping. You are free to
create the response message (if there is a response) any way you want, may
be using few library functions.
The easy way to write a custom MessageReceiver is to extends one of the
abstract MessageReceivers depending on your requirements. You can construct
the response the way you want and set it in out MessageContext.
Hope this will help ..
Sanka
On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
>
> Hi Paul,
>
> I've read this doc:
>
> http://ws.apache.org/axis2/1_1/spring.html
>
> And I can see the integration with Spring uses the default Axis2
> RawXMLINOutMessageReceiver. I get what you're saying but can't see
> anywhere a custom Spring message receiver. In the document above, one
> doesn't avoid having 1:1 operation <-> java method mapping - i.e one
> still generates java code that wraps around existing functionality and
> that can be otherwise avoided. Is that correct? Thanks.
>
> Regards,
> Angel
>
> On 1/13/07, Paul Fremantle <pz...@gmail.com> wrote:
> > Two points:
> >
> > 1) the ability to plug in custom message receivers is to handle the
> > cases where you want to enable a whole class of services. For example,
> > the Spring message receiver allows any Spring bean to be exposed.
> > Another example is an EJB session bean message receiver that enables
> > EJB session beans to be exposed. To do this with the existing message
> > receivers would mean each user writing the code to handle Spring or
> > EJB calls. (Which is ok, but not so nice).
> >
> > 2) WSDL2Java generates custom message receivers because they are
> > slightly more efficient than the dynamic approach taken by the RPC
> > message receiver.
> >
> > Paul
> >
> > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > Hi ,
> > >
> > > Well i was thinking that , assuming the RPC Message Receiver is
> > > inadequate for more complex input and output datatypes , we are only
> > > left with the RAW XML Message receivers, which assume that one has a
> > > compiled java class with a method parameter signature accepting
> > > OMElement and returning an OM Element, and a method name which should
> > > be *the same* as the name of the operation name. (at least that can be
> > > seen from the RawXML MessageReceiver implementations in Axis2, more
> > > specifically in the findOperation impl).
> > >
> > > So maybe if I don't want to restrict my java impl classes to have the
> > > same method names as the operation names , I should write a custom
> > > Message Receiver.
> > >
> > > Can anyone clarify this point? Thanks.
> > >
> > > Best Regards,
> > > Angel
> > >
> > > On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> > > > To give the user freedom to decide their own Databinding techniques?
> > > >
> > > > Also I have this doubt, why does the codegen module generate
> MessageReceiver
> > > > for each Service, not let the binding framework write a general
> > > > messageReceiver for all services?
> > > >
> > > >
> > > >
> > > > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > > >
> > > > > Hi Axis2 developers,
> > > > >
> > > > > I am interested to know what is the motivation behind using custom
> > > > > message receivers? For example, if I want to invoke non-java
> > > > > operations, I can have a helper Java class which manages all this
> > > > > logic, and still be invoked by one of the existing message
> receivers,
> > > > > such as the raw XML message receivers.
> > > > >
> > > > > Thanks very much for your feedback in advance.
> > > > >
> > > > > Regards,
> > > > > Angel
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > axis-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Best regrads,
> > > > Comain Chen
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Sanka Samaranayake
WSO2 Inc.
http://sankas.blogspot.com/
http://www.wso2.org/
Re: Custom Message Receiver use cases
Posted by robert lazarski <ro...@gmail.com>.
Spring doesn't currently have its own message receiver. It did for a
short period of time, but an alternative idea was implemented as a
message receiver (MR) carries a lot of responsibilty and code, and in
the spring case alot of code was duplicated to just achieve the idea
of a spring bean being injected into a service.
What spring in axis2 does is it "implements ServiceObjectSupplier" .
The AbstractMessageReceiver checks to see if
Constants.SERVICE_OBJECT_SUPPLIER is set , and then, instead of
instantiating via reflection the Service class, if allows the
ServiceObjectSupplier to supply an already loaded object.
ServiceObjectSupplier takes advantage of the fact that currently all
MR's extend AbstractMessageReceiver, and therefore, any MR can be
used. The end result being that any axis2 service has the capability
to have a pre-loaded object.
HTH,
Robert
On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> Hi Paul,
>
> I've read this doc:
>
> http://ws.apache.org/axis2/1_1/spring.html
>
> And I can see the integration with Spring uses the default Axis2
> RawXMLINOutMessageReceiver. I get what you're saying but can't see
> anywhere a custom Spring message receiver. In the document above, one
> doesn't avoid having 1:1 operation <-> java method mapping - i.e one
> still generates java code that wraps around existing functionality and
> that can be otherwise avoided. Is that correct? Thanks.
>
> Regards,
> Angel
>
> On 1/13/07, Paul Fremantle <pz...@gmail.com> wrote:
> > Two points:
> >
> > 1) the ability to plug in custom message receivers is to handle the
> > cases where you want to enable a whole class of services. For example,
> > the Spring message receiver allows any Spring bean to be exposed.
> > Another example is an EJB session bean message receiver that enables
> > EJB session beans to be exposed. To do this with the existing message
> > receivers would mean each user writing the code to handle Spring or
> > EJB calls. (Which is ok, but not so nice).
> >
> > 2) WSDL2Java generates custom message receivers because they are
> > slightly more efficient than the dynamic approach taken by the RPC
> > message receiver.
> >
> > Paul
> >
> > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > Hi ,
> > >
> > > Well i was thinking that , assuming the RPC Message Receiver is
> > > inadequate for more complex input and output datatypes , we are only
> > > left with the RAW XML Message receivers, which assume that one has a
> > > compiled java class with a method parameter signature accepting
> > > OMElement and returning an OM Element, and a method name which should
> > > be *the same* as the name of the operation name. (at least that can be
> > > seen from the RawXML MessageReceiver implementations in Axis2, more
> > > specifically in the findOperation impl).
> > >
> > > So maybe if I don't want to restrict my java impl classes to have the
> > > same method names as the operation names , I should write a custom
> > > Message Receiver.
> > >
> > > Can anyone clarify this point? Thanks.
> > >
> > > Best Regards,
> > > Angel
> > >
> > > On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> > > > To give the user freedom to decide their own Databinding techniques?
> > > >
> > > > Also I have this doubt, why does the codegen module generate MessageReceiver
> > > > for each Service, not let the binding framework write a general
> > > > messageReceiver for all services?
> > > >
> > > >
> > > >
> > > > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > > >
> > > > > Hi Axis2 developers,
> > > > >
> > > > > I am interested to know what is the motivation behind using custom
> > > > > message receivers? For example, if I want to invoke non-java
> > > > > operations, I can have a helper Java class which manages all this
> > > > > logic, and still be invoked by one of the existing message receivers,
> > > > > such as the raw XML message receivers.
> > > > >
> > > > > Thanks very much for your feedback in advance.
> > > > >
> > > > > Regards,
> > > > > Angel
> > > > >
> > > > >
> > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > axis-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Best regrads,
> > > > Comain Chen
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Angel Todorov <at...@gmail.com>.
Hi Paul,
I've read this doc:
http://ws.apache.org/axis2/1_1/spring.html
And I can see the integration with Spring uses the default Axis2
RawXMLINOutMessageReceiver. I get what you're saying but can't see
anywhere a custom Spring message receiver. In the document above, one
doesn't avoid having 1:1 operation <-> java method mapping - i.e one
still generates java code that wraps around existing functionality and
that can be otherwise avoided. Is that correct? Thanks.
Regards,
Angel
On 1/13/07, Paul Fremantle <pz...@gmail.com> wrote:
> Two points:
>
> 1) the ability to plug in custom message receivers is to handle the
> cases where you want to enable a whole class of services. For example,
> the Spring message receiver allows any Spring bean to be exposed.
> Another example is an EJB session bean message receiver that enables
> EJB session beans to be exposed. To do this with the existing message
> receivers would mean each user writing the code to handle Spring or
> EJB calls. (Which is ok, but not so nice).
>
> 2) WSDL2Java generates custom message receivers because they are
> slightly more efficient than the dynamic approach taken by the RPC
> message receiver.
>
> Paul
>
> On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > Hi ,
> >
> > Well i was thinking that , assuming the RPC Message Receiver is
> > inadequate for more complex input and output datatypes , we are only
> > left with the RAW XML Message receivers, which assume that one has a
> > compiled java class with a method parameter signature accepting
> > OMElement and returning an OM Element, and a method name which should
> > be *the same* as the name of the operation name. (at least that can be
> > seen from the RawXML MessageReceiver implementations in Axis2, more
> > specifically in the findOperation impl).
> >
> > So maybe if I don't want to restrict my java impl classes to have the
> > same method names as the operation names , I should write a custom
> > Message Receiver.
> >
> > Can anyone clarify this point? Thanks.
> >
> > Best Regards,
> > Angel
> >
> > On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> > > To give the user freedom to decide their own Databinding techniques?
> > >
> > > Also I have this doubt, why does the codegen module generate MessageReceiver
> > > for each Service, not let the binding framework write a general
> > > messageReceiver for all services?
> > >
> > >
> > >
> > > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > > >
> > > > Hi Axis2 developers,
> > > >
> > > > I am interested to know what is the motivation behind using custom
> > > > message receivers? For example, if I want to invoke non-java
> > > > operations, I can have a helper Java class which manages all this
> > > > logic, and still be invoked by one of the existing message receivers,
> > > > such as the raw XML message receivers.
> > > >
> > > > Thanks very much for your feedback in advance.
> > > >
> > > > Regards,
> > > > Angel
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > axis-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Best regrads,
> > > Comain Chen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Paul Fremantle <pz...@gmail.com>.
Two points:
1) the ability to plug in custom message receivers is to handle the
cases where you want to enable a whole class of services. For example,
the Spring message receiver allows any Spring bean to be exposed.
Another example is an EJB session bean message receiver that enables
EJB session beans to be exposed. To do this with the existing message
receivers would mean each user writing the code to handle Spring or
EJB calls. (Which is ok, but not so nice).
2) WSDL2Java generates custom message receivers because they are
slightly more efficient than the dynamic approach taken by the RPC
message receiver.
Paul
On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> Hi ,
>
> Well i was thinking that , assuming the RPC Message Receiver is
> inadequate for more complex input and output datatypes , we are only
> left with the RAW XML Message receivers, which assume that one has a
> compiled java class with a method parameter signature accepting
> OMElement and returning an OM Element, and a method name which should
> be *the same* as the name of the operation name. (at least that can be
> seen from the RawXML MessageReceiver implementations in Axis2, more
> specifically in the findOperation impl).
>
> So maybe if I don't want to restrict my java impl classes to have the
> same method names as the operation names , I should write a custom
> Message Receiver.
>
> Can anyone clarify this point? Thanks.
>
> Best Regards,
> Angel
>
> On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> > To give the user freedom to decide their own Databinding techniques?
> >
> > Also I have this doubt, why does the codegen module generate MessageReceiver
> > for each Service, not let the binding framework write a general
> > messageReceiver for all services?
> >
> >
> >
> > On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> > >
> > > Hi Axis2 developers,
> > >
> > > I am interested to know what is the motivation behind using custom
> > > message receivers? For example, if I want to invoke non-java
> > > operations, I can have a helper Java class which manages all this
> > > logic, and still be invoked by one of the existing message receivers,
> > > such as the raw XML message receivers.
> > >
> > > Thanks very much for your feedback in advance.
> > >
> > > Regards,
> > > Angel
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Best regrads,
> > Comain Chen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
http://bloglines.com/blog/paulfremantle
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Re: Custom Message Receiver use cases
Posted by Sanka Samaranayake <ss...@gmail.com>.
On 1/14/07, Angel Todorov <at...@gmail.com> wrote:
>
> Hi Eran,
>
> I agree about the custom MEPs and using reflection. What I would like
> to clarify is whether the raw XML message receiver not only uses
> reflection, but always expect a certain method signature in the
> reflected classes, is that so? Suppose I have some hashtable with
> mappings of service operation => actual method signature. I.e my
> operation is sayHello but my actual implementation would need to
> invoke SAY_HELLO(...) . Then , as far as i understood from the talk
> above, the Raw XML Message receiver would fail since the
> reflection-based search in findOperation() would not succeed. Thanks
This would fail. What you can do is write a Custom Message Receiver that
extends AbstractInOutSynMessageReceiver (assuming the MEP of sayHello is
IN-OUT) and associate it with that operation via serivces.xml. At the time
invocation of invokeBusinessLogic() method in your MR you can call
SAY_HELLO() and constract the output accordingly. In fact you are free to
use any methods of any libaray (provided they are accessible via appropriate
ClassLoader).
Does that answer your problem?
Sanka
Regards,
> Angel
>
> On 1/14/07, comain <co...@gmail.com> wrote:
> >
> >
> > Yes,it works just as perfect as you said. That is really cool.
> >
> > However, if we are using POJO based web services with RPC MR (as the
> > quickstart example), it works with a lot of reflections indeed. As a
> > developer, since I konw
> > little about WSDL, the way I prefer is to write POJOs with my own
> business
> > logic first, then deploy it as a ws with a default service.xml. In this
> > case(maybe
> > the common case), does Axis2 has no way but using reflections all
> around?
> >
> > If this is a problem, we may work around in the following ways:
> >
> > A possible work around is, the developer first write its own
> > skeleton(dummy), then using java2wsdl to generate wsdl for him, then
> using
> > code gen with ADB to generate effective
> > sevice skeleton, after which developer now adding his business logic.
> >
> > Or change the code gen module not using WSDL information, but Service
> > Classes directly(Since wsdl can generate from service class). In this
> case,
> > developer need not to
> > provide wsdl before write his service, but write the service with his
> own
> > will, then using the ADB code gen to generate necessay auxiliary classes
> > directly.
> >
> > If this is not a problem, can you kindly point out how does axis2
> elegantly
> > handle this case?
> >
> > Great thanks, Eran.
> >
> >
> > ________________________________
> >
> > comain
> > 2007-01-14
> > ________________________________
> >
> > 发件人: Eran Chinthaka
> > 发送时间: 2007-01-14 13:17:51
> > 收件人: axis-dev@ws.apache.org
> > 抄送:
> > 主题: Re: Custom Message Receiver use cases
> >
> >
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Comain Chen wrote:
> > > Hi, Eran
> > >
> > > I am quite interested in your 2nd reason.
> > >
> > > However, it seems that you can only avoid using
> > java reflection during
> > > operation routing. Before it starts to invoke the
> > specific operation, it
> > > has to deserialize the XML document into
> > corresponding operation
> > > parameter objetcs, which will use Java
> > reflection(If you use any binding
> > > frameworks, such as ADB, JAXB, etc.), and is
> > more performance critical.
> >
> > Well, we do not do that, at least in ADB.
> >
> > The ADB data objects, that are code gen'ed directly works
> > on StAX. What
> > you have, when you are just about to de-serialize, is
> > a StAX reader,
> > from the input stream. ADB is designed to work with
> > StAX. IIRC, we do
> > not need reflection in this case.
> >
> > > Of course, if you decide to write your own data
> > binding with RawXMLMR,
> > > you can still avoid this with a lot of painful work.
> >
> >
> > I totally agree with you. But most people do not want
> > to get in to the
> > hazel of writing yet another data binding framework.
> > We know, from
> > experience, how difficult it was :).
> > And 95% of the people, in my guess, like to work with
> > java objects, than
> > with raw XML.
> >
> > - -- Chinthaka
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.3 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla -
> > http://enigmail.mozdev.org
> >
> > iD8DBQFFqbzYjON2uBzUhh8RAiptAKCVz+7gviwJzMHbiqF9KobMaO/gzgCfWbIE
> > KD9WF5amy+NyeqF/MyibAKQ=
> > =81vD
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-dev-help@ws.apache.org
> >
>
--
Sanka Samaranayake
WSO2 Inc.
http://sankas.blogspot.com/
http://www.wso2.org/
Re: Re: Custom Message Receiver use cases
Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi,
RawXMLINOnly/RawXMLINOut MRs work with reflection if only following method
signatures present in the service impl,
1. public void foo(OMElement element) [throws SomeExceptions]
2. public OMElement bar(OMElement element) throws SomeExceptions]
"element" always gets the first child of the soap body.
In your case; you'll have to have a custom message receiver with your
mapping tables. In order to dispatching to work properly, you'll have to
specify the correct operation name/action mapping in your services.xml.
Once dispatched you could do "I.e my
operation is sayHello but my actual implementation would need to
invoke SAY_HELLO(...) " with your MRS mapping tables and reflection logic.
Thank you
Saminda
On 1/14/07, Angel Todorov <at...@gmail.com> wrote:
>
> Hi Eran,
>
> I agree about the custom MEPs and using reflection. What I would like
> to clarify is whether the raw XML message receiver not only uses
> reflection, but always expect a certain method signature in the
> reflected classes, is that so? Suppose I have some hashtable with
> mappings of service operation => actual method signature. I.e my
> operation is sayHello but my actual implementation would need to
> invoke SAY_HELLO(...) . Then , as far as i understood from the talk
> above, the Raw XML Message receiver would fail since the
> reflection-based search in findOperation() would not succeed. Thanks
>
> Regards,
> Angel
>
> On 1/14/07, comain <co...@gmail.com> wrote:
> >
> >
> > Yes,it works just as perfect as you said. That is really cool.
> >
> > However, if we are using POJO based web services with RPC MR (as the
> > quickstart example), it works with a lot of reflections indeed. As a
> > developer, since I konw
> > little about WSDL, the way I prefer is to write POJOs with my own
> business
> > logic first, then deploy it as a ws with a default service.xml. In this
> > case(maybe
> > the common case), does Axis2 has no way but using reflections all
> around?
> >
> > If this is a problem, we may work around in the following ways:
> >
> > A possible work around is, the developer first write its own
> > skeleton(dummy), then using java2wsdl to generate wsdl for him, then
> using
> > code gen with ADB to generate effective
> > sevice skeleton, after which developer now adding his business logic.
> >
> > Or change the code gen module not using WSDL information, but Service
> > Classes directly(Since wsdl can generate from service class). In this
> case,
> > developer need not to
> > provide wsdl before write his service, but write the service with his
> own
> > will, then using the ADB code gen to generate necessay auxiliary classes
> > directly.
> >
> > If this is not a problem, can you kindly point out how does axis2
> elegantly
> > handle this case?
> >
> > Great thanks, Eran.
> >
> >
> > ________________________________
> >
> > comain
> > 2007-01-14
> > ________________________________
> >
> > 发件人: Eran Chinthaka
> > 发送时间: 2007-01-14 13:17:51
> > 收件人: axis-dev@ws.apache.org
> > 抄送:
> > 主题: Re: Custom Message Receiver use cases
> >
> >
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Comain Chen wrote:
> > > Hi, Eran
> > >
> > > I am quite interested in your 2nd reason.
> > >
> > > However, it seems that you can only avoid using
> > java reflection during
> > > operation routing. Before it starts to invoke the
> > specific operation, it
> > > has to deserialize the XML document into
> > corresponding operation
> > > parameter objetcs, which will use Java
> > reflection(If you use any binding
> > > frameworks, such as ADB, JAXB, etc.), and is
> > more performance critical.
> >
> > Well, we do not do that, at least in ADB.
> >
> > The ADB data objects, that are code gen'ed directly works
> > on StAX. What
> > you have, when you are just about to de-serialize, is
> > a StAX reader,
> > from the input stream. ADB is designed to work with
> > StAX. IIRC, we do
> > not need reflection in this case.
> >
> > > Of course, if you decide to write your own data
> > binding with RawXMLMR,
> > > you can still avoid this with a lot of painful work.
> >
> >
> > I totally agree with you. But most people do not want
> > to get in to the
> > hazel of writing yet another data binding framework.
> > We know, from
> > experience, how difficult it was :).
> > And 95% of the people, in my guess, like to work with
> > java objects, than
> > with raw XML.
> >
> > - -- Chinthaka
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.3 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla -
> > http://enigmail.mozdev.org
> >
> > iD8DBQFFqbzYjON2uBzUhh8RAiptAKCVz+7gviwJzMHbiqF9KobMaO/gzgCfWbIE
> > KD9WF5amy+NyeqF/MyibAKQ=
> > =81vD
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-dev-help@ws.apache.org
> >
>
--
Saminda Abeyruwan
Software Engineer
WSO2 Inc. - www.wso2.org
Re: Re: Custom Message Receiver use cases
Posted by Angel Todorov <at...@gmail.com>.
Hi Eran,
I agree about the custom MEPs and using reflection. What I would like
to clarify is whether the raw XML message receiver not only uses
reflection, but always expect a certain method signature in the
reflected classes, is that so? Suppose I have some hashtable with
mappings of service operation => actual method signature. I.e my
operation is sayHello but my actual implementation would need to
invoke SAY_HELLO(...) . Then , as far as i understood from the talk
above, the Raw XML Message receiver would fail since the
reflection-based search in findOperation() would not succeed. Thanks
Regards,
Angel
On 1/14/07, comain <co...@gmail.com> wrote:
>
>
> Yes,it works just as perfect as you said. That is really cool.
>
> However, if we are using POJO based web services with RPC MR (as the
> quickstart example), it works with a lot of reflections indeed. As a
> developer, since I konw
> little about WSDL, the way I prefer is to write POJOs with my own business
> logic first, then deploy it as a ws with a default service.xml. In this
> case(maybe
> the common case), does Axis2 has no way but using reflections all around?
>
> If this is a problem, we may work around in the following ways:
>
> A possible work around is, the developer first write its own
> skeleton(dummy), then using java2wsdl to generate wsdl for him, then using
> code gen with ADB to generate effective
> sevice skeleton, after which developer now adding his business logic.
>
> Or change the code gen module not using WSDL information, but Service
> Classes directly(Since wsdl can generate from service class). In this case,
> developer need not to
> provide wsdl before write his service, but write the service with his own
> will, then using the ADB code gen to generate necessay auxiliary classes
> directly.
>
> If this is not a problem, can you kindly point out how does axis2 elegantly
> handle this case?
>
> Great thanks, Eran.
>
>
> ________________________________
>
> comain
> 2007-01-14
> ________________________________
>
> 发件人: Eran Chinthaka
> 发送时间: 2007-01-14 13:17:51
> 收件人: axis-dev@ws.apache.org
> 抄送:
> 主题: Re: Custom Message Receiver use cases
>
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Comain Chen wrote:
> > Hi, Eran
> >
> > I am quite interested in your 2nd reason.
> >
> > However, it seems that you can only avoid using
> java reflection during
> > operation routing. Before it starts to invoke the
> specific operation, it
> > has to deserialize the XML document into
> corresponding operation
> > parameter objetcs, which will use Java
> reflection(If you use any binding
> > frameworks, such as ADB, JAXB, etc.), and is
> more performance critical.
>
> Well, we do not do that, at least in ADB.
>
> The ADB data objects, that are code gen'ed directly works
> on StAX. What
> you have, when you are just about to de-serialize, is
> a StAX reader,
> from the input stream. ADB is designed to work with
> StAX. IIRC, we do
> not need reflection in this case.
>
> > Of course, if you decide to write your own data
> binding with RawXMLMR,
> > you can still avoid this with a lot of painful work.
>
>
> I totally agree with you. But most people do not want
> to get in to the
> hazel of writing yet another data binding framework.
> We know, from
> experience, how difficult it was :).
> And 95% of the people, in my guess, like to work with
> java objects, than
> with raw XML.
>
> - -- Chinthaka
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
>
> iD8DBQFFqbzYjON2uBzUhh8RAiptAKCVz+7gviwJzMHbiqF9KobMaO/gzgCfWbIE
> KD9WF5amy+NyeqF/MyibAKQ=
> =81vD
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-dev-help@ws.apache.org
>
Re: Re: Custom Message Receiver use cases
Posted by comain <co...@gmail.com>.
Yes,it works just as perfect as you said. That is really cool.
However, if we are using POJO based web services with RPC MR (as the quickstart example), it works with a lot of reflections indeed. As a developer, since I konw
little about WSDL, the way I prefer is to write POJOs with my own business logic first, then deploy it as a ws with a default service.xml. In this case(maybe
the common case), does Axis2 has no way but using reflections all around?
If this is a problem, we may work around in the following ways:
A possible work around is, the developer first write its own skeleton(dummy), then using java2wsdl to generate wsdl for him, then using code gen with ADB to generate effective
sevice skeleton, after which developer now adding his business logic.
Or change the code gen module not using WSDL information, but Service Classes directly(Since wsdl can generate from service class). In this case, developer need not to
provide wsdl before write his service, but write the service with his own will, then using the ADB code gen to generate necessay auxiliary classes directly.
If this is not a problem, can you kindly point out how does axis2 elegantly handle this case?
Great thanks, Eran.
comain
2007-01-14
发件人: Eran Chinthaka
发送时间: 2007-01-14 13:17:51
收件人: axis-dev@ws.apache.org
抄送:
主题: Re: Custom Message Receiver use cases
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Comain Chen wrote:
> Hi, Eran
>
> I am quite interested in your 2nd reason.
>
> However, it seems that you can only avoid using java reflection during
> operation routing. Before it starts to invoke the specific operation, it
> has to deserialize the XML document into corresponding operation
> parameter objetcs, which will use Java reflection(If you use any binding
> frameworks, such as ADB, JAXB, etc.), and is more performance critical.
Well, we do not do that, at least in ADB.
The ADB data objects, that are code gen'ed directly works on StAX. What
you have, when you are just about to de-serialize, is a StAX reader,
from the input stream. ADB is designed to work with StAX. IIRC, we do
not need reflection in this case.
> Of course, if you decide to write your own data binding with RawXMLMR,
> you can still avoid this with a lot of painful work.
I totally agree with you. But most people do not want to get in to the
hazel of writing yet another data binding framework. We know, from
experience, how difficult it was :).
And 95% of the people, in my guess, like to work with java objects, than
with raw XML.
- -- Chinthaka
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFqbzYjON2uBzUhh8RAiptAKCVz+7gviwJzMHbiqF9KobMaO/gzgCfWbIE
KD9WF5amy+NyeqF/MyibAKQ=
=81vD
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Comain Chen wrote:
> Hi, Eran
>
> I am quite interested in your 2nd reason.
>
> However, it seems that you can only avoid using java reflection during
> operation routing. Before it starts to invoke the specific operation, it
> has to deserialize the XML document into corresponding operation
> parameter objetcs, which will use Java reflection(If you use any binding
> frameworks, such as ADB, JAXB, etc.), and is more performance critical.
Well, we do not do that, at least in ADB.
The ADB data objects, that are code gen'ed directly works on StAX. What
you have, when you are just about to de-serialize, is a StAX reader,
from the input stream. ADB is designed to work with StAX. IIRC, we do
not need reflection in this case.
> Of course, if you decide to write your own data binding with RawXMLMR,
> you can still avoid this with a lot of painful work.
I totally agree with you. But most people do not want to get in to the
hazel of writing yet another data binding framework. We know, from
experience, how difficult it was :).
And 95% of the people, in my guess, like to work with java objects, than
with raw XML.
- -- Chinthaka
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFqbzYjON2uBzUhh8RAiptAKCVz+7gviwJzMHbiqF9KobMaO/gzgCfWbIE
KD9WF5amy+NyeqF/MyibAKQ=
=81vD
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Comain Chen <co...@gmail.com>.
Hi, Eran
I am quite interested in your 2nd reason.
However, it seems that you can only avoid using java reflection during
operation routing. Before it starts to invoke the specific operation, it has
to deserialize the XML document into corresponding operation parameter
objetcs, which will use Java reflection(If you use any binding frameworks,
such as ADB, JAXB, etc.), and is more performance critical. Of course, if
you decide to write your own data binding with RawXMLMR, you can still avoid
this with a lot of painful work.
Am I right?
On 1/14/07, Eran Chinthaka <ch...@opensource.lk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Angel,
>
> MessageReceiver, MR, does couple of thinks. First it manages the MEP
> that is being used for the operation.
>
> For example, if the operation you are invoking is an IN-OUT one, MR is
> the one who invokes the OUT pipe, having invoked the service
> implementation.
> If you want to implement a custom MEP, then you need to write your own MR.
>
> If you ask, why we need custom MRs, then the another reason is to avoid
> the use of java reflection and to have a tight binding.
>
> For example, if you expose a java class which has three methods, how
> will a generic message receiver works? Obviously it has to use
> reflection. By generating a custom message receiver, during the code
> generation, we avoid using reflection.
>
> Seems we need to write down this some where. Will do it, when I get some
> time.
>
> - - Chinthaka
>
>
>
> Angel Todorov wrote:
> > Hi ,
> >
> > Well i was thinking that , assuming the RPC Message Receiver is
> > inadequate for more complex input and output datatypes , we are only
> > left with the RAW XML Message receivers, which assume that one has a
> > compiled java class with a method parameter signature accepting
> > OMElement and returning an OM Element, and a method name which should
> > be *the same* as the name of the operation name. (at least that can be
> > seen from the RawXML MessageReceiver implementations in Axis2, more
> > specifically in the findOperation impl).
> >
> > So maybe if I don't want to restrict my java impl classes to have the
> > same method names as the operation names , I should write a custom
> > Message Receiver.
> >
> > Can anyone clarify this point? Thanks.
> >
> > Best Regards,
> > Angel
> >
> > On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> >> To give the user freedom to decide their own Databinding techniques?
> >>
> >> Also I have this doubt, why does the codegen module generate
> >> MessageReceiver
> >> for each Service, not let the binding framework write a general
> >> messageReceiver for all services?
> >>
> >>
> >>
> >> On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> >> >
> >> > Hi Axis2 developers,
> >> >
> >> > I am interested to know what is the motivation behind using custom
> >> > message receivers? For example, if I want to invoke non-java
> >> > operations, I can have a helper Java class which manages all this
> >> > logic, and still be invoked by one of the existing message receivers,
> >> > such as the raw XML message receivers.
> >> >
> >> > Thanks very much for your feedback in advance.
> >> >
> >> > Regards,
> >> > Angel
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
> >> axis-dev-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Best regrads,
> >> Comain Chen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFqXOBjON2uBzUhh8RApU6AJ0bH7pEz/fm27BbfJHYyv8fguKAKQCfW0Lf
> bLiUen4/SXrg9X5sBvNGwz0=
> =Cr18
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Best regrads,
Comain Chen
Re: Custom Message Receiver use cases
Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Angel,
MessageReceiver, MR, does couple of thinks. First it manages the MEP
that is being used for the operation.
For example, if the operation you are invoking is an IN-OUT one, MR is
the one who invokes the OUT pipe, having invoked the service
implementation.
If you want to implement a custom MEP, then you need to write your own MR.
If you ask, why we need custom MRs, then the another reason is to avoid
the use of java reflection and to have a tight binding.
For example, if you expose a java class which has three methods, how
will a generic message receiver works? Obviously it has to use
reflection. By generating a custom message receiver, during the code
generation, we avoid using reflection.
Seems we need to write down this some where. Will do it, when I get some
time.
- - Chinthaka
Angel Todorov wrote:
> Hi ,
>
> Well i was thinking that , assuming the RPC Message Receiver is
> inadequate for more complex input and output datatypes , we are only
> left with the RAW XML Message receivers, which assume that one has a
> compiled java class with a method parameter signature accepting
> OMElement and returning an OM Element, and a method name which should
> be *the same* as the name of the operation name. (at least that can be
> seen from the RawXML MessageReceiver implementations in Axis2, more
> specifically in the findOperation impl).
>
> So maybe if I don't want to restrict my java impl classes to have the
> same method names as the operation names , I should write a custom
> Message Receiver.
>
> Can anyone clarify this point? Thanks.
>
> Best Regards,
> Angel
>
> On 1/13/07, Comain Chen <co...@gmail.com> wrote:
>> To give the user freedom to decide their own Databinding techniques?
>>
>> Also I have this doubt, why does the codegen module generate
>> MessageReceiver
>> for each Service, not let the binding framework write a general
>> messageReceiver for all services?
>>
>>
>>
>> On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
>> >
>> > Hi Axis2 developers,
>> >
>> > I am interested to know what is the motivation behind using custom
>> > message receivers? For example, if I want to invoke non-java
>> > operations, I can have a helper Java class which manages all this
>> > logic, and still be invoked by one of the existing message receivers,
>> > such as the raw XML message receivers.
>> >
>> > Thanks very much for your feedback in advance.
>> >
>> > Regards,
>> > Angel
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> axis-dev-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-dev-help@ws.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Best regrads,
>> Comain Chen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFqXOBjON2uBzUhh8RApU6AJ0bH7pEz/fm27BbfJHYyv8fguKAKQCfW0Lf
bLiUen4/SXrg9X5sBvNGwz0=
=Cr18
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Angel Todorov <at...@gmail.com>.
Hi ,
Well i was thinking that , assuming the RPC Message Receiver is
inadequate for more complex input and output datatypes , we are only
left with the RAW XML Message receivers, which assume that one has a
compiled java class with a method parameter signature accepting
OMElement and returning an OM Element, and a method name which should
be *the same* as the name of the operation name. (at least that can be
seen from the RawXML MessageReceiver implementations in Axis2, more
specifically in the findOperation impl).
So maybe if I don't want to restrict my java impl classes to have the
same method names as the operation names , I should write a custom
Message Receiver.
Can anyone clarify this point? Thanks.
Best Regards,
Angel
On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> To give the user freedom to decide their own Databinding techniques?
>
> Also I have this doubt, why does the codegen module generate MessageReceiver
> for each Service, not let the binding framework write a general
> messageReceiver for all services?
>
>
>
> On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> >
> > Hi Axis2 developers,
> >
> > I am interested to know what is the motivation behind using custom
> > message receivers? For example, if I want to invoke non-java
> > operations, I can have a helper Java class which manages all this
> > logic, and still be invoked by one of the existing message receivers,
> > such as the raw XML message receivers.
> >
> > Thanks very much for your feedback in advance.
> >
> > Regards,
> > Angel
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
>
> --
> Best regrads,
> Comain Chen
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Angel Todorov <at...@gmail.com>.
Hi ,
Well i was thinking that , assuming the RPC Message Receiver is
inadequate for more complex input and output datatypes , we are only
left with the RAW XML Message receivers, which assume that one has a
compiled java class with a method parameter signature accepting
OMElement and returning an OM Element, and a method name which should
be *the same* as the name of the operation name. (at least that can be
seen from the RawXML MessageReceiver implementations in Axis2, more
specifically in the findOperation impl).
So maybe if I don't want to restrict my java impl classes to have the
same method names as the operation names , I should write a custom
Message Receiver.
Can anyone clarify this point? Thanks.
Best Regards,
Angel
On 1/13/07, Comain Chen <co...@gmail.com> wrote:
> To give the user freedom to decide their own Databinding techniques?
>
> Also I have this doubt, why does the codegen module generate MessageReceiver
> for each Service, not let the binding framework write a general
> messageReceiver for all services?
>
>
>
> On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
> >
> > Hi Axis2 developers,
> >
> > I am interested to know what is the motivation behind using custom
> > message receivers? For example, if I want to invoke non-java
> > operations, I can have a helper Java class which manages all this
> > logic, and still be invoked by one of the existing message receivers,
> > such as the raw XML message receivers.
> >
> > Thanks very much for your feedback in advance.
> >
> > Regards,
> > Angel
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
>
> --
> Best regrads,
> Comain Chen
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Custom Message Receiver use cases
Posted by Comain Chen <co...@gmail.com>.
To give the user freedom to decide their own Databinding techniques?
Also I have this doubt, why does the codegen module generate MessageReceiver
for each Service, not let the binding framework write a general
messageReceiver for all services?
On 1/13/07, Angel Todorov <at...@gmail.com> wrote:
>
> Hi Axis2 developers,
>
> I am interested to know what is the motivation behind using custom
> message receivers? For example, if I want to invoke non-java
> operations, I can have a helper Java class which manages all this
> logic, and still be invoked by one of the existing message receivers,
> such as the raw XML message receivers.
>
> Thanks very much for your feedback in advance.
>
> Regards,
> Angel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Best regrads,
Comain Chen