Re: [Axis2] REST request not quite working

2006-09-20 Thread Salma Soleil
I'm facing the same problem. I guess its a bug.
 
On 9/20/06, Shruti Krishnagiri <[EMAIL PROTECTED]> wrote:

Shruti Krishnagiri <[EMAIL PROTECTED]> wrote: 

I'm facing a problem getting a specific REST request to work.
One of my service methods takes in an array of strings as a parameter and the corresponding wsdl snippet looks like this:
- "generatePriceList">- -   "0" type=
"xs:string" name="items" maxOccurs="unbounded" />       
 
The Rest request is however only constructing an array of one string even though I specified an '&' separated list. Only the first goes into the array. The SOAP request for the same works correctly. What am I doing wrong?




Get your own web address for just $1.99/1st yr. We'll help. 
Yahoo! Small Business. 





How low will we go? Check out Yahoo! Messenger's low 
PC-to-Phone call rates. 



[Axis 2] Getting web application path

2006-10-10 Thread Salma Soleil
How can I get the url path of my web app from the service? For example http://myhost:myport/mywebapp.
I tried using 

public void setOperationContext(OperationContext opCtx) 
throws AxisFault
{
inMessageContext =
opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
}
but the MessageContext seems to not have any properties loaded.


[Axis 2.0] Trouble with returning OMElement

2006-10-12 Thread Salma Soleil
I have a method 
public OMElement sayHello()
{
    return someMethodThatGeneratesTheOMElement();
}
 
The problem is that the auto-generated wsdl generates the sayHelloResponse with element name 'return' and the OM element goes in as  in the xml response. I want either the 'return' to be changeable (which I can't seem to do), or not be there at all and instead return only my OMElement. Is there any way of doing this??

 


Re: [Axis 2.0] Trouble with returning OMElement

2006-10-13 Thread Salma Soleil
Anybody?? Is this such a bizarre thing to want to do?
On 10/12/06, Salma Soleil <[EMAIL PROTECTED]> wrote:

I have a method 
public OMElement sayHello()
{
    return someMethodThatGeneratesTheOMElement();
}
 
The problem is that the auto-generated wsdl generates the sayHelloResponse with element name 'return' and the OM element goes in as  in the xml response. I want either the 'return' to be changeable (which I can't seem to do), or not be there at all and instead return only my OMElement. Is there any way of doing this?? 

 


[Axis 2] Catching exception for invalid number of arguments

2006-10-20 Thread Salma Soleil
My service method takes in as parameter String url. In a SOAP request, when I pass leave out the url, I get url="" and I'm able to handle this as desired. But with a REST request, a 404 is thrown before entering the service and I have no control in handling this exception. 

Is there any workaround this?


Re: Trying to incorporate axis2 1.1 to my existing Web app

2006-11-15 Thread Salma Soleil

Do you have addressing-1.x.mar in your-web-app-dir/WEB-INF/modules ?


On 11/15/06, ying lcs <[EMAIL PROTECTED]> wrote:


Hi,

I am trying to incorporate axis2 1.1 to my existing Web app so that I
can export my part of my web app as web service.

Here is what I did:
* I copy all the sub-directories from WEB-INF axis2.war to my WEB-INF
* and copy all Axis2 servlet from web.xml in axis2.war  to my web.xml
* as a test, i copy WeatherService.aar to WEB-INF/services

And then I hit http://localhost:8080/mytestWebApp/services/WeatherService

But I get this error, can anyone please help me? I can't figure out
what am I missing:

ype Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

javax.servlet.ServletException: Trying to engage a module which is not
available : addressing
   at org.apache.axis2.transport.http.AxisServlet.init(
AxisServlet.java:334)
   at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:879)
   at org.apache.catalina.core.StandardWrapper.allocate(
StandardWrapper.java:612)
   at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:163)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:595)
   at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:432)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:954)
   at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:138)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:595)
   at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:432)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:954)
   at org.apache.catalina.core.StandardContext.invoke(
StandardContext.java:2459)
   at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:132)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:595)
   at org.apache.catalina.valves.ErrorDispatcherValve.invoke(
ErrorDispatcherValve.java:118)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:593)
   at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:116)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:593)
   at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:432)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:954)
   at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:126)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:595)
   at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:432)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:954)
   at org.apache.coyote.tomcat4.CoyoteAdapter.service(
CoyoteAdapter.java:152)
   at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:869)
   at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:534)

root cause

javax.servlet.ServletException: Trying to engage a module which is not
available : addressing
   at org.apache.axis2.transport.http.AxisServlet.initConfigContext(
AxisServlet.java:378)
   at org.apache.axis2.transport.http.AxisServlet.init(
AxisServlet.java:317)
   at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:879)
   at org.apache.catalina.core.StandardWrapper.allocate(
StandardWrapper.java:612)
   at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:163)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:595)
   at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:432)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:954)
   at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:138)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext
