You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Gabo Manuel (JIRA)" <ji...@apache.org> on 2008/08/13 09:10:44 UTC

[jira] Created: (CXF-1744) First parameter not retrieved if location is just a slash

First parameter not retrieved if location is just a slash
---------------------------------------------------------

                 Key: CXF-1744
                 URL: https://issues.apache.org/jira/browse/CXF-1744
             Project: CXF
          Issue Type: Bug
          Components: REST
    Affects Versions: 2.1.1
         Environment: Windows Vista, service pack 1
Tomcat 6.0.13
IE 6
jdk1.6.0_01

            Reporter: Gabo Manuel
             Fix For: 2.1.1


Hi All,

I modified the restful sample as follows:

added the following method in the interface:

    @Get
    @HttpResource(location="/{first}/{last}") 
    Customer findCustomer(@WebParam(name="first") String firstName, @WebParam(name="last") String lastName) throws CustomerNotFoundFault;

made the following implementation:

	@Override
	public Customer findCustomer(String firstName, String lastName)
			throws CustomerNotFoundFault {
		
		System.out.println("firstname="+firstName);
		System.out.println("lastname="+lastName);
		return createCustomer();
	}

the web.xml is pretty much the same as in http://cwiki.apache.org/CXF20DOC/http-binding.html, except for the following:

	<servlet-mapping>
		<servlet-name>CXFServlet</servlet-name>
		<url-pattern>/services/*</url-pattern>
	</servlet-mapping>

the content of the beans.xml is again almost the same as the site mentioned except for the id and address as seen below:

    <jaxws:endpoint 
        id="demo" 
        address="/customers" 
        bindingUri="http://apache.org/cxf/binding/http"
        implementor="demo.restful.server.CustomerServiceImpl"
        >
      <jaxws:serviceFactory>
        <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
           <property name="wrapped" value="true" />
        </bean>
      </jaxws:serviceFactory>
    </jaxws:endpoint>

lib contents are what is included in the distribution. 

Accessed it via IE6 using the following URL:

http://localhost:8080/cxf/services/customers/123/4321

Print out is the following:

Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage INFO: Invoking GET on /123/4321
Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor handleMessage INFO: URIParameterInterceptor handle message on path [/123/4321] with content-type [null]
firstname=
lastname=4321

The weird thing is if I change the annotation to:
@HttpResource(location="/customers/{first}/{last}") 

and the URL to:
http://localhost:8080/cxf/services/customers/customers/123/4321

The parameters are properly retrieved.

----
Gabo Manuel

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-1744) First parameter not retrieved if location is just a slash

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-1744:
-----------------------------

    Fix Version/s:     (was: 2.1.1)

> First parameter not retrieved if location is just a slash
> ---------------------------------------------------------
>
>                 Key: CXF-1744
>                 URL: https://issues.apache.org/jira/browse/CXF-1744
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.1.1
>         Environment: Windows Vista, service pack 1
> Tomcat 6.0.13
> IE 6
> jdk1.6.0_01
>            Reporter: Gabo Manuel
>
> Hi All,
> I modified the restful sample as follows:
> added the following method in the interface:
>     @Get
>     @HttpResource(location="/{first}/{last}") 
>     Customer findCustomer(@WebParam(name="first") String firstName, @WebParam(name="last") String lastName) throws CustomerNotFoundFault;
> made the following implementation:
> 	@Override
> 	public Customer findCustomer(String firstName, String lastName)
> 			throws CustomerNotFoundFault {
> 		
> 		System.out.println("firstname="+firstName);
> 		System.out.println("lastname="+lastName);
> 		return createCustomer();
> 	}
> the web.xml is pretty much the same as in http://cwiki.apache.org/CXF20DOC/http-binding.html, except for the following:
> 	<servlet-mapping>
> 		<servlet-name>CXFServlet</servlet-name>
> 		<url-pattern>/services/*</url-pattern>
> 	</servlet-mapping>
> the content of the beans.xml is again almost the same as the site mentioned except for the id and address as seen below:
>     <jaxws:endpoint 
>         id="demo" 
>         address="/customers" 
>         bindingUri="http://apache.org/cxf/binding/http"
>         implementor="demo.restful.server.CustomerServiceImpl"
>         >
>       <jaxws:serviceFactory>
>         <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>            <property name="wrapped" value="true" />
>         </bean>
>       </jaxws:serviceFactory>
>     </jaxws:endpoint>
> lib contents are what is included in the distribution. 
> Accessed it via IE6 using the following URL:
> http://localhost:8080/cxf/services/customers/123/4321
> Print out is the following:
> Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage INFO: Invoking GET on /123/4321
> Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor handleMessage INFO: URIParameterInterceptor handle message on path [/123/4321] with content-type [null]
> firstname=
> lastname=4321
> The weird thing is if I change the annotation to:
> @HttpResource(location="/customers/{first}/{last}") 
> and the URL to:
> http://localhost:8080/cxf/services/customers/customers/123/4321
> The parameters are properly retrieved.
> ----
> Gabo Manuel

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1744) First parameter not retrieved if location is just a slash

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655268#action_12655268 ] 

Sergey Beryozkin commented on CXF-1744:
---------------------------------------

Http Binding is deprecated, won't fix

> First parameter not retrieved if location is just a slash
> ---------------------------------------------------------
>
>                 Key: CXF-1744
>                 URL: https://issues.apache.org/jira/browse/CXF-1744
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.1.1
>         Environment: Windows Vista, service pack 1
> Tomcat 6.0.13
> IE 6
> jdk1.6.0_01
>            Reporter: Gabo Manuel
>
> Hi All,
> I modified the restful sample as follows:
> added the following method in the interface:
>     @Get
>     @HttpResource(location="/{first}/{last}") 
>     Customer findCustomer(@WebParam(name="first") String firstName, @WebParam(name="last") String lastName) throws CustomerNotFoundFault;
> made the following implementation:
> 	@Override
> 	public Customer findCustomer(String firstName, String lastName)
> 			throws CustomerNotFoundFault {
> 		
> 		System.out.println("firstname="+firstName);
> 		System.out.println("lastname="+lastName);
> 		return createCustomer();
> 	}
> the web.xml is pretty much the same as in http://cwiki.apache.org/CXF20DOC/http-binding.html, except for the following:
> 	<servlet-mapping>
> 		<servlet-name>CXFServlet</servlet-name>
> 		<url-pattern>/services/*</url-pattern>
> 	</servlet-mapping>
> the content of the beans.xml is again almost the same as the site mentioned except for the id and address as seen below:
>     <jaxws:endpoint 
>         id="demo" 
>         address="/customers" 
>         bindingUri="http://apache.org/cxf/binding/http"
>         implementor="demo.restful.server.CustomerServiceImpl"
>         >
>       <jaxws:serviceFactory>
>         <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>            <property name="wrapped" value="true" />
>         </bean>
>       </jaxws:serviceFactory>
>     </jaxws:endpoint>
> lib contents are what is included in the distribution. 
> Accessed it via IE6 using the following URL:
> http://localhost:8080/cxf/services/customers/123/4321
> Print out is the following:
> Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage INFO: Invoking GET on /123/4321
> Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor handleMessage INFO: URIParameterInterceptor handle message on path [/123/4321] with content-type [null]
> firstname=
> lastname=4321
> The weird thing is if I change the annotation to:
> @HttpResource(location="/customers/{first}/{last}") 
> and the URL to:
> http://localhost:8080/cxf/services/customers/customers/123/4321
> The parameters are properly retrieved.
> ----
> Gabo Manuel

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-1744) First parameter not retrieved if location is just a slash

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-1744.
-----------------------------------

    Resolution: Won't Fix

> First parameter not retrieved if location is just a slash
> ---------------------------------------------------------
>
>                 Key: CXF-1744
>                 URL: https://issues.apache.org/jira/browse/CXF-1744
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.1.1
>         Environment: Windows Vista, service pack 1
> Tomcat 6.0.13
> IE 6
> jdk1.6.0_01
>            Reporter: Gabo Manuel
>
> Hi All,
> I modified the restful sample as follows:
> added the following method in the interface:
>     @Get
>     @HttpResource(location="/{first}/{last}") 
>     Customer findCustomer(@WebParam(name="first") String firstName, @WebParam(name="last") String lastName) throws CustomerNotFoundFault;
> made the following implementation:
> 	@Override
> 	public Customer findCustomer(String firstName, String lastName)
> 			throws CustomerNotFoundFault {
> 		
> 		System.out.println("firstname="+firstName);
> 		System.out.println("lastname="+lastName);
> 		return createCustomer();
> 	}
> the web.xml is pretty much the same as in http://cwiki.apache.org/CXF20DOC/http-binding.html, except for the following:
> 	<servlet-mapping>
> 		<servlet-name>CXFServlet</servlet-name>
> 		<url-pattern>/services/*</url-pattern>
> 	</servlet-mapping>
> the content of the beans.xml is again almost the same as the site mentioned except for the id and address as seen below:
>     <jaxws:endpoint 
>         id="demo" 
>         address="/customers" 
>         bindingUri="http://apache.org/cxf/binding/http"
>         implementor="demo.restful.server.CustomerServiceImpl"
>         >
>       <jaxws:serviceFactory>
>         <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>            <property name="wrapped" value="true" />
>         </bean>
>       </jaxws:serviceFactory>
>     </jaxws:endpoint>
> lib contents are what is included in the distribution. 
> Accessed it via IE6 using the following URL:
> http://localhost:8080/cxf/services/customers/123/4321
> Print out is the following:
> Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage INFO: Invoking GET on /123/4321
> Aug 13, 2008 6:45:49 AM org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor handleMessage INFO: URIParameterInterceptor handle message on path [/123/4321] with content-type [null]
> firstname=
> lastname=4321
> The weird thing is if I change the annotation to:
> @HttpResource(location="/customers/{first}/{last}") 
> and the URL to:
> http://localhost:8080/cxf/services/customers/customers/123/4321
> The parameters are properly retrieved.
> ----
> Gabo Manuel

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.