You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Manoel Farrugia <ma...@gmail.com> on 2010/11/30 11:31:10 UTC

Interceptors: How to handle an unknown request?

Hi to all,

I am experimenting with Interceptors and managed to implement a simple
Interceptor:

package com.manoel.interceptors;

import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;

public class MyInterceptor extends AbstractPhaseInterceptor<Message> {

public MyInterceptor() {
        super(Phase.RECEIVE);
    }

    public void handleMessage(Message message) {
       System.out.println("-------------- INTERCEPTOOOR --------------");
    }

    public void handleFault(Message messageParam) {
     System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
    }
}

As a web service I have a getGreeting() method which is accessed by:
http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGreeting<http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGreeting1?arg0=Manoel>

Now I want that any other request method which does not exist in my web
service (for example getGreetingMe()) is redirected to getGreeting() as the
address above.

How should I tackle this idea?

Thanks
Manoel

Re: Interceptors: How to handle an unknown request?

Posted by Manoel Farrugia <ma...@gmail.com>.
yeah yeah you are right glen, but my scenario is different from what you are
referring to.

I want to know how to do this, if someone out there can help me :)


On Tue, Nov 30, 2010 at 2:59 PM, Glen Mazza <gl...@gmail.com> wrote:

>
> Pardon the non-answer (hopefully someone else can answer this for you), but
> generally you do not want to stupid-proof your web service calls in that
> manner.  If there is a problem with the Endpoint URL the SOAP client
> developer is using it could be something more significantly wrong in his
> coding--you'd be doing him a favor by returning an error than by silently
> continuing to process the request, keeping him oblivious to the problem.
> For example, if I'm accidentally appending username and cleartext passwords
> to the endpoint URL, of course I would want your web service provider to
> halt with a 404 or whatever error so I can be alerted to this major
> problem.
>
> Redirections are OK for non-technical web surfers accessing browser web
> pages, but that shouldn't be necessary with hardcoded SOAP clients built
> off
> a WSDL and programmed by developers.
>
> Glen
>
>
> Manoel Farrugia wrote:
> >
> > As a web service I have a getGreeting() method which is accessed by:
> >
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGreeting
> <
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGreeting1?arg0=Manoel
> >
> >
> > Now I want that any other request method which does not exist in my web
> > service (for example getGreetingMe()) is redirected to getGreeting() as
> > the
> > address above.
> >
> > How should I tackle this idea?
> >
> > Thanks
> > Manoel
> >
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Interceptors-How-to-handle-an-unknown-request-tp3285864p3286099.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: Interceptors: How to handle an unknown request?

Posted by Glen Mazza <gl...@gmail.com>.
Pardon the non-answer (hopefully someone else can answer this for you), but
generally you do not want to stupid-proof your web service calls in that
manner.  If there is a problem with the Endpoint URL the SOAP client
developer is using it could be something more significantly wrong in his
coding--you'd be doing him a favor by returning an error than by silently
continuing to process the request, keeping him oblivious to the problem. 
For example, if I'm accidentally appending username and cleartext passwords
to the endpoint URL, of course I would want your web service provider to
halt with a 404 or whatever error so I can be alerted to this major problem.

Redirections are OK for non-technical web surfers accessing browser web
pages, but that shouldn't be necessary with hardcoded SOAP clients built off
a WSDL and programmed by developers.

Glen


Manoel Farrugia wrote:
> 
> As a web service I have a getGreeting() method which is accessed by:
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGreeting<http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGreeting1?arg0=Manoel>
> 
> Now I want that any other request method which does not exist in my web
> service (for example getGreetingMe()) is redirected to getGreeting() as
> the
> address above.
> 
> How should I tackle this idea?
> 
> Thanks
> Manoel
> 

-- 
View this message in context: http://cxf.547215.n5.nabble.com/Interceptors-How-to-handle-an-unknown-request-tp3285864p3286099.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Interceptors: How to handle an unknown request?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

No problems. I'll comment a bit.

>Having a custom CXF invoker is probably one option, it should be able to
> ensure the right Method is invoked,

CXF invokers can 'decorate' a bit the way the invocation is done, but this
is probably not an option after all for your case because I think
CXFInvokers are already presented with the Java Method instance, so if
there's no greetMe2() method then the (custom) JAXWS invoker will not even
be invoked

> another option is to register a custom CXF ServletFilter which would
provide
> a custom HttpServletRequest which would in turn manipulate the request
body
> such that CXF is made to believe it is getGreeting() which has to be
> invoked.

This is not a CXF specific option. It's all about registering a custom
Servlet filter which will ensure that
the CXF stack always sees "getGreeting" by efficiently manipulating the
request body and relying on things like HttpServletRequestWrapper.

> You may also want to debug and check how CXF SOAP interceptors determine
the
> method name and may be you can register a custom XMLStreamReader which
will
> make CXF to invoke getGreeting.

Pursuing this option will help you to know CXF better :-) and it can
actually be the most effective option.
I wish I could give you more info which CXF Soap interceptors determine the
method - but I don't know right now :-), it may depend on the
binding/transport being used, etc

cheers, Sergey


On Mon, Dec 6, 2010 at 9:16 AM, Manoel Farrugia <ma...@gmail.com>wrote:

> Sorry but I am new with CXF and have not understand the last post Sergey
>
>
> On Thu, Dec 2, 2010 at 11:52 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
> > Having a custom CXF invoker is probably one option, it should be able to
> > ensure the right Method is invoked,
> > another option is to register a custom CXF ServletFilter which would
> provide
> > a custom HttpServletRequest which would in turn manipulate the request
> body
> > such that CXF is made to believe it is getGreeting() which has to be
> > invoked.
> > You may also want to debug and check how CXF SOAP interceptors determine
> the
> > method name and may be you can register a custom XMLStreamReader which
> will
> > make CXF to invoke getGreeting.
> >
> > Sergey
> >
> >
> > On Thu, Dec 2, 2010 at 10:37 AM, Manoel Farrugia <manoelkazza@gmail.com
> >wrote:
> >
> >> No I have only getGreeting implemented and want that every other wrong
> >> request is directed to getGreeting.
> >>
> >> If one requests getGreeting2 it directs him to getGreeting.
> >>
> >>
> >> On Thu, Dec 2, 2010 at 11:34 AM, Sergey Beryozkin <sberyozkin@gmail.com
> >
> >> wrote:
> >> > Do you actually have getGreeting2 implemented ? Example, do you have
> two
> >> > SOAP endpoints, one implementing getGreeting and one getGreeting2 and
> you
> >> > want the consumers of getGreeting2 be able to work with the old
> >> > getGreeting() ?
> >> >
> >> > cheers, Sergey
> >> >
> >> > On Thu, Dec 2, 2010 at 9:43 AM, Manoel Farrugia <
> manoelkazza@gmail.com
> >> >wrote:
> >> >
> >> >> I can even scrap the idea of Interceptors if there is a better way to
> >> >> do my wanted job!
> >> >>
> >> >> Instead of receiving soap:ServerNo such operation: getGreeting2 (HTTP
> >> >> GET PATH_INFO: /HelloWorldWebServices/HelloWorldPort/getGreeting2) I
> >> >> want to see the getGreeting response!
> >> >>
> >> >> How can I do it in CXF Web Services?
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Dec 1, 2010 at 8:10 PM, Manoel Farrugia <
> manoelkazza@gmail.com>
> >> >> wrote:
> >> >> > I am not restricted to handleFault only. I want to redirect any
> wrong
> >> >> > methods to getGreeting() method.
> >> >> >
> >> >> > On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org>
> wrote:
> >> >> >>
> >> >> >> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
> >> >> >> > Something like this:
> >> >> >> >
> >> >> >> > public void handleFault(Message message) {
> >> >> >> >
>  System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >> >> >> >
> >> >> >> >      String path = (String)message.get(Message.PATH_INFO);
> >> >> >> >      String basePath = (String)message.get(Message.BASE_PATH);
> >> >> >> >      String query = (String)message.get(Message.QUERY_STRING);
> >> >> >> >      System.out.println("Path: "+path+". BasePath: "+basePath+".
> >> >> Query:
> >> >> >> > "+query+".");
> >> >> >> >
>  System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >> >> >> >
> >> >> >> >      message.put(Message.PATH_INFO,
> >> >> >> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
> >> >> >> >
> >> >> >> >      path = (String)message.get(Message.PATH_INFO);
> >> >> >> >      System.out.println("NEW PATH: "+path);
> >> >> >> >     }
> >> >> >> >
> >> >> >> > That is changing the message's pathinfo from the wrong one
> >> >> >> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
> >> >> >> >
> >> >> >> > But I want to direct to
> >> >> >> > /HelloWorldWebServices/HelloWorldPort/getGreeting
> >> >> >> > from the handleFault method.
> >> >> >> > How should I do this?
> >> >> >>
> >> >> >> From handleFault?   Hmm...  No idea really.
> >> >> >>
> >> >> >> You  could TRY to do something like
> >> >> >> message.getInterceptorChain().reset();
> >> >> >> message.getIntercetporChain().processMessage(message);
> >> >> >> message.getInterceptorChain().pause();
> >> >> >>
> >> >> >> or similar.  I really have no idea what that would do.   Honestly,
> >> once
> >> >> >> the
> >> >> >> fault occurs, things are somewhat left in an unpredictable state
> and
> >> I'm
> >> >> >> not
> >> >> >> sure what would happen.
> >> >> >>
> >> >> >> Dan
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> >
> >> >> >> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dkulp@apache.org
> >
> >> >> wrote:
> >> >> >> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> >> >> >> > > > As a web service I have a getGreeting() method which is
> >> accessed
> >> >> by:
> >> >> >> > >
> >> >> >> > >
> >> >>
> >>
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
> >> >> >> > > ee
> >> >> >> > >
> >> >> >> > > > ting<
> >> >> >> > >
> >> >> >> > >
> >> >>
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> >> >> >> > >
> >> >> >> > > > tGreeting1?arg0=Manoel>
> >> >> >> > > >
> >> >> >> > > > Now I want that any other request method which does not
> exist
> >> in
> >> >> my
> >> >> >> > > > web
> >> >> >> > > > service (for example getGreetingMe()) is redirected to
> >> >> getGreeting()
> >> >> >> > > > as
> >> >> >> > >
> >> >> >> > > the
> >> >> >> > >
> >> >> >> > > > address above.
> >> >> >> > > >
> >> >> >> > > > How should I tackle this idea?
> >> >> >> > >
> >> >> >> > > If  this is just for the "GET" requests, it shouldn't be too
> >> hard.
> >> >> >> > >
> >> >> >> > > String path = (String)message.get(Message.PATH_INFO);
> >> >> >> > > String basePath = (String)message.get(Message.BASE_PATH);
> >> >> >> > > String query = (String)message.get(Message.QUERY_STRING);
> >> >> >> > >
> >> >> >> > > would get you the values that were sent in.  You would just
> need
> >> to
> >> >> >> > > reset
> >> >> >> > > them
> >> >> >> > > to the "getGreeting" versions of those via message.put(...)
> type
> >> >> >> > > things.
> >> >> >> > >
> >> >> >> > > --
> >> >> >> > > Daniel Kulp
> >> >> >> > > dkulp@apache.org
> >> >> >> > > http://dankulp.com/blog
> >> >> >>
> >> >> >> --
> >> >> >> Daniel Kulp
> >> >> >> dkulp@apache.org
> >> >> >> http://dankulp.com/blog
> >> >> >
> >> >> >
> >> >>
> >> >
> >>
> >
>

Re: Interceptors: How to handle an unknown request?

Posted by Manoel Farrugia <ma...@gmail.com>.
Sorry but I am new with CXF and have not understand the last post Sergey


On Thu, Dec 2, 2010 at 11:52 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Having a custom CXF invoker is probably one option, it should be able to
> ensure the right Method is invoked,
> another option is to register a custom CXF ServletFilter which would provide
> a custom HttpServletRequest which would in turn manipulate the request body
> such that CXF is made to believe it is getGreeting() which has to be
> invoked.
> You may also want to debug and check how CXF SOAP interceptors determine the
> method name and may be you can register a custom XMLStreamReader which will
> make CXF to invoke getGreeting.
>
> Sergey
>
>
> On Thu, Dec 2, 2010 at 10:37 AM, Manoel Farrugia <ma...@gmail.com>wrote:
>
>> No I have only getGreeting implemented and want that every other wrong
>> request is directed to getGreeting.
>>
>> If one requests getGreeting2 it directs him to getGreeting.
>>
>>
>> On Thu, Dec 2, 2010 at 11:34 AM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>> > Do you actually have getGreeting2 implemented ? Example, do you have two
>> > SOAP endpoints, one implementing getGreeting and one getGreeting2 and you
>> > want the consumers of getGreeting2 be able to work with the old
>> > getGreeting() ?
>> >
>> > cheers, Sergey
>> >
>> > On Thu, Dec 2, 2010 at 9:43 AM, Manoel Farrugia <manoelkazza@gmail.com
>> >wrote:
>> >
>> >> I can even scrap the idea of Interceptors if there is a better way to
>> >> do my wanted job!
>> >>
>> >> Instead of receiving soap:ServerNo such operation: getGreeting2 (HTTP
>> >> GET PATH_INFO: /HelloWorldWebServices/HelloWorldPort/getGreeting2) I
>> >> want to see the getGreeting response!
>> >>
>> >> How can I do it in CXF Web Services?
>> >>
>> >>
>> >>
>> >> On Wed, Dec 1, 2010 at 8:10 PM, Manoel Farrugia <ma...@gmail.com>
>> >> wrote:
>> >> > I am not restricted to handleFault only. I want to redirect any wrong
>> >> > methods to getGreeting() method.
>> >> >
>> >> > On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org> wrote:
>> >> >>
>> >> >> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
>> >> >> > Something like this:
>> >> >> >
>> >> >> > public void handleFault(Message message) {
>> >> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
>> >> >> >
>> >> >> >      String path = (String)message.get(Message.PATH_INFO);
>> >> >> >      String basePath = (String)message.get(Message.BASE_PATH);
>> >> >> >      String query = (String)message.get(Message.QUERY_STRING);
>> >> >> >      System.out.println("Path: "+path+". BasePath: "+basePath+".
>> >> Query:
>> >> >> > "+query+".");
>> >> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
>> >> >> >
>> >> >> >      message.put(Message.PATH_INFO,
>> >> >> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
>> >> >> >
>> >> >> >      path = (String)message.get(Message.PATH_INFO);
>> >> >> >      System.out.println("NEW PATH: "+path);
>> >> >> >     }
>> >> >> >
>> >> >> > That is changing the message's pathinfo from the wrong one
>> >> >> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
>> >> >> >
>> >> >> > But I want to direct to
>> >> >> > /HelloWorldWebServices/HelloWorldPort/getGreeting
>> >> >> > from the handleFault method.
>> >> >> > How should I do this?
>> >> >>
>> >> >> From handleFault?   Hmm...  No idea really.
>> >> >>
>> >> >> You  could TRY to do something like
>> >> >> message.getInterceptorChain().reset();
>> >> >> message.getIntercetporChain().processMessage(message);
>> >> >> message.getInterceptorChain().pause();
>> >> >>
>> >> >> or similar.  I really have no idea what that would do.   Honestly,
>> once
>> >> >> the
>> >> >> fault occurs, things are somewhat left in an unpredictable state and
>> I'm
>> >> >> not
>> >> >> sure what would happen.
>> >> >>
>> >> >> Dan
>> >> >>
>> >> >>
>> >> >>
>> >> >> >
>> >> >> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org>
>> >> wrote:
>> >> >> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
>> >> >> > > > As a web service I have a getGreeting() method which is
>> accessed
>> >> by:
>> >> >> > >
>> >> >> > >
>> >>
>> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
>> >> >> > > ee
>> >> >> > >
>> >> >> > > > ting<
>> >> >> > >
>> >> >> > >
>> >> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
>> >> >> > >
>> >> >> > > > tGreeting1?arg0=Manoel>
>> >> >> > > >
>> >> >> > > > Now I want that any other request method which does not exist
>> in
>> >> my
>> >> >> > > > web
>> >> >> > > > service (for example getGreetingMe()) is redirected to
>> >> getGreeting()
>> >> >> > > > as
>> >> >> > >
>> >> >> > > the
>> >> >> > >
>> >> >> > > > address above.
>> >> >> > > >
>> >> >> > > > How should I tackle this idea?
>> >> >> > >
>> >> >> > > If  this is just for the "GET" requests, it shouldn't be too
>> hard.
>> >> >> > >
>> >> >> > > String path = (String)message.get(Message.PATH_INFO);
>> >> >> > > String basePath = (String)message.get(Message.BASE_PATH);
>> >> >> > > String query = (String)message.get(Message.QUERY_STRING);
>> >> >> > >
>> >> >> > > would get you the values that were sent in.  You would just need
>> to
>> >> >> > > reset
>> >> >> > > them
>> >> >> > > to the "getGreeting" versions of those via message.put(...) type
>> >> >> > > things.
>> >> >> > >
>> >> >> > > --
>> >> >> > > Daniel Kulp
>> >> >> > > dkulp@apache.org
>> >> >> > > http://dankulp.com/blog
>> >> >>
>> >> >> --
>> >> >> Daniel Kulp
>> >> >> dkulp@apache.org
>> >> >> http://dankulp.com/blog
>> >> >
>> >> >
>> >>
>> >
>>
>

Re: Interceptors: How to handle an unknown request?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Having a custom CXF invoker is probably one option, it should be able to
ensure the right Method is invoked,
another option is to register a custom CXF ServletFilter which would provide
a custom HttpServletRequest which would in turn manipulate the request body
such that CXF is made to believe it is getGreeting() which has to be
invoked.
You may also want to debug and check how CXF SOAP interceptors determine the
method name and may be you can register a custom XMLStreamReader which will
make CXF to invoke getGreeting.

Sergey


On Thu, Dec 2, 2010 at 10:37 AM, Manoel Farrugia <ma...@gmail.com>wrote:

> No I have only getGreeting implemented and want that every other wrong
> request is directed to getGreeting.
>
> If one requests getGreeting2 it directs him to getGreeting.
>
>
> On Thu, Dec 2, 2010 at 11:34 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
> > Do you actually have getGreeting2 implemented ? Example, do you have two
> > SOAP endpoints, one implementing getGreeting and one getGreeting2 and you
> > want the consumers of getGreeting2 be able to work with the old
> > getGreeting() ?
> >
> > cheers, Sergey
> >
> > On Thu, Dec 2, 2010 at 9:43 AM, Manoel Farrugia <manoelkazza@gmail.com
> >wrote:
> >
> >> I can even scrap the idea of Interceptors if there is a better way to
> >> do my wanted job!
> >>
> >> Instead of receiving soap:ServerNo such operation: getGreeting2 (HTTP
> >> GET PATH_INFO: /HelloWorldWebServices/HelloWorldPort/getGreeting2) I
> >> want to see the getGreeting response!
> >>
> >> How can I do it in CXF Web Services?
> >>
> >>
> >>
> >> On Wed, Dec 1, 2010 at 8:10 PM, Manoel Farrugia <ma...@gmail.com>
> >> wrote:
> >> > I am not restricted to handleFault only. I want to redirect any wrong
> >> > methods to getGreeting() method.
> >> >
> >> > On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org> wrote:
> >> >>
> >> >> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
> >> >> > Something like this:
> >> >> >
> >> >> > public void handleFault(Message message) {
> >> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >> >> >
> >> >> >      String path = (String)message.get(Message.PATH_INFO);
> >> >> >      String basePath = (String)message.get(Message.BASE_PATH);
> >> >> >      String query = (String)message.get(Message.QUERY_STRING);
> >> >> >      System.out.println("Path: "+path+". BasePath: "+basePath+".
> >> Query:
> >> >> > "+query+".");
> >> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >> >> >
> >> >> >      message.put(Message.PATH_INFO,
> >> >> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
> >> >> >
> >> >> >      path = (String)message.get(Message.PATH_INFO);
> >> >> >      System.out.println("NEW PATH: "+path);
> >> >> >     }
> >> >> >
> >> >> > That is changing the message's pathinfo from the wrong one
> >> >> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
> >> >> >
> >> >> > But I want to direct to
> >> >> > /HelloWorldWebServices/HelloWorldPort/getGreeting
> >> >> > from the handleFault method.
> >> >> > How should I do this?
> >> >>
> >> >> From handleFault?   Hmm...  No idea really.
> >> >>
> >> >> You  could TRY to do something like
> >> >> message.getInterceptorChain().reset();
> >> >> message.getIntercetporChain().processMessage(message);
> >> >> message.getInterceptorChain().pause();
> >> >>
> >> >> or similar.  I really have no idea what that would do.   Honestly,
> once
> >> >> the
> >> >> fault occurs, things are somewhat left in an unpredictable state and
> I'm
> >> >> not
> >> >> sure what would happen.
> >> >>
> >> >> Dan
> >> >>
> >> >>
> >> >>
> >> >> >
> >> >> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org>
> >> wrote:
> >> >> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> >> >> > > > As a web service I have a getGreeting() method which is
> accessed
> >> by:
> >> >> > >
> >> >> > >
> >>
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
> >> >> > > ee
> >> >> > >
> >> >> > > > ting<
> >> >> > >
> >> >> > >
> >> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> >> >> > >
> >> >> > > > tGreeting1?arg0=Manoel>
> >> >> > > >
> >> >> > > > Now I want that any other request method which does not exist
> in
> >> my
> >> >> > > > web
> >> >> > > > service (for example getGreetingMe()) is redirected to
> >> getGreeting()
> >> >> > > > as
> >> >> > >
> >> >> > > the
> >> >> > >
> >> >> > > > address above.
> >> >> > > >
> >> >> > > > How should I tackle this idea?
> >> >> > >
> >> >> > > If  this is just for the "GET" requests, it shouldn't be too
> hard.
> >> >> > >
> >> >> > > String path = (String)message.get(Message.PATH_INFO);
> >> >> > > String basePath = (String)message.get(Message.BASE_PATH);
> >> >> > > String query = (String)message.get(Message.QUERY_STRING);
> >> >> > >
> >> >> > > would get you the values that were sent in.  You would just need
> to
> >> >> > > reset
> >> >> > > them
> >> >> > > to the "getGreeting" versions of those via message.put(...) type
> >> >> > > things.
> >> >> > >
> >> >> > > --
> >> >> > > Daniel Kulp
> >> >> > > dkulp@apache.org
> >> >> > > http://dankulp.com/blog
> >> >>
> >> >> --
> >> >> Daniel Kulp
> >> >> dkulp@apache.org
> >> >> http://dankulp.com/blog
> >> >
> >> >
> >>
> >
>

Re: Interceptors: How to handle an unknown request?

Posted by Manoel Farrugia <ma...@gmail.com>.
No I have only getGreeting implemented and want that every other wrong
request is directed to getGreeting.

If one requests getGreeting2 it directs him to getGreeting.


On Thu, Dec 2, 2010 at 11:34 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Do you actually have getGreeting2 implemented ? Example, do you have two
> SOAP endpoints, one implementing getGreeting and one getGreeting2 and you
> want the consumers of getGreeting2 be able to work with the old
> getGreeting() ?
>
> cheers, Sergey
>
> On Thu, Dec 2, 2010 at 9:43 AM, Manoel Farrugia <ma...@gmail.com>wrote:
>
>> I can even scrap the idea of Interceptors if there is a better way to
>> do my wanted job!
>>
>> Instead of receiving soap:ServerNo such operation: getGreeting2 (HTTP
>> GET PATH_INFO: /HelloWorldWebServices/HelloWorldPort/getGreeting2) I
>> want to see the getGreeting response!
>>
>> How can I do it in CXF Web Services?
>>
>>
>>
>> On Wed, Dec 1, 2010 at 8:10 PM, Manoel Farrugia <ma...@gmail.com>
>> wrote:
>> > I am not restricted to handleFault only. I want to redirect any wrong
>> > methods to getGreeting() method.
>> >
>> > On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org> wrote:
>> >>
>> >> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
>> >> > Something like this:
>> >> >
>> >> > public void handleFault(Message message) {
>> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
>> >> >
>> >> >      String path = (String)message.get(Message.PATH_INFO);
>> >> >      String basePath = (String)message.get(Message.BASE_PATH);
>> >> >      String query = (String)message.get(Message.QUERY_STRING);
>> >> >      System.out.println("Path: "+path+". BasePath: "+basePath+".
>> Query:
>> >> > "+query+".");
>> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
>> >> >
>> >> >      message.put(Message.PATH_INFO,
>> >> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
>> >> >
>> >> >      path = (String)message.get(Message.PATH_INFO);
>> >> >      System.out.println("NEW PATH: "+path);
>> >> >     }
>> >> >
>> >> > That is changing the message's pathinfo from the wrong one
>> >> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
>> >> >
>> >> > But I want to direct to
>> >> > /HelloWorldWebServices/HelloWorldPort/getGreeting
>> >> > from the handleFault method.
>> >> > How should I do this?
>> >>
>> >> From handleFault?   Hmm...  No idea really.
>> >>
>> >> You  could TRY to do something like
>> >> message.getInterceptorChain().reset();
>> >> message.getIntercetporChain().processMessage(message);
>> >> message.getInterceptorChain().pause();
>> >>
>> >> or similar.  I really have no idea what that would do.   Honestly, once
>> >> the
>> >> fault occurs, things are somewhat left in an unpredictable state and I'm
>> >> not
>> >> sure what would happen.
>> >>
>> >> Dan
>> >>
>> >>
>> >>
>> >> >
>> >> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org>
>> wrote:
>> >> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
>> >> > > > As a web service I have a getGreeting() method which is accessed
>> by:
>> >> > >
>> >> > >
>> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
>> >> > > ee
>> >> > >
>> >> > > > ting<
>> >> > >
>> >> > >
>> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
>> >> > >
>> >> > > > tGreeting1?arg0=Manoel>
>> >> > > >
>> >> > > > Now I want that any other request method which does not exist in
>> my
>> >> > > > web
>> >> > > > service (for example getGreetingMe()) is redirected to
>> getGreeting()
>> >> > > > as
>> >> > >
>> >> > > the
>> >> > >
>> >> > > > address above.
>> >> > > >
>> >> > > > How should I tackle this idea?
>> >> > >
>> >> > > If  this is just for the "GET" requests, it shouldn't be too hard.
>> >> > >
>> >> > > String path = (String)message.get(Message.PATH_INFO);
>> >> > > String basePath = (String)message.get(Message.BASE_PATH);
>> >> > > String query = (String)message.get(Message.QUERY_STRING);
>> >> > >
>> >> > > would get you the values that were sent in.  You would just need to
>> >> > > reset
>> >> > > them
>> >> > > to the "getGreeting" versions of those via message.put(...) type
>> >> > > things.
>> >> > >
>> >> > > --
>> >> > > Daniel Kulp
>> >> > > dkulp@apache.org
>> >> > > http://dankulp.com/blog
>> >>
>> >> --
>> >> Daniel Kulp
>> >> dkulp@apache.org
>> >> http://dankulp.com/blog
>> >
>> >
>>
>

Re: Interceptors: How to handle an unknown request?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Do you actually have getGreeting2 implemented ? Example, do you have two
SOAP endpoints, one implementing getGreeting and one getGreeting2 and you
want the consumers of getGreeting2 be able to work with the old
getGreeting() ?

cheers, Sergey

On Thu, Dec 2, 2010 at 9:43 AM, Manoel Farrugia <ma...@gmail.com>wrote:

> I can even scrap the idea of Interceptors if there is a better way to
> do my wanted job!
>
> Instead of receiving soap:ServerNo such operation: getGreeting2 (HTTP
> GET PATH_INFO: /HelloWorldWebServices/HelloWorldPort/getGreeting2) I
> want to see the getGreeting response!
>
> How can I do it in CXF Web Services?
>
>
>
> On Wed, Dec 1, 2010 at 8:10 PM, Manoel Farrugia <ma...@gmail.com>
> wrote:
> > I am not restricted to handleFault only. I want to redirect any wrong
> > methods to getGreeting() method.
> >
> > On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org> wrote:
> >>
> >> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
> >> > Something like this:
> >> >
> >> > public void handleFault(Message message) {
> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >> >
> >> >      String path = (String)message.get(Message.PATH_INFO);
> >> >      String basePath = (String)message.get(Message.BASE_PATH);
> >> >      String query = (String)message.get(Message.QUERY_STRING);
> >> >      System.out.println("Path: "+path+". BasePath: "+basePath+".
> Query:
> >> > "+query+".");
> >> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >> >
> >> >      message.put(Message.PATH_INFO,
> >> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
> >> >
> >> >      path = (String)message.get(Message.PATH_INFO);
> >> >      System.out.println("NEW PATH: "+path);
> >> >     }
> >> >
> >> > That is changing the message's pathinfo from the wrong one
> >> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
> >> >
> >> > But I want to direct to
> >> > /HelloWorldWebServices/HelloWorldPort/getGreeting
> >> > from the handleFault method.
> >> > How should I do this?
> >>
> >> From handleFault?   Hmm...  No idea really.
> >>
> >> You  could TRY to do something like
> >> message.getInterceptorChain().reset();
> >> message.getIntercetporChain().processMessage(message);
> >> message.getInterceptorChain().pause();
> >>
> >> or similar.  I really have no idea what that would do.   Honestly, once
> >> the
> >> fault occurs, things are somewhat left in an unpredictable state and I'm
> >> not
> >> sure what would happen.
> >>
> >> Dan
> >>
> >>
> >>
> >> >
> >> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org>
> wrote:
> >> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> >> > > > As a web service I have a getGreeting() method which is accessed
> by:
> >> > >
> >> > >
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
> >> > > ee
> >> > >
> >> > > > ting<
> >> > >
> >> > >
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> >> > >
> >> > > > tGreeting1?arg0=Manoel>
> >> > > >
> >> > > > Now I want that any other request method which does not exist in
> my
> >> > > > web
> >> > > > service (for example getGreetingMe()) is redirected to
> getGreeting()
> >> > > > as
> >> > >
> >> > > the
> >> > >
> >> > > > address above.
> >> > > >
> >> > > > How should I tackle this idea?
> >> > >
> >> > > If  this is just for the "GET" requests, it shouldn't be too hard.
> >> > >
> >> > > String path = (String)message.get(Message.PATH_INFO);
> >> > > String basePath = (String)message.get(Message.BASE_PATH);
> >> > > String query = (String)message.get(Message.QUERY_STRING);
> >> > >
> >> > > would get you the values that were sent in.  You would just need to
> >> > > reset
> >> > > them
> >> > > to the "getGreeting" versions of those via message.put(...) type
> >> > > things.
> >> > >
> >> > > --
> >> > > Daniel Kulp
> >> > > dkulp@apache.org
> >> > > http://dankulp.com/blog
> >>
> >> --
> >> Daniel Kulp
> >> dkulp@apache.org
> >> http://dankulp.com/blog
> >
> >
>

Re: Interceptors: How to handle an unknown request?

Posted by Manoel Farrugia <ma...@gmail.com>.
I can even scrap the idea of Interceptors if there is a better way to
do my wanted job!

Instead of receiving soap:ServerNo such operation: getGreeting2 (HTTP
GET PATH_INFO: /HelloWorldWebServices/HelloWorldPort/getGreeting2) I
want to see the getGreeting response!

How can I do it in CXF Web Services?



On Wed, Dec 1, 2010 at 8:10 PM, Manoel Farrugia <ma...@gmail.com> wrote:
> I am not restricted to handleFault only. I want to redirect any wrong
> methods to getGreeting() method.
>
> On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org> wrote:
>>
>> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
>> > Something like this:
>> >
>> > public void handleFault(Message message) {
>> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
>> >
>> >      String path = (String)message.get(Message.PATH_INFO);
>> >      String basePath = (String)message.get(Message.BASE_PATH);
>> >      String query = (String)message.get(Message.QUERY_STRING);
>> >      System.out.println("Path: "+path+". BasePath: "+basePath+". Query:
>> > "+query+".");
>> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
>> >
>> >      message.put(Message.PATH_INFO,
>> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
>> >
>> >      path = (String)message.get(Message.PATH_INFO);
>> >      System.out.println("NEW PATH: "+path);
>> >     }
>> >
>> > That is changing the message's pathinfo from the wrong one
>> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
>> >
>> > But I want to direct to
>> > /HelloWorldWebServices/HelloWorldPort/getGreeting
>> > from the handleFault method.
>> > How should I do this?
>>
>> From handleFault?   Hmm...  No idea really.
>>
>> You  could TRY to do something like
>> message.getInterceptorChain().reset();
>> message.getIntercetporChain().processMessage(message);
>> message.getInterceptorChain().pause();
>>
>> or similar.  I really have no idea what that would do.   Honestly, once
>> the
>> fault occurs, things are somewhat left in an unpredictable state and I'm
>> not
>> sure what would happen.
>>
>> Dan
>>
>>
>>
>> >
>> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org> wrote:
>> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
>> > > > As a web service I have a getGreeting() method which is accessed by:
>> > >
>> > > http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
>> > > ee
>> > >
>> > > > ting<
>> > >
>> > > http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
>> > >
>> > > > tGreeting1?arg0=Manoel>
>> > > >
>> > > > Now I want that any other request method which does not exist in my
>> > > > web
>> > > > service (for example getGreetingMe()) is redirected to getGreeting()
>> > > > as
>> > >
>> > > the
>> > >
>> > > > address above.
>> > > >
>> > > > How should I tackle this idea?
>> > >
>> > > If  this is just for the "GET" requests, it shouldn't be too hard.
>> > >
>> > > String path = (String)message.get(Message.PATH_INFO);
>> > > String basePath = (String)message.get(Message.BASE_PATH);
>> > > String query = (String)message.get(Message.QUERY_STRING);
>> > >
>> > > would get you the values that were sent in.  You would just need to
>> > > reset
>> > > them
>> > > to the "getGreeting" versions of those via message.put(...) type
>> > > things.
>> > >
>> > > --
>> > > Daniel Kulp
>> > > dkulp@apache.org
>> > > http://dankulp.com/blog
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org
>> http://dankulp.com/blog
>
>

Re: Interceptors: How to handle an unknown request?

Posted by Manoel Farrugia <ma...@gmail.com>.
I am not restricted to handleFault only. I want to redirect any wrong
methods to getGreeting() method.


On Wed, Dec 1, 2010 at 8:07 PM, Daniel Kulp <dk...@apache.org> wrote:

> On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
> > Something like this:
> >
> > public void handleFault(Message message) {
> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >
> >      String path = (String)message.get(Message.PATH_INFO);
> >      String basePath = (String)message.get(Message.BASE_PATH);
> >      String query = (String)message.get(Message.QUERY_STRING);
> >      System.out.println("Path: "+path+". BasePath: "+basePath+". Query:
> > "+query+".");
> >      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> >
> >      message.put(Message.PATH_INFO,
> > "/HelloWorldWebServices/HelloWorldPort/getGreeting");
> >
> >      path = (String)message.get(Message.PATH_INFO);
> >      System.out.println("NEW PATH: "+path);
> >     }
> >
> > That is changing the message's pathinfo from the wrong one
> > to /HelloWorldWebServices/HelloWorldPort/getGreeting
> >
> > But I want to direct to /HelloWorldWebServices/HelloWorldPort/getGreeting
> > from the handleFault method.
> > How should I do this?
>
> From handleFault?   Hmm...  No idea really.
>
> You  could TRY to do something like
> message.getInterceptorChain().reset();
> message.getIntercetporChain().processMessage(message);
> message.getInterceptorChain().pause();
>
> or similar.  I really have no idea what that would do.   Honestly, once the
> fault occurs, things are somewhat left in an unpredictable state and I'm
> not
> sure what would happen.
>
> Dan
>
>
>
> >
> > On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org> wrote:
> > > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> > > > As a web service I have a getGreeting() method which is accessed by:
> > >
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
> > > ee
> > >
> > > > ting<
> > >
> > > http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> > >
> > > > tGreeting1?arg0=Manoel>
> > > >
> > > > Now I want that any other request method which does not exist in my
> web
> > > > service (for example getGreetingMe()) is redirected to getGreeting()
> as
> > >
> > > the
> > >
> > > > address above.
> > > >
> > > > How should I tackle this idea?
> > >
> > > If  this is just for the "GET" requests, it shouldn't be too hard.
> > >
> > > String path = (String)message.get(Message.PATH_INFO);
> > > String basePath = (String)message.get(Message.BASE_PATH);
> > > String query = (String)message.get(Message.QUERY_STRING);
> > >
> > > would get you the values that were sent in.  You would just need to
> reset
> > > them
> > > to the "getGreeting" versions of those via message.put(...) type
> things.
> > >
> > > --
> > > Daniel Kulp
> > > dkulp@apache.org
> > > http://dankulp.com/blog
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>

Re: Interceptors: How to handle an unknown request?

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 01 December 2010 5:49:41 am Manoel Farrugia wrote:
> Something like this:
> 
> public void handleFault(Message message) {
>      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> 
>      String path = (String)message.get(Message.PATH_INFO);
>      String basePath = (String)message.get(Message.BASE_PATH);
>      String query = (String)message.get(Message.QUERY_STRING);
>      System.out.println("Path: "+path+". BasePath: "+basePath+". Query:
> "+query+".");
>      System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");
> 
>      message.put(Message.PATH_INFO,
> "/HelloWorldWebServices/HelloWorldPort/getGreeting");
> 
>      path = (String)message.get(Message.PATH_INFO);
>      System.out.println("NEW PATH: "+path);
>     }
> 
> That is changing the message's pathinfo from the wrong one
> to /HelloWorldWebServices/HelloWorldPort/getGreeting
> 
> But I want to direct to /HelloWorldWebServices/HelloWorldPort/getGreeting
> from the handleFault method.
> How should I do this?

From handleFault?   Hmm...  No idea really.

You  could TRY to do something like 
message.getInterceptorChain().reset();
message.getIntercetporChain().processMessage(message);
message.getInterceptorChain().pause();

or similar.  I really have no idea what that would do.   Honestly, once the 
fault occurs, things are somewhat left in an unpredictable state and I'm not 
sure what would happen.

Dan



> 
> On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org> wrote:
> > On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> > > As a web service I have a getGreeting() method which is accessed by:
> > http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGr
> > ee
> > 
> > > ting<
> > 
> > http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> > 
> > > tGreeting1?arg0=Manoel>
> > > 
> > > Now I want that any other request method which does not exist in my web
> > > service (for example getGreetingMe()) is redirected to getGreeting() as
> > 
> > the
> > 
> > > address above.
> > > 
> > > How should I tackle this idea?
> > 
> > If  this is just for the "GET" requests, it shouldn't be too hard.
> > 
> > String path = (String)message.get(Message.PATH_INFO);
> > String basePath = (String)message.get(Message.BASE_PATH);
> > String query = (String)message.get(Message.QUERY_STRING);
> > 
> > would get you the values that were sent in.  You would just need to reset
> > them
> > to the "getGreeting" versions of those via message.put(...) type things.
> > 
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://dankulp.com/blog

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Interceptors: How to handle an unknown request?

Posted by Manoel Farrugia <ma...@gmail.com>.
Something like this:

public void handleFault(Message message) {
     System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");

     String path = (String)message.get(Message.PATH_INFO);
     String basePath = (String)message.get(Message.BASE_PATH);
     String query = (String)message.get(Message.QUERY_STRING);
     System.out.println("Path: "+path+". BasePath: "+basePath+". Query:
"+query+".");
     System.out.println("------FAAAAAUUUUUUUULLLLLLTTTTTT-------");

     message.put(Message.PATH_INFO,
"/HelloWorldWebServices/HelloWorldPort/getGreeting");

     path = (String)message.get(Message.PATH_INFO);
     System.out.println("NEW PATH: "+path);
    }

That is changing the message's pathinfo from the wrong one
to /HelloWorldWebServices/HelloWorldPort/getGreeting

But I want to direct to /HelloWorldWebServices/HelloWorldPort/getGreeting
from the handleFault method.
How should I do this?



On Tue, Nov 30, 2010 at 10:01 PM, Daniel Kulp <dk...@apache.org> wrote:

> On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> > As a web service I have a getGreeting() method which is accessed by:
> >
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGree
> > ting<
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> > tGreeting1?arg0=Manoel>
> >
> > Now I want that any other request method which does not exist in my web
> > service (for example getGreetingMe()) is redirected to getGreeting() as
> the
> > address above.
> >
> > How should I tackle this idea?
>
> If  this is just for the "GET" requests, it shouldn't be too hard.
>
> String path = (String)message.get(Message.PATH_INFO);
> String basePath = (String)message.get(Message.BASE_PATH);
> String query = (String)message.get(Message.QUERY_STRING);
>
> would get you the values that were sent in.  You would just need to reset
> them
> to the "getGreeting" versions of those via message.put(...) type things.
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>

Re: Interceptors: How to handle an unknown request?

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 30 November 2010 5:31:10 am Manoel Farrugia wrote:
> As a web service I have a getGreeting() method which is accessed by:
> http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/getGree
> ting<http://localhost:8080/HelloWorldWebServices/services/HelloWorldPort/ge
> tGreeting1?arg0=Manoel>
> 
> Now I want that any other request method which does not exist in my web
> service (for example getGreetingMe()) is redirected to getGreeting() as the
> address above.
> 
> How should I tackle this idea?

If  this is just for the "GET" requests, it shouldn't be too hard.   

String path = (String)message.get(Message.PATH_INFO);
String basePath = (String)message.get(Message.BASE_PATH);
String query = (String)message.get(Message.QUERY_STRING);

would get you the values that were sent in.  You would just need to reset them 
to the "getGreeting" versions of those via message.put(...) type things.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog