It's all about the answers!

Ask a question

How to create a request xml to update/create in jazz server via REST service?


ast java (45130) | asked Sep 15 '16, 6:29 a.m.
Hi Team,

I am new to REST services and I can able to get the response using REST service "GET".

The content is as below, (Permissions for role)

<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
.
        .
<soapenv:Body>
<response>
<method>getPermissions</method>
<interface>com.ibm.team.process.internal.service.web.IProcessWebUIService</interface>
<returnValue xsi:type="com.ibm.team.repository.common.services:ComplexArrayDataArg">
<type>COMPLEX</type>
<values xsi:type="rest:PermissionConfigurationDTO">
<id>com.ibm.team.dashboard.server.saveProjectDashboard</id>
<enabled>true</enabled>
<finalOp>false</finalOp>
<denialExplanation xsi:nil="true"/>
</values>
</returnValue>
</response>
</soapenv:Body>
</soapenv:Envelope>

I am planning to update some permission for the role and update into the server via POST.

I just updated some fields in the xml and directly calling the doPost(..) method, and then i got Bad request error.

As I am new to the REST service I am not sure how to construct this request xml to doPost(...) .

Please let me know how to resolve this issue.

Comments
ast java commented Sep 17 '16, 12:15 a.m.

 Hi All,

It's blocking the flow so please let me know if any solution for this.

One answer



permanent link
Donald Nong (14.3k213) | answered Sep 18 '16, 9:08 p.m.
Follow the instructions in this article, if you want to programmatically add members to a project area and assign roles to them.
https://jazz.net/library/article/633

Comments
ast java commented Sep 19 '16, 12:35 a.m.

 Hi Donald,


Thanks for the response.

Is there any documentation available to construct this request xml using JAVA (for POST).

Note: I can able to update/write to server using RTC API's. But I would like to know is there a way to get the server response xml and update the xml then again just POST the updated xml to the server.
So this scenario I would like to know how to construct it and send the request.


Donald Nong commented Sep 19 '16, 2:10 a.m.

You do realize that the service that you are using is an internal one, don't you? As we don't have much publicly available documentation on internal APIs, I doubt that any further information can be provided in this regard.


ast java commented Sep 19 '16, 4:25 a.m.

 Ok. Thanks Donald for the input.

Your answer


Register or to post your answer.