My Oracle Support Banner

PJF: How To Call SOAP Web Service From Standalone Webpage Using Java script or XmlHttpRequest (Doc ID 2263951.1)

Last updated on OCTOBER 27, 2019

Applies to:

Oracle Fusion Project Foundation Cloud Service - Version and later
Information in this document applies to any platform.


We are able to call the web service operations from the Soap UI client successfully. When trying to call the SOAP web service from a standalone webpage using the java script and XmlHttpRequest, getting the cross-domain error because the web service is in a different domain. Even though the profile options setup to support CORS.

No 'Access-Control-Allow-Origin' header is present on the requested resource

Profile options are setup to support CORS, as mentioned in the documentation below -

Here are the profile option values that has been set at the Site-level -
Allowed Domains = *
CORS: Access-Control-Max-Age = 3600
CORS: Access-Control-Allow-Methods = OPTIONS, HEAD, GET, POST, PUT, PATCH, DELETE
CORS: Access-Control-Allow-Headers = Accept, Accept-Encoding, Cache-Control, Content-MD5, Content-Type, If-Match, If-None-Match, Origin, User-Agent, X-HTTP-Method-Override, X-Requested-By, Authorization
CORS: Access-Control-Allow-Credentials = True

Javascript code
function fusionCall() {
var xmlString = '<soapenv:Envelope xmlns:soapenv="" xmlns:typ="">' +
'<soapenv:Header/>' +
'<soapenv:Body>' +
'<typ:getProject>' +
'<typ:projectId>300000007142993</typ:projectId>' +
'</typ:getProject>' +
'</soapenv:Body>' +

var username = 'myusername', password = 'mypassword';
url: 'https://<Your URL Details>/pjfProjectDefinition/ProjectDefinitionPublicServiceV2',
HTTPHeaders: {
Authorization: 'Basic ' + btoa(username + ':' + password)
method: 'getProject',
data: xmlString,
}).done(function (data, textStatus, jqXHR) {
}).fail(function (jqXHR, textStatus, errorThrown) {


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.