cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling Cross Origin Resource Sharing (CORS) in MII 15.0 SP7

0 Kudos

Hello everyone,

We recently updated our development MII system to 15.0 SP7. We would like to test the CORS functionality. Per the blog Support for CORS in SAP MII | SCN, This feature was included in support pack 5. I haven't found where I can enable this setting though. Do we enable this through the Netweaver Administrator page? I haven't found documentation about how to set this so I am hoping someone here could send me in the right direction.

Thanks!

Kristen Woodley

Accepted Solutions (1)

Accepted Solutions (1)

Sorry all, I found what I was looking for before the community could respond. But for those who would like to know, from the XMII page under System Management, select System Properties. The Cross Origin Resource Sharing configuration is located here.

Answers (2)

Answers (2)

0 Kudos

Hello.

Did you solve this problem with "No 'Access-Control-Allow-Origin'?

We have the same error.

Former Member
0 Kudos

Hi Kristen,

Were you (or anyone else) able to get this to work?  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 them).

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%2Fx...',

    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

Thanks!

Paul