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 Takanori Suzuki <ta...@gmail.com> on 2007/11/22 16:13:20 UTC

[Axis2 1.3]RESTFul serivce problem when parameters are short

Hi,
I'm using Axis2 1.3.

If I develop a RESTFul web service,
there is a case that service paramters are not correctly set.

The service class is :
------------------------------------------------------------
public class RESTfulEcho {

    public EchoDto echo(Integer id, String message) {
        EchoDto dto = new EchoDto();
        dto.setId(id);
        dto.setMessage(message);
        return dto;
    }
}

I've tried to call the service like this :
------------------------------------------------------------
http://localhost:8080/axis2/services/RESTfulEcho/echo?message=123

The parameter "id" is not explicitly set.


Then the service parameters are :

  id      ---> 1234
  message ---> null


When the parameters are explicitly set,
the service works correctly.
------------------------------------------------------------
http://localhost:8080/axis2/services/RESTfulEcho/echo?id=&message=123


But, I hope that when the parameters is not explicitly set,
the parameter is set null or throw a exception.


----
Thanks,
Takanori

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


Re: [Axis2 1.3]RESTFul serivce problem when parameters are short

Posted by Takanori Suzuki <ta...@gmail.com>.
Thanks, Keith.

2007/11/23, keith chapman <ke...@gmail.com>:
> Hi,
>
> This is an issue with the RPCMessageReceiver  and there is a JIRA opened
> against yhis. If you want to develop a nice RESTFull web service WSDL 2.0
> deployment would be the better way. If you like I can help you write the
> WSDL 2.0 doc for this so that you can codegenarate the skeleton and the stub
> if you wish to.

I want to call the service from a browser,
so I don't codegenarate the skeleton and the stub.

I opend  a JIRA :
https://issues.apache.org/jira/browse/AXIS2-3364

----
Thanks,
Takanori

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


Re: [Axis2 1.3]RESTFul serivce problem when parameters are short

Posted by keith chapman <ke...@gmail.com>.
Hi,

This is an issue with the RPCMessageReceiver  and there is a JIRA opened
against yhis. If you want to develop a nice RESTFull web service WSDL
2.0deployment would be the better way. If you like I can help you
write the
WSDL 2.0 doc for this so that you can codegenarate the skeleton and the stub
if you wish to.

Thanks,
Keith.

On Nov 22, 2007 8:43 PM, Takanori Suzuki <ta...@gmail.com> wrote:

> Hi,
> I'm using Axis2 1.3.
>
> If I develop a RESTFul web service,
> there is a case that service paramters are not correctly set.
>
> The service class is :
> ------------------------------------------------------------
> public class RESTfulEcho {
>
>    public EchoDto echo(Integer id, String message) {
>        EchoDto dto = new EchoDto();
>        dto.setId(id);
>        dto.setMessage(message);
>        return dto;
>    }
> }
>
> I've tried to call the service like this :
> ------------------------------------------------------------
> http://localhost:8080/axis2/services/RESTfulEcho/echo?message=123
>
> The parameter "id" is not explicitly set.
>
>
> Then the service parameters are :
>
>  id      ---> 1234
>  message ---> null
>
>
> When the parameters are explicitly set,
> the service works correctly.
> ------------------------------------------------------------
> http://localhost:8080/axis2/services/RESTfulEcho/echo?id=&message=123
>
>
> But, I hope that when the parameters is not explicitly set,
> the parameter is set null or throw a exception.
>
>
> ----
> Thanks,
> Takanori
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/