Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1071926

Summary: REST API undeploy and deploy by deploymentId operations reply in XML instead of requested JSON
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jiri Svitak <jsvitak>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED NOTABUG QA Contact: Jiri Svitak <jsvitak>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.1CC: jsvitak, mbaluch, rrajasek, smcgowan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-10 13:44:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
client.log none

Description Jiri Svitak 2014-03-03 13:28:29 UTC
Created attachment 869931 [details]
client.log

REST API undeploy and 'deploymentId deploy' reply in XML instead of requested JSON. See the attached client.log.

To reproduce:
1.) Download and setup BPMS 6.0.1 ER2.
2.) Add there application user guest, password guest. Hint:
guest=b5d048a237bfd2874b6928e1f37ee15e
guest=admin
3.) Run the same commands as in client.log attachment.


My env:
BPMS 6.0.1 ER2
EAP 6.1.1
PostgreSQL 9.1

Comment 1 Marco Rietveld 2014-03-10 13:20:39 UTC
Hi Jiri,

I think you should be using the "Accept" header instead of "Content-Type"? "Content-Type" specifies the type of media *sent*, while "Accept" specifies the type of media requested. 

See these links for more information: 
Accept: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
Content-Type: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17

Would you mind retesting with "Accept"? 

Thanks!

Comment 2 Jiri Svitak 2014-03-10 13:44:20 UTC
Hi Marco, thanks for the info. I've tried

curl -X POST -u "guest:guest" -H "Accept: application/json" http://localhost:8080/business-central/rest/deployment/com.bpms.flood:bpms-perf:1.0.0.Final/undeploy

and

curl -X POST -u "guest:guest" -H "Accept: application/json" -d '{}' http://localhost:8080/business-central/rest/deployment/com.bpms.flood:bpms-perf:1.0.0.Final/deploy?strategy=PER_PROCESS_INSTANCE

now both respond with JSON message. Closing the BZ.