Title: Unable to Deserialize Field Error Post by: Gary C. on November 02, 2019, 10:13:35 am Hello
I need to write a web service that will cater for the uploading of a file. It is all a bit new to me and I need some help with and error I am getting. I have been using the examples in the documentation to create some test examples. Here is the web service module, pretty much cribbed from the documentation example: Code
Here is the web service function: Code
and here is the associated html: Code Here is a snippet of the output, with the full text in the attached file: Code
Whereas, if I make this web service available, it works: Code
Can anyone see why the former is not working? Title: Re: Unable to Deserialize Field Error Post by: Reuben B. on November 06, 2019, 09:44:10 pm Are you missing a WSAttachment?
Title: Re: Unable to Deserialize Field Error Post by: Gary C. on November 07, 2019, 02:48:17 pm Hi Reuben
Yes, perhaps. I see that the documentation has been updated and the example given for uploading an image in multipart has changed and does now include the WSAttachment attribute - my fault for not checking the very latest documentation. However, I am now getting a BadHTTPRequest error (-5 being returned from com.WebServiceEngine.ProcessServices). This is using the exact code within the documentation on my local machine. Gary Title: Re: Unable to Deserialize Field Error Post by: Gary C. on November 13, 2019, 09:07:08 am Hi
Just by way of an update - the examples that are contained in the latest version of the documentation that demonstrate a restful web service to upload a file to a server do indeed work. Using that as the basis I have now managed to achieve my goal of creating a web component I can add to forms to provide a "drag and drop" area for uploading files to our archive management, so I and the users are very pleased! Gary Title: Re: Unable to Deserialize Field Error Post by: Reuben B. on November 13, 2019, 08:31:57 pm Hi Just by way of an update - the examples that are contained in the latest version of the documentation that demonstrate a restful web service to upload a file to a server do indeed work. Using that as the basis I have now managed to achieve my goal of creating a web component I can add to forms to provide a "drag and drop" area for uploading files to our archive management, so I and the users are very pleased! Gary feel free to share more details here of your solution or perhaps on GitHub. Or work with your support contact to pull out the important bits to create a simple example. I know some customers are impacted when moving from desktop to web, and the inability to drop files onto a display array and don't really like the model of an openfile front-call being required before the FGL_GETFILE. Reuben PS Make sure you test what happens if your users just miss the drop area when attempting to drop in your web component... |