Hi

On Tue, Jul 27, 2010 at 1:12 PM, chengy <[email protected]> wrote:

>
> Hello, dear Sergey,
>
> what do you think of my code?
>

If someone wakes me up during the night and asks about this code - then I
will write down the signature without even looking at this email, as I've
seen this fragment quite a few times :-)


>
> --------------------------------------------------------------------------------------
> @POST
> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
> @Produces(MediaType.TEXT_HTML)
> @Path("/createInstances")
> public int createInstances(@FormParam("workflowDefUUID") String
> workflowDefUUID, @FormParam("createUserId") String createUserId,
> @FormParam("participantId") String participantId, @FormParam("title")
> String
> title,@FormParam("boDatas") String boDatas) {return 0;};
>
> --------------------------------------------------------------------------------------
>
> if don't asign a @Produces,cxf will set MediaType.APPLICATION_OCTET_STREAM
> as a int type's mime type.
>

WADLGenerator has no idea what ContentType will be used by clients and given
that no @Produces is specified, it defaults to
MediaType.APPLICATION_OCTET_STREAM; You probably want text/plain be
explicitly specified; and just in case, CXF won't be able to convert this
int into JAXB/JSON itself.

Also please ask on the users list instead...

Sergey


> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Re-A-WADL-Representation-bug-tp1842811p2255734.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>

Reply via email to