Posting this here after being told that the other community forum doesn't handle Oracle Cloud questions.
I am trying to create a SOAP call in javascript to query our cloud to return a document. This is to avoid using the standard Inquiry Reporting. Our Cloud uses Single Sign On and regular password login scenario won't work for the general user. I looking for the appropriate syntax of a SOAP call against Oracle to download documents from the repository and the appropriate syntax to get the authorization token to send to the Cloud to allow for the SOAP call to execute. Currently I am getting a 401 error from a POST command but a GET call has a response. I am unsure whether I should be referencing oraclecloud.com/crmCommonBulkExport/BulkExportService?WSDL or oraclecloud.com/fscmService/ServiceCatalogService?wsdl. I have read some similar posts on this topic but clearly I am missing something. Any assistance or advice is appreciated. The outline of the code with some substitution is below.
//Organization instance remove replaced with your-instance
var url = "https://your-instance.oraclecloud.com/crmCommonBulkExport/BulkExportService?WSDL";
var xhr = new XMLHttpRequest();
//Response is 401; recieve a repsonse with a GET
xhr.open("POST", url,true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
//SOAP call for attactments
var data = `<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/crmCommon/bulkExport/bulkExportServiceV2/types/">
<soapenv:Body>
<dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
</dsig:KeyInfo>
<typ:getAttachmentsForBatch>
<typ:batchId>300000024150497</typ:batchId>
</typ:getAttachmentsForBatch>
</soapenv:Body>
</soapenv:Envelope>`;
//regualr authorization causes issues because of SSO
//xhr.setRequestHeader("Content-Type", "text/xml");
//SSO needed
xhr.setRequestHeader('Bearer', '<token>');
xhr.send(data);
--Further Information
So, we are trying to allow users to download stored attachments and documents from the Oracle cloud from a custom report instead of using the Balance Inquiry report found under the General Ledger Accounting Dashboard. This is all on the Oracle Cloud Fusion ERP system; I listed this question under the Analytics section because this has a version of the catalog (though maybe not the best place). We have a custom GL transaction report that exists in conjunction with drill through from other custom financial reports and people would like to be able to get the documents associated with those transactions easily. Now the out of the box Oracle reports we have that allow for a document/attachment to be downloaded reference fscmUI/content/conn/FusionAppsContentRepository and require a DocID. Getting the DocID is already doable the issue I am running into is creating a working document download call outside of the basic reporting (using SOAP or a URL). This call that system makes uses dDocID, XFND_CERT_FP, XFND_RANDOM, XFND_EXPIRES, XFND_SIGNATURE, and Id which a lot of these variables are set by various system functions that aren't easily replicable in a custom report. This has lead me to believe that executing a call with the WebService to Download all Attachments with an associated batch might be best avenue but I am more than open to suggestions. So, the Oracle Product is the Oracle Cloud Fusion ERP system I suppose within that people would start with Invoices and POs first but in general any attachment associated with a transaction which would I guess be under the Financial module. Our custom reports are in the Catalog which can be accessed from various areas the Analytics area or the Financial Reporting Center. The area where the reports are is called the Enterprise Performance Management System Workspace - Oracle BI Catalog.