(StandardPipeline.java:595)
   at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:432)
   at org.apache.catalina.core.ContainerBase

Re: [Axis2] invoke REST service with url params

2006-12-06 Thread Salma Soleil

If I understand your question correctly, if your operation looks like this:
 getEcho(String part1), then your REST request would be as you have
written http://localhost:8080/axis2/MyService/getEcho?part1=helloREST

 So multiple parameter as in getEcho(String part1, String part2) would
look like this

http://localhost:8080/axis2/MyService/getEcho?part1=helloREST&part2=helloAgainREST




On 12/6/06, Ran <[EMAIL PROTECTED]> wrote:


Hi,
I have got REST working under
http://localhost:8080/axis2/MyService/getEcho
getEcho is an operation of MyService.

How do I invoke getEcho with parameters to pass in input ? such as
http://localhost:8080/axis2/MyService/getEcho?part1=helloREST would call
getEcho with parameter part1 set to helloREST

Thanks,
ran






NullPointerException at org.apache.axis2.deployment.WarBasedAxisConfigurator.(WarBasedAxisConfigurator.java:81)

2006-12-20 Thread Salma Soleil

I have a successul web service up and running on windows. I'm trying to port
this onto linux under tomcat 5.0.28 under an existing webapp (it's under the
same webapp on windows and it works). But I get this exception on tomcat
startup. What is wrong??


Re: No REST for axis2 v1.1

2006-12-29 Thread Salma Soleil

Set the parameter in axis2.xml

truehttp://wso2.org/library/254


On 12/29/06, Martin Gainty <[EMAIL PROTECTED]> wrote:


 How do i resolve this error when listing services or go to validate
services ?
(Note all I did was have tomcat browse and open the un-modified
axis2.1.1.war)
 Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml
--\-

This e-mail message (including attachments, if any) is intended for the
use of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.
---

Le présent message électronique (y compris les pièces qui y sont annexées,
le cas échéant) s'adresse au destinataire indiqué et peut contenir des
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
destinataire de ce document, nous vous signalons qu'il est strictement
interdit de le diffuser, de le distribuer ou de le reproduire.

- Original Message -
*From:* Manoj Khangaonkar <[EMAIL PROTECTED]>
*To:* axis-user@ws.apache.org ; Martin Gainty <[EMAIL PROTECTED]>
 *Sent:* Friday, December 29, 2006 7:03 PM
*Subject:* Re: No REST for axis2 v1.1


I presume you have seen this link that describes AXIS2 support for REST
and has some samples

http://ws.apache.org/axis2/1_1/rest-ws.html


