Skip to Content
0
Oct 30, 2014 at 04:57 PM

UI5 Phonegap Post error

37 Views

Hy Experts,

I have a UI5 (Fiori like) app packed with phonegap. Everything works fine, but the app cant post on android to the oData server. It works only with windows phone.

In android I push the following data, and ther's the response as well:

Request URL:http://office.netlife.hu:8181/futarfioriodataprovider/courierdata.svc/Address(1)
Request Method:POST
Status Code:500 Internal Server Error
Request Headersview source
Accept:application/json
Accept-Language:en-US
Content-Type:application/json
DataServiceVersion:2.0
MaxDataServiceVersion:2.0
Origin:file://
User-Agent:Mozilla/5.0 (Linux; Android 4.4.2; SM-N9005 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
x-http-method:MERGE
Request Payload
{Comment:gffffff, Icon:accept, IconPic:up, FPostalCode:5115, TPostalCode:9450,…}
Comment: "gffffff"
DelStatus: "10"
DeliveryDate: "/Date(1413504000000)/"
FCity: "Budapest"
FPostalCode: "5115"
FStreet: "Kosutucca, Petofiucca, Adyucca"
From: "Kovacs Bela"
Icon: "accept"
IconPic: "up"
Id: 1
PicType: "D"
SzallitasStatus: "C"
TCity: "Muraszemenye"
TPostalCode: "9450"
TStreet: "Kosutucca, Petofiucca, Adyucca"
To: "Update3"
__metadata: {type:CourierManagerModel.Address}
type: "CourierManagerModel.Address"
Response Headersview source
Access-Control-Allow-Credentials:true
Access-Control-Allow-Origin:http://192.168.1.1
Access-Control-Expose-Headers:Access-Control-Allow-Origin,Access-Control-Allow-Credentials
Connection:close
Content-Type:application/json;charset=utf-8
DataServiceVersion:1.0
Date:Wed, 29 Oct 2014 13:07:45 GMT
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked

One problem could be that there's file:// in the Origin.

Any ideas how to solve this?

David


Any Origin:filefi:// Origin:file://