Thanks Chinthaka. I am so glad to see active participation from axis2 team in
this forum.
   I feel many folks might be having this requirement wherein they want to
write a single gateway service that recieves all the requests and then
dispatches it to the right handler dynamically. This gateway service need
not be changed each time a new handler ( operation) is added. It should by
default recieve all the requests directed to it.
I am waiting to hear from dev team. 

Regards,
Sanjay



Eran Chinthaka-3 wrote:
> 
> This is an interesting scenario.
> 
> Axis2, by design, requires every message to be associated with a service
> and
> an operation. And this is checked in the dispatching phase. If you don't
> have operations defined, then you might have to hack a little bit. IIRC,
> you
> can now add handlers before the dispatching phase.
> 
> I'm forwarding this message to dev list also, so that people over there
> knows better than I do about this.
> 
> Thanks,
> Chinthaka
> 
> On Thu, Aug 28, 2008 at 7:25 PM, murugess <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi Chinthaka,
>>    Really appreciate your quick reply. yes, I am trying to tackle the
>> second case where in all the requests directed to the service regardless
>> of
>> operation should go to the same reciever. Basically, I have a servlet
>> which
>> recieves all the soap requests sent through http. This servlet will
>> receive
>> all the requests sent to a given url ( say
>> http://www.foo.com/abc/servlet)
>> with any soap action header. Now, I am trying to replace this servlet
>> with
>> axis2. I want to deal directly with XML using axiom apis and avoid
>> marshalling and de marshalling of xmls to java objects.
>>    As per my understanding, and by what you explained, axis2 dispatcher
>> identifies the service and the operation name and then finds the
>> corresponding entry in the services.xml.  Since, I don't have any
>> operations
>> specified in the services.xml, it throws up an error.
>>    What kind of handler should I write in order to avoid the above error?
>>
>> Thanks,
>> Sanjay
>>
>>
>> Eran Chinthaka-3 wrote:
>> >
>> > Do you want to get all the message related to a given service in to one
>> > message receiver? Or is it that you want to get all the messages,
>> > irrespective of the service to get to one message receiver?
>> >
>> > If it is the first case, then register one message receiver class name
>> for
>> > all the MEPs.
>> >
>> > IIRC, this is how Axis2 internals work. When you get a SOAP message, we
>> > will
>> > first identify the service and the operation this message is going to.
>> > Every
>> > operation is connected to a MEP (http://wso2.org/library/335), and a
>> > message
>> > receiver is also bound to a message receiver for a given service. One
>> the
>> > operation and the service is found, service.xml details are used to
>> > retrieve
>> > the message receiver connected to the MEP of that operation.
>> >
>> > If it is the second case, then you might have to write a handler to do
>> > this.
>> >
>> >
>> > HTH.
>> > Chinthaka
>> >
>> > On Wed, Aug 27, 2008 at 7:56 PM, murugess <[EMAIL PROTECTED]> wrote:
>> >
>> >>
>> >> I want the same message reciever to be invoked for a service
>> regardless
>> >> of
>> >> whatever the soap action comes in the request. Basically I am trying
>> to
>> >> simulate a servlet which will get all the requests targeted to it. I
>> dont
>> >> have any service implementation class and no wsdl in the services
>> folder.
>> >>
>> >> Here is what I have in services.xml:
>> >>
>> >>    <service >
>> >>        <messageReceivers>
>> >>            <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out";
>> >> class="com.xyz.GenericMessageReceiverInOut"/>
>> >>        </messageReceivers>
>> >>
>> >>    </service>
>> >>
>> >>
>> >> I can't put any opertions name as I want the same
>> >> GenericMessageReceiverInOut to be invoked for all operations  ( or
>> >> requests
>> >> with any soapaction or wsa action).
>> >>
>> >>
>> >> When I send the request using a client, I get following exception:
>> >>
>> >> <Exception>org.apache.axis2.AxisFault: The endpoint reference (EPR)
>> for
>> >> the
>> >> Operation not found is
>> >> http://localhost:8080/CRMGWServer/services/GenericFeedService and the
>> WSA
>> >> Action = null&#xd;
>> >>        at
>> >>
>> >>
>> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:86)&#xd;
>> >>        at org.apache.axis2.engine.Phase.invoke(Phase.java:308)&#xd;
>> >>        at
>> >> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)&#xd;
>> >>        at
>> >> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)&#xd;
>> >>
>> >>
>> >> I really appreciate if any one can point me to the right solution. I
>> wish
>> >> i
>> >> could put wild card character (*) in the operation tag inside
>> >> services.xml.
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Want-to-use-the-same-message-receiver-for-all-operations%21%21-tp19191943p19191943.html
>> >> Sent from the Axis - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > With Mettha,
>> > Eran Chinthaka
>> >
>> > --------------------------------------------------------------------
>> > Health is the greatest gift; contentment is the greatest wealth;
>> trusting
>> > is
>> > the best relationship; nirvana is the highest joy. - Dhammapada
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Want-to-use-the-same-message-receiver-for-all-operations%21%21-tp19191943p19211171.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> With Mettha,
> Eran Chinthaka
> 
> --------------------------------------------------------------------
> Health is the greatest gift; contentment is the greatest wealth; trusting
> is
> the best relationship; nirvana is the highest joy. - Dhammapada
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Want-to-use-the-same-message-receiver-for-all-operations%21%21-tp19191943p19221987.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to