axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Sprat <rexclaim...@yahoo.com>
Subject Re: [Axis2] valid SOAP operations
Date Fri, 30 May 2008 04:08:33 GMT
It is the last handler listed in the Dispatch phase of the InFlow phase order.

Thanks,
T


Eran Chinthaka <eran.chinthaka@gmail.com> wrote: Where in InFlow will be your handler?
Tell me its location relative to dispatch phase, and don't tell me its before the dispatch
phase ;)

On Thu, May 29, 2008 at 10:25 AM, Jack Sprat <rexclaimer2@yahoo.com> wrote:
 Where/how do I get the AxisService object in the code sample below?
 The code will be in the invoke method of my handler class that is invoked in the InFlow phase.
  
 Thanks.
 T



Eran Chinthaka <eran.chinthaka@gmail.com> wrote:  


AxisService service; // your axis service
String action = messageContext.getSoapAction();

AxisOperation op = service.getOperationBySOAPAction(action);


if (op == null) {
   op = service.getOperationByAction(action);
}



Please see [1] for more details. 

HTH,
 Chinthaka
 
[1] : http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java?view=markup
  
On Tue, May 27, 2008 at 10:58 AM, Jack Sprat <rexclaimer2@yahoo.com> wrote:
  I think I've made the question more complicated than it needed to be.
All I really need to know is whether the valid SOAP operations for a service are available
in an Axis2 class somewhere?
Something like getValidSOAPOpeations() that returns a list would be ideal.  Otherwise I'll
need to hard-code constants for each operation in the WSDL and compare the results of  getSOAPAction
to each one. 


Thanks,
T


keith chapman <keithgchapman@gmail.com> wrote:   Why not write a custom dispatcher that
does this. After all this is what your trying to do (Dispatch to an operation using some custom
information).  You can have a look at the inbuilt dispatchers tp get an idea. Its pretty simple
to write a new one.
   
Thanks, 
Keith.

On Tue, May 27, 2008 at 8:33 PM, Jack Sprat <rexclaimer2@yahoo.com> wrote:
   What I am trying to do is validate the SOAP operation invoked in the  handler class so
I can take the appropriate action.
I've found that many clients trying to consume the service don't know much about web services
so they may send a request with no SOAPAction header or an invalid one.
   For example, my valid operations may be echo and calculate.  Can these 2 operations be
determined programatically somehow?  I'd like to get the valid operations this way and compare
what I got from the getSOAPAction() method to see if I got a valid operation.  Basically,
I'm trying to avoid hard-coding the operations in my Java code.
   
Thanks,
T



keith chapman <keithgchapman@gmail.com> wrote:    Hi Jack,

Can you state your requirement more clearly, that should help us provide you with a clear
answer too. I couldn't   understand what you are intending to do

Thanks,
Keith.

  On Tue, May 27, 2008 at 7:50 PM, Jack Sprat <rexclaimer2@yahoo.com> wrote:
    I have a service that invokes a handler at the InFlow phase. Is there a way to programatically
determine the valid SOAP operations at this point? I'd like to compare the value from getSOAPAction()
to ensure a valid operation was requested.
    I'm open to a better way of doing this.

Thanks,
T.

          
 
         


 
           



  



 

       
Mime
View raw message