On 12/29/06, Manoj Khangaonkar <[EMAIL PROTECTED]> wrote:
>
> I am not a REST expert, but it appears
>
> The quickstart example is invoked as a REST client.
>
> here is cut and paste from the userguide:
>
> begin guide -
>
> Once those url's are working, let's quickly test the service. Try
> pointing your browser to the following URL:
>
> http://localhost:8080/axis2/rest/StockQuoteService/getPrice?symbol=IBM
>
> end guide -
>
> This invokes AXISRestServlet and not AXISServlet and follows the code path 
for REST services.
>
>
>
>
>  On 12/29/06, Martin Gainty <[EMAIL PROTECTED] > wrote:
> >
> >  apparently that was a patch for a CLASSPATH issue
> > specifically I am looking for REST service which none of the 2.1.1distros 
seem to have
> >
> > BTW there are 5 quickstarts that are packaged in the 2.1.1 distro (and
> > none of them are a REST service)
> > /src/modules/samples/quickstart
> > /src/modules/samples/quickstartadb
> > /src/modules/samples/quickstartaxiom
> > /src/modules/samples/quickstartjibx
> > /src/modules/samples/quickstartxmlbeans
> >
> > M-
> > ---
> >
> > This e-mail message (including attachments, if any) is intended for
> > the use of the individual or entity to which it is addressed and may contain
> > information that is privileged, proprietary , confidential and exempt from
> > disclosure. If you are not the intended recipient, you are notified that any
> > dissemination, distribution or copying of this communication is strictly
> > prohibited.
> > ---
> >
> > Le présent message électronique (y compris les pièces qui y sont
> > annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir
> > des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
> > destinataire de ce document, nous vous signalons qu'il est strictement
> > interdit de le diffuser, de le distribuer ou de le reproduire.
> >
> > - Original Message -
> > *From:* Manoj Khangaonkar <[EMAIL PROTECTED]>
> > *To:* axis-user@ws.apache.org ; Martin Gainty <[EMAIL PROTECTED]>
> > *Sent:* Friday, December 29, 2006 12:23 PM
> > *Subject:* Re: No REST for axis2 v1.1
> >
> >
> > Martin,
> >
> > To add to my earlier response,
> >
> > REST should be enabled by default and for 1.1.1 the patch is for
> > AXIS2-1917.
> >
> > Mj
> >
> >
> > On 12/29/06, Manoj Khangaonkar <[EMAIL PROTECTED] > wrote:
> > >
> > > Martin,
> > >
> > > The quickstartsample is a rest sample. The client invokes the
> > > service using REST
> > >
> > > I have not tried it in 1.1.
> > >
> > > In 1.1.1 , it is broken and I have provided a patch AXIS2-1912.
> > >
> > > Mj
> > >
> > >
> > >  On 12/29/06, Martin Gainty <[EMAIL PROTECTED] > wrote:
> > > >
> > > >  Hello All- when attempting to access Axis 2 v 1.1 HappyAxis.jsp I
> > > > see
> > > > Please enable REST support in WEB-INF/conf/axis2.xml and
> > > > WEB-INF/web.xml Does anyone know how to enable rest support in
> > > > Axis 2 1.1?
> > > > Is there an example REST service available?
> > > >
> > > > Thx,
> > > > M-
> > > > 
---
> > > >
> > > > This e-mail message (including attachments, if any) is intended
> > > > for the use of the individual or entity to

Re: No REST for axis2 v1.1

2006-12-29 Thread Salma Soleil

Umm..not sure. Can you run a validator on your xml to make sure you don't
have syntax error?

On 12/29/06, Martin Gainty <[EMAIL PROTECTED]> wrote:


 Thank You Salma

Now I have a different error
2006-12-29 21:48:23,390 ERROR
org.apache.axis2.deployment.WarBasedAxisConfigurator -
org.apache.axis2.deployment.DeploymentException: Dispatch phase not found
on the global InFlow phase of the axis2.xml. Please recheck; nested
exception is:
 org.apache.axis2.deployment.DeploymentException: Dispatch phase not found
on the global InFlow phase of the axis2.xml. Please recheck: loading
repository from classpath
Here are the phase declarations from axis2.xml






























 



 































 



 




Advice ?
---

This e-mail message (including attachments, if any) is intended for the
use of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.
---

Le pr�sent message �lectronique (y compris les pi�ces qui y sont annex�es,
le cas �ch�ant) s'adresse au destinataire indiqu� et peut contenir des
renseignements de caract�re priv� ou confidentiel. Si vous n'�tes pas le
destinataire de ce document, nous vous signalons qu'il est strictement
interdit de le diffuser, de le distribuer ou de le reproduire.

- Original Message -
*From:* Salma Soleil <[EMAIL PROTECTED]>
*To:* axis-user@ws.apache.org ; Martin Gainty <[EMAIL PROTECTED]>
*Sent:* Friday, December 29, 2006 7:58 PM
*Subject:* Re: No REST for axis2 v1.1


Set the parameter in axis2.xml

truehttp://wso2.org/library/254


On 12/29/06, Martin Gainty <[EMAIL PROTECTED]> wrote:
>
>  How do i resolve this error when listing services or go to validate
> services ?
> (Note all I did was have tomcat browse and open the un-modified
> axis2.1.1.war)
>  Please enable REST support in WEB-INF/conf/axis2.xml and
> WEB-INF/web.xml
> --\-
>
> This e-mail message (including attachments, if any) is intended for the
> use of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure. If you are not the intended recipient, you are notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited.
> ---
>
> Le pr�sent message �lectronique (y compris les pi�ces qui y sont
> annex�es, le cas �ch�ant) s'adresse au destinataire indiqu� et peut contenir
> des renseignements de caract�re priv� ou confidentiel. Si vous n'�tes pas le
> destinataire de ce document, nous vous signalons qu'il est strictement
> interdit de le diffuser, de le distribuer ou de le reproduire.
>
>  - Original Message -
> *From:* Manoj Khangaonkar <[EMAIL PROTECTED]>
> *To:* axis-user@ws.apache.org ; Martin Gainty <[EMAIL PROTECTED]>
>  *Sent:* Friday, December 29, 2006 7:03 PM
> *Subject:* Re: No REST for axis2 v1.1
>
>
> I presume you have seen this link that describes AXIS2 support for REST
> and has some samples
>
> http://ws.apache.org/axis2/1_1/rest-ws.html
>
>
>  On 12/29/06, Manoj Khangaonkar <[EMAIL PROTECTED] > wrote:
>
> >  I am not a REST expert, but it appears
> >
> > The quickstart example is invoked as a REST client.
> >
> > here is cut and paste from the userguide:
> >
> > begin guide -
> >
> > Once those url's are working, let's quickly test the service. Try
> > pointing your browser to the following URL:
> >
> > http://localhost:8080/axis2/rest/StockQuoteService/getPrice?symbol=IBM
> >
> > end guide -
> >
> > This invokes AXISRestServlet