You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Harshad Chavan <ha...@yahoo.com> on 2008/06/24 20:39:46 UTC

How to add a web service without deploying it

Hello all,
 
I have an unusual problem.
 
A little background of the problem is --
 
We let user define his own operations through our web interface. These functions are written in Java. User can put some code in our application and call these functions dynamically. Now we want to expose these functions through web services. 
 
So e.g. if a user writes a function 
 
int addNumbers(int a, int b)
 
We want to give the user ability to call these functions through his SOAP client.
 
We generate the WSDL dynamically and expose this function through this WSDL as an operation.
 
Now when the user calls this function, we get operation not found AxisFault on the client. This is because the service is not defined in the services.xml, which is a normal behaviour. This exception comes in the DispatchPhase class.
 
Is there any way to bypass all these checks and still get the XML on the server side, so that we can execute the functions on the server side.
 
Note that we do not implement the skeleton classes, but have written our server side implementation in the MessageReceiverInOut class that was generated by WSDL2Java.
 
 
Any help will be greatly appreciated.
 
Thanks,
 
Harshad


      

Re: How to add a web service without deploying it

Posted by Deepal Jayasinghe <de...@opensource.lk>.
> Hi Deepal,
>
> Thanks for the quick answer.
>
> But Dispatch Phase is a system phase. Can we still write a handler 
> before it?
>
of course you can,
>
> Also, would the call go forward after my custom handler or would it 
> return from this custom handler?
>
> Sorry, if the questions are dumb, but I am new to Axis project.
>
No worries.
>
> Thanks,
>
> Harshad
>
> --- On *Tue, 6/24/08, Deepal Jayasinghe /<de...@opensource.lk>/* wrote:
>
>     From: Deepal Jayasinghe <de...@opensource.lk>
>     Subject: Re: How to add a web service without deploying it
>     To: axis-user@ws.apache.org
>     Date: Tuesday, June 24, 2008, 9:13 PM
>
>     > Hello all,
>     >
>     >  
>     >
>     > I have an unusual problem.
>     >
>     >  
>     >
>     > A little background of
>      the problem is --
>     >
>     >  
>     >
>     > We let user define his own operations through our web interface. These 
>     > functions are written in Java. User can put some code in our 
>     > application and call these functions dynamically. Now we want to 
>     > expose these functions through web services.
>     >
>     >  
>     >
>     > So e.g. if a user writes a function
>     >
>     >  
>     >
>     > int addNumbers(int a, int b)
>     >
>     >  
>     >
>     > We want to give the user ability to call these functions through his 
>     > SOAP client.
>     >
>     >  
>     >
>     > We generate the WSDL dynamically and expose this function through this 
>     > WSDL as an operation.
>     >
>     >  
>     >
>     > Now when the user calls this function, we get operation not found 
>     > AxisFault on the client. This is because the service is not defined in 
>     > the services.xml, which is a normal behaviour. This exception
>      comes in 
>     > the DispatchPhase class.
>     >
>     Well the solution would be to have a handler before the dispatch phase 
>     to dispatch to your service and operation , then everything will work fine.
>
>
>     -- 
>     Thanks,
>     Deepal
>     ................................................................
>     http://blogs.deepal.org/
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: How to add a web service without deploying it

Posted by Harshad Chavan <ha...@yahoo.com>.
Hi Deepal,

Thanks for the quick answer.

But Dispatch Phase is a system phase. Can we still write a handler before it?

Also, would the call go forward after my custom handler or would it return from this custom handler?

Sorry, if the questions are dumb, but I am new to Axis project.

Thanks,

Harshad

--- On Tue, 6/24/08, Deepal Jayasinghe <de...@opensource.lk> wrote:
From: Deepal Jayasinghe <de...@opensource.lk>
Subject: Re: How to add a web service without deploying it
To: axis-user@ws.apache.org
Date: Tuesday, June 24, 2008, 9:13 PM

> Hello all,
>
>  
>
> I have an unusual problem.
>
>  
>
> A little background of the problem is --
>
>  
>
> We let user define his own operations through our web interface. These 
> functions are written in Java. User can put some code in our 
> application and call these functions dynamically. Now we want to 
> expose these functions through web services.
>
>  
>
> So e.g. if a user writes a function
>
>  
>
> int addNumbers(int a, int b)
>
>  
>
> We want to give the user ability to call these functions through his 
> SOAP client.
>
>  
>
> We generate the WSDL dynamically and expose this function through this 
> WSDL as an operation.
>
>  
>
> Now when the user calls this function, we get operation not found 
> AxisFault on the client. This is because the service is not defined in 
> the services.xml, which is a normal behaviour. This exception comes in 
> the DispatchPhase class.
>
Well the solution would be to have a handler before the dispatch phase 
to dispatch to your service and operation , then everything will work fine.


-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


      

Re: How to add a web service without deploying it

Posted by Deepal Jayasinghe <de...@opensource.lk>.

> Hello all,
>
>  
>
> I have an unusual problem.
>
>  
>
> A little background of the problem is --
>
>  
>
> We let user define his own operations through our web interface. These 
> functions are written in Java. User can put some code in our 
> application and call these functions dynamically. Now we want to 
> expose these functions through web services.
>
>  
>
> So e.g. if a user writes a function
>
>  
>
> int addNumbers(int a, int b)
>
>  
>
> We want to give the user ability to call these functions through his 
> SOAP client.
>
>  
>
> We generate the WSDL dynamically and expose this function through this 
> WSDL as an operation.
>
>  
>
> Now when the user calls this function, we get operation not found 
> AxisFault on the client. This is because the service is not defined in 
> the services.xml, which is a normal behaviour. This exception comes in 
> the DispatchPhase class.
>
Well the solution would be to have a handler before the dispatch phase 
to dispatch to your service and operation , then everything will work fine.


-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org