Update custom field from web service fails
Hi,
I'm using the latest (3.5.4) release and i try to assign a custom field value by using web services.
I get CustomFieldDataEN object from either IssueEN or by calling IssuesService.GetCustomFieldData(issueID), change its value and try to save it by 1) CustomFieldsService.SaveCustomFieldData 2) IssuesService.UpdateIssue
Both versions return 404 (Not Found) from server.
I've checked logs using Fiddler and the request is posed to /api/customfields.ashx/customfielddata or /api/issues.ashx/issues/
Both return HTTP 404.
Could you advise?
ShL77
· 1 |
|
Tuesday, October 13, 2009, 1:39:41 PM |
0
|
What URL has the ServiceManager been set up with? |
||||
|
0
|
Hi, The service manager has been set up as per sample client app like m_smProxyManager = new CounterSoft.Gemini.WebServices.ServiceManager("http://gemini.myhost:port", txtUserName.Text, txtPassword.Text, "", false); |
||||
|
0
|
Note that it looks like it posts data to the right url (well, right host/port and the relative urls as per my above post).. |
||||
|
0
|
Presumably those URLs exist if you put them into a web browser? /api/issues.ashx should give you "Welcome to Gemini REST" and /api/issues.ashx/issues should return an XML response. |
||||
|
0
|
Hi, Right, the urls exist as i used web services to query issue by id before trying to update it. |
||||
|
0
|
Yes good point. |
||||
|
0
|
Hi, The InnerException is NULL The Message="The remote server returned an error: (404) Not Found." I used Fiddler to monitor the request and it sent out request like PUT /api/customfields.ashx/customfielddata HTTP/1.1 <?xml version="1.0" encoding="utf-8"?><CustomFieldDataEN xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><State>NoChange</State><DateCreated>2009-10-13T05:52:47</DateCreated><TimeStamp>AAAAAAAKYO8=</TimeStamp><CustomFieldID>5</CustomFieldID><CustomFieldDataID>2</CustomFieldDataID><UserID>2</UserID><IssueID>1234</IssueID><ProjectID>28</ProjectID><CustomFieldData>123</CustomFieldData><CustomFieldFormattedData /></CustomFieldDataEN> Then, the response was 404 from IIS. StackTrace: at System.Net.HttpWebRequest.GetResponse() at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType)\r\n at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r) at CounterSoft.Gemini.WebServices.CustomFieldsService.SaveCustomFieldData(CustomFieldDataEN customFieldData) at my code |
||||
|
0
|
PS Request to GetCustomFields succeeds |
||||
|
0
|
Seems like your server or IIS rejects DELETE requests for some reason. |
||||
|
0
|
Hi, Can you tell me why it should be about DELETE (because as per http://api.countersoft.com/ApiCustomFields.aspx - and that's what i also see in FIDDLER, "PUT" request is used, not DELETE)? |
||||
|
0
|
Sorry, PUT it is. I am not sure why you get 404. |
||||
|
0
|
Hi, Thanks for the support. It looks like 64-bit version of ASHX handler indeed has Verb limitation (so it accepted GET, but not PUT). I've corrected it and was able to update the custom field. |
||||
|
0
|
Thanks for the update. |
||||
|
0
|
Sorry for delayed reply I used IIS7, so it was 'Handler Mappings' for my gemini application, then I chose related x64 version of ASHX handler, Edit, Request Restrictions, Verbs and volia :) |
||||
|