Get Described Response in Java Rest Call

Maxim Makarovsky March 13, 2018

Hi all,

i am calling to jira create issue api via java method .

when its success so i receive  normal response and when one of needed components isnt right i receive this mesege

{"errorMessages":["No content to map to Object due to end of input"]}

when i run the api via SOAPUI i get this one

{
"errorMessages": [],
"errors": {"project": "project is required"}
}

 

how can i get the same message in java response

 

thank you

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2018

Jira does not have a Soap interface since 6.3, so could you confirm that you're looking at such an old unsupported version?

The REST response is probably correct though, it sounds like your data is not complete in the call.

Maxim Makarovsky March 13, 2018

SOAPUI is program that accept rest protocols.

 

and when i run it i receive a normal message that describes what is wrong

 

the same sentence  i want to receive in java respons

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2018

Ok, then it is completely unclear as to what you are doing here.

Forget this soapui, it's an unknown.  Your java is making a REST call to Jira and is getting a "no content to map" type error.  This suggests your call does not have well formed data in it.  You'll need to fix that.

Maxim Makarovsky March 13, 2018

ok but i want to know what data i have to fix

is it possible?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2018

It's what you are sending to Jira over the REST call you make.

Maxim Makarovsky March 13, 2018

ok...

when i am using the google postman it response me with the same message

see the attachment

how can i get this message in java call?

response.jpg

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2018

Your JSON does not appear to be complete.  The first message in your original question tells you that.  The second error is probably a direct consequence - if the JSON is not complete, Jira doesn't know how to read it, so it discards it, and then tells you that it can't import data that it doesn't know about.

Maxim Makarovsky March 13, 2018

any solutions?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2018

Yes, send it complete JSON.

Suggest an answer

Log in or Sign up to answer