cancel
Showing results for 
Search instead for 
Did you mean: 

Troubles getting CORS working with MII v15.0

Former Member
0 Kudos

Hi,

No matter what I've tried, the NW/MII server is not responding to a CORS request with the list of allowed domains (or anything related to CORS).

Are there settings in NW that I'm missing? Though I'm on NW 7.4, I've tried editing the Crossdomain.xml file, to no avail (http://service.sap.com/sap/support/notes/1838465). Have also tried messing around with creating an HTTP Destination but didn't get very far.

Any help would be greatly appreciated!

1. CORS parameters in MII v15.0 SP7:

  • Allowed hosts: http://[server]:[port]
  • Creds: No
  • Expose Headers:
  • Allow Methods: GET,POST,HEAD (and OPTIONS but I don't think this is needed?)
  • Allow Headers: Content-Type

2. Setup of $.AJAX CORS call (works fine on same domain):

$.ajax({

method: 'GET',

url: 'http://[server]:[port]/XMII/Illuminator?QueryTemplate=[Path_to_query_template]&Content-Type=text%2Fxml',

dataType: 'XML',

cache: false,

crossDomain: true,

data: { },

success:{...},

error:{...},

complete:{...}

});

3. Response Headers (browser returns the "No 'Access-Control-Allow-Origin' header is present on the requested resource." error):

t=14935 [st= 58] +HTTP_TRANSACTION_READ_HEADERS [dt=178]

t=14935 [st= 58] HTTP_STREAM_PARSER_READ_HEADERS [dt=178]

t=15113 [st=236] HTTP_TRANSACTION_READ_RESPONSE_HEADERS

--> HTTP/1.1 200 OK

server: SAP NetWeaver Application Server 7.42 / AS Java 7.40

transfer-encoding: chunked

set-cookie: [317 bytes were stripped]

content-type: text/html; charset=utf-8

pragma: no-cache

cache-control: no-cache

expires: 0

content-encoding: gzip

date: Tue, 27 Sep 2016 21:50:23 GMT

set-cookie: [47 bytes were stripped]

t=15113 [st=236] -HTTP_TRANSACTION_READ_HEADERS

Has anyone been able to get CORS working w/MII?

Thanks!

Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Anyone? This new "community" thing is terribly quiet.