Bug 1008640 - HttpMixin throws IllegalArgumentException if used with rest service returning void
Summary: HttpMixin throws IllegalArgumentException if used with rest service returning...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: tcunning
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-16 18:00 UTC by Jiri Sedlacek
Modified: 2015-08-02 23:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
HttpMixin will throw an IllegalArgumentException if used with a rest service that returns void. This is because the httpResponse.getEntity() is null, which causes a problem in the EntityUtils.toString() method.
Clone Of:
Environment:
Last Closed: 2014-10-22 13:42:20 UTC
Type: Bug


Attachments (Terms of Use)

Description Jiri Sedlacek 2013-09-16 18:00:08 UTC
I have a service, binding is over resteasy, one method has return type void. If the method is called with HttpMixin, exception is thrown:

java.lang.IllegalArgumentException: HTTP entity may not be null
	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:198)
	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:264)
	at org.switchyard.component.test.mixins.http.HTTPMixIn.sendString(HTTPMixIn.java:140)
.
.
.


http method DELETE is used, it seems that httpResponse.getEntity() is null, which cause problem in EntityUtils.toString() method.

Comment 1 Keith Babo 2013-11-05 13:58:00 UTC
Can you attach an app to reproduce this behavior?

Comment 2 tcunning 2014-10-22 13:42:20 UTC
Attempted to reproduce on 2.0.0.Alpha3 using the rest-binding quickstart and adding a void method service to the TestResource.     I did not see an exception.    Talked to Jiri and he was not able to reproduce this issue either.    Closing as cannot reproduce.


Note You need to log in before you can comment on or make changes to this bug.