on 02-08-2014 7:45 AM
Hello Experts,
I am Performing a Batch Operation to Query as described below.
But i am unable to see the content in the response.
I have followed the standard way to implement Batch operation as per suggested by Gateway experts in this forum.
Still i am unable to get the content in the response of the batch.
I Kindly request all Gateway experts to provide your valuable inputs to resolve this issue and suggest/guide me if anything is wrong from my side so that i can correct.
The below are the details :
Both /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN & /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_END are redefined.
METHOD -
URL -
http://********/sap/opu/odata/sap/<; My Service Name >/$batch
HEADER -
Authorization: SAP ID & PASSWORD
x-csrf-token: Enter Token
Content-Type: multipart/mixed; boundary=batch
BODY -
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_rec_types1?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_rec_types1?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1
--batch--
RESPONSE -
RESPONSR BODY -
Thanks & Regards,
Ashwin
Hello Arun,
I also noticed that 400 Bad Request comes only when i apply filters.
With out filters data is coming ( i.e., entity collection ).
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arun, Jibin,
Now i am able to get the some response in the content for Batch Query, but it is a 400 bad request.
Not able to figure out what is wrong with my URL now.
I have attached the response
Body -
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_rec_types1/?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_rec_types1/?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1
--batch--
I kindly request to help to correct the URL.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arun,
I did check in error log Arun, it is logged as ' Invalid type for '$filter' system query option. Expected type is 'Edm.Boolean' '.
But i checked with other services. I am getting the same error for those services as well.
When i execute the same URL with the filter parameters which i have used in the body, service is not failing. It is getting data .
If it was a data type miss match it should fail when i execute URL in browser. But its working.
When the filter parameters if i put in body and send, service is failing Arun.
The above mentioned error is coming when it is through Batch Query ( for other services as well )
Otherwise with the same filter parameters (individually) in browser, services are working fine.
Not able to understand what exactly is going wrong when query is through batch.
Regards,
Ashwin
Hi Ashwin Dutt ,
Please Refer : http://scn.sap.com/thread/3244292
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashwin,
I think you forgot to add '/' (GET get_rec_types1/?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1) verify that , and put an external break point in /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN while executing the service if break point is not triggering that means the problem was with your request body only so please check again.
Thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arun,
Thanks a lot for your inputs.
I added ' / ' as you suggested in the query and also referred to your blog.
Body is exactly same as you have explained in the blog and also the spacing as well.
But still i am unable to see content in the response and break point is not hitting /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN.
I am really not able to figure out what might be the mistake in my body.
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_rec_types1/?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_rec_types1/?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1
--batch--
Batch operation for read is working absolutely fine for me with the below body.
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_data11(ImWhttype='C2',ImCountry='TH') HTTP/1.1
--batch
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/json
GET get_data11(ImWhttype='C1',ImCountry='TH') HTTP/1.1
--batch--
Problem is with only Query.
Regards,
Ashwin
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.