You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2008/07/07 19:00:03 UTC

[jira] Resolved: (CXF-1405) @ProduceMime not used when selecting target method on a resource

     [ https://issues.apache.org/jira/browse/CXF-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-1405.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.1
                   2.0.7

> @ProduceMime not used when selecting target method on a resource
> ----------------------------------------------------------------
>
>                 Key: CXF-1405
>                 URL: https://issues.apache.org/jira/browse/CXF-1405
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.1
>         Environment: n/a
>            Reporter: Frank Lynch
>            Priority: Minor
>             Fix For: 2.0.7, 2.1.1
>
>         Attachments: patch.txt
>
>
> http://mail-archives.apache.org/mod_mbox/incubator-cxf-user/200801.mbox/%3C1201116808.6758.24.camel@horse%3E 
>  import com.sun.ws.rest.api.ConsumeMime;
>  import com.sun.ws.rest.api.HttpMethod;
>  import com.sun.ws.rest.api.ProduceMime;
>  import com.sun.ws.rest.api.UriTemplate;
>  
>  @UriTemplate("/sampleservlet")
>  public class SampleServlet {
>  	
>  	@HttpMethod("PUT")
>  	@ConsumeMime("text/plain")
>  	@ProduceMime("application/xml")
>  	public void getXML() {
>  		System.out.println("### Handle PUT for sampleservlet: XML ###");
>  	}
>  	
>  	@HttpMethod("PUT")
>  	@ConsumeMime("text/plain")
>  	@ProduceMime("application/json")
>  	public void getJSON() {
>  		System.out.println("### Handle PUT for sampleservlet: JSON ###");
>  	}
>  }
>  
>  When the client specifies the Accept parameter in the http header as
>  application/json or application/xml one would expect the corresponding method
>  to be called.

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