cancel
Showing results for 
Search instead for 
Did you mean: 

OData Request URL too long in SAP NW Gateway

Former Member
0 Kudos

Hi all,

we're developing an iOS App with a direct NW Gateway connection.

Actually all requests work fine but our problem is, that - in some cases - the OData request URL gets too long (because of a long system query option with $filter).

In the NW Gateway we traced the error in SMICM:

ERROR => Request URI too long, size=10220 [ictxxfilt.c 188]

ERROR => illegal request

We also tried to change the request method from GET to POST but in this case we get a service response with the following message:

"The Data Service Request contains SystemQueryOptions that are not allowed for this Request Type"

Is there any option to avoid this issue and send requests with longer URLs?

Thanks a lot four your help!

Regards,

Christian

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Christian,

Just a guess: you might try to send those problematic requests as Batch-Operations. That way the very long URLs would go into the HTTP Body. You always do that with a POST request. The URL is the one of the service document with $batch appended. In case of success the HTTP status code is 202 Accepted.

The request must contain a header which specifies a boundary marker:

Content-Type: multipart/mixed; boundary=batch_myboundary

The request body for a GET request looks like this:

--batch_myboundary

Content-Type: application/http

Content-Transfer-Encoding: binary

GET ProductSet('12345')/$YourURLOptions HTTP/1.1

--batch_myboundary

The line feeds and the hyphens "--" are obligatory.

POST requests are a bit more complicated. For details see http://help.sap.com/saphelp_gateway20sp10/helpdata/en/90/dc8363306c47d3b2fca1398f5de94b/content.htm?...

Best regards,

Ringo