on 11-17-2014 12:25 PM
Hi All,
I am trying to call a GET operation in $batch my request content looks like this.
--batch_005
Content-Type: application/http
Content-Transfer-Encoding: binary
GET LRI004LANERENTALJOBS(FromDate=datetime'2014-08-10T00:00:00',OperationDist='TD - TRANSPORT FOR LONDON ROAD NETWORK',Sapid='TST_PORT_USR',ToDate=datetime'2014-09-24T00:0:00',Historical='X',JobNum='555') HTTP/1.1
--batch_005--
I am getting the below error:
Resource not found for the segment '00:00',OperationDist='TD'.
Same URI is working for general GET operation.
I am suspecting it could be DateTime value is not formed well.
Can anybody suggest.
Regards,
Kiran Adhikarla
Hi Kiran,
Though I have not worked with $batch,
I tried the following simple request body for batch and i am not getting any error also i am not getting a request body.
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
GET DecimalSet(TestDateTime=datetime'2014-08-08T00:00:00',TestDecimal=100.9m HTTP/1.1
--batch--
"TestDateTime- property is of type edm.datetime".
I don't think it is your date.
Regards,
Jhansi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jhansi,
I have tried by changing the property/length but its not worked for me.
Even with the other entity set same error is occurring.
In your GET statement you are not closed the bracket.
I guess it should be like this
GET DecimalSet(TestDateTime=datetime'2014-08-08T00:00:00',TestDecimal=100.9m) HTTP/1.1
Regards,
Kiran Adhikarla
Hi All,
Give the date time field value like as 'yyyy-mm-ddT00%3A00%3A00' .
Below is the sample batch request payload. It is working fine for me.
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
GET DecimalSet(TestDateTime=datetime'2014-08-08T00%3A00%3A00') HTTP/1.1
--batch--
Regards,
Sandhya.
Hi Sandhya,
Thanks lot its working fine now.
Same way i developed for query also.
Below is the sample.
GET LRI004LANERENTALJOBS?$filter=ToDate+eq+datetime'2014-09-24T00%3A00%3A00'+and+Sapid+eq+'TST_PORT_USR'+and+OperationDist+eq+'TD%20-%20TRANSPORT%20FOR%20LONDON%20ROAD%20NETWORK'+and+FromDate+eq+datetime'2014-08-10T00%3A00%3A00'+and+Historical+eq'X'+and+JobNum+eq+'555' HTTP/1.1
Regards,
Kiran Adhikarla
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.