I used the latest build (not official one) in order to test the fix, and this time I'm getting HTTP CODE 200

I created a simple job with one string parameter and used the following code:

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.codehaus.jackson.JsonFactory;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;

.
.
.
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);

MultiValueMap<String, String> form = new LinkedMultiValueMap<String, String>();
form.add("COUNT", "5");

HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(form,headers);

ResponseEntity<String> responce = restTemplate.exchange("http://192.168.1.126:8080/jenkins/job/test1/buildWithParameters", HttpMethod.POST, request, String.class);
.
.
.

The returned HTTP code is 200 instead of 201 (saw it on Fiddler)

Additionally, I'm getting a json result which contains the "queueItem" section, together with other non-relevant info, I can use this "queueItem" info for tracking the job, BUT when starting few instances of the same job in parallel (each instance with different parameters), in each HTTP response I'm getting the same "queueItem" as the first one I got, although, when checking the queue the other new instance were created with different item id in the queue

If this too complicated to understand, lets try to set a webex session or something similar (my mail: amos_...@malam.com)

Change By: Amos Sonnenwirth (30/Jun/13 3:27 PM)
Resolution: Fixed
Status: Resolved Reopened
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to