-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On update URI::InvalidURIError: URI must be ascii only #62
Comments
Try the |
Uri error is gone, however
|
I got that too, I figured I didn't have access to update your entities. I'll look into this. |
What was the server answer? This service is not our application, just some vendor server software, so there can be some restrictions on editing, which I can't predict. If you find some restrictions responses - I can look in configuration. |
Here's the raw error: <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-1</m:code>
<m:message>XML parsing error: - [1,1]
Fatal error:
Document is empty
</m:message>
</m:error> I can confirm the document is being sent over as JSON to the server with the proper |
Yeah. As far as I am concerned it does not support json yet. |
I updated service. So It you want json answer you should request with header |
I dumped http and found that library use always "accept xml" |
Yes, it always accepts XML, but when it sends out say an update, it's content-type is set to |
|
here said to use PATCH method http://www.odata.org/getting-started/basic-tutorial/ |
|
I've checked my issue and added ?$format=json to url and got error answer
|
Can you tell me how can I use xml for saving? |
It would require rewriting the save logic |
I spent some time looking in your's code. Implementing XML saving will be a huge amount of work. this patch sample from documentation
In my case ruby is sending
and server responded error
which means that problem is in the Collections. |
Do you have any comments? |
Are you changing anything before saving? The empy |
Also, the fix I put into |
I trying to point to the difference beetween '__metadata' inside collection object and property "[email protected]" |
Let me check |
Do you know the version of your OData service? |
in metadata - v3 |
I've looked in standard reference @odata.type is for 4, __metadata for 3 |
in documentation they said it is 3 version. So I don't understand what's wrong with collection object |
Your service comes back with:
While the Northwind sample comes back with:
I'll bet something changed in v3 and because it only supports 3, the ruby_odata code must not be sending the correct thing. I'll have to look at it more closely this weekend (hopefully I will have time). It's weird that queries still work though, I guess they didn't change that spec. As for the ASCII problem, could you add a failing spec for this and I'll work on a fix for it? I reverted my last fix because like I said it broke some specs. |
There was no problem for url with our fix. |
The text was updated successfully, but these errors were encountered: