Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Update custom field from web service fails

web-app

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
ShL77
Replies (14)
helpful
0
not helpful

What URL has the ServiceManager been set up with?


alitheg
· 1
alitheg
helpful
0
not helpful

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);


ShL77
· 1
ShL77
helpful
0
not helpful

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)..


ShL77
· 1
ShL77
helpful
0
not helpful

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.


alitheg
· 1
alitheg
helpful
0
not helpful

Hi,

Right, the urls exist as i used web services to query issue by id before trying to update it.


ShL77
· 1
ShL77
helpful
0
not helpful

Yes good point.

Are you using the debugger to retrieve the 404 error? I've had a couple of issues in the past where a 404 was returned but that was not the root problem.

If not, are you able to do so? If so, is there any other information in the debugger? Is HTTP 404 the innerexception?


alitheg
· 1
alitheg
helpful
0
not helpful

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


ShL77
· 1
ShL77
helpful
0
not helpful

PS Request to GetCustomFields succeeds


ShL77
· 1
ShL77
helpful
0
not helpful

Seems like your server or IIS rejects DELETE requests for some reason.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

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)?


ShL77
· 1
ShL77
helpful
0
not helpful

Sorry, PUT it is. I am not sure why you get 404.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

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.


ShL77
· 1
ShL77
helpful
0
not helpful

Thanks for the update.

Can you please confirm where you have changed this?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

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 :)


ShL77
· 1
ShL77