Sitemap

Amicuk Programming Answers

Save binary object via API 2

-0001-11-30   Views:0

Advertisement

How do I save a file via the API 2? Any exsample will help me alot! I'm trying to save a object to the table Binary_Objects, but I get the error: "com.sap.mdm.internal.protocol.manual.ServerException: Server error (0xffaab000)"I assume you are t

How do I save a file via the API 2?
Any exsample will help me alot!
I'm trying to save a object to the table Binary_Objects, but I get the error: "com.sap.mdm.internal.protocol.manual.ServerException: Server error (0xffaab000)"

The replay answer
Advertisement
I assume you are trying to create a BinaryBlobRecord in the Binary_Object Table.
Here is some code that works:
BinaryBlobRecord record = RecordFactory.createEmptyBinaryObjectRecord(tableId);
record.setBinary(new BinaryValue(bytes));
record.setDataSize(new IntegerValue(size));
record.setHasOriginal(new BooleanValue(true));
record.setDataGroupId(node.getId()); // get the node using RetrieveGroupTreeCommand command.
record.setSource(new LookupValue(new RecordId(1))); // see below
record.setCode(name); // The code has to be unique, so you can add a random number to the name.
record.setName(new StringValue(name))
CreateRecordCommand createRecordCommand = new CreateRecordCommand(connection);
createRecordCommand.setSession(authenticatedUserSession);
createRecordCommand.setRecord(record);
createRecordCommand.execute();
If you don't set the source properly , you will get that error. For setSource method, you need to set a Location ID. With API 5.5 SP5, most likely there is no way to create a new location ID and we have to use one of the existing Location IDs. Just to make the code work, I used "new LookupValue(new RecordId(1)) ", which requires having at least one file uploaded to the table via MDM Data manager and use the first part of its location ID.
For setDataGroupID, first create the group node in the MDM Data Manager and find the node in the GroupTree with API. To get the GroupTree, use RetrieveGroupTreeCommand.

Go to See the other 3 answers

Save binary object via API 2

Category:DefaultRelease time:-0001-11-30Views:130

How do I save a file via the API 2? Any exsample will help me alot! I'm trying to save a object to the table Binary_Objects, but I get the error: "com.sap.mdm.internal.protocol.manual.ServerException: Server error (0xffaab000)"I assume you are t[More]

AddRecord error when adding binary object

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, I am getting  a2i.core.StringException: AddRecord error when trying to add binary object in the repository using Java API. The code used is as below:    //Adding values in binary table    byte[] fileBuf = file;    A2iFields fields = new A2iFi[More]

Save different Objects in one file by two different streams

Category:DefaultRelease time:2015-10-11Views:130

Hi all, I have a issue to read two Objects from one file if I write those in two different streams. I open the ObjectOutputStream and save an Object to the file. Then I close this stream and file. Then I open the new ObjectOutputStream and save the s[More]

Script throwing error" Object required: 'API'

Category:DefaultRelease time:2015-10-11Views:130

Hi All, We need help in one issue. We have following script which is running fine when we ran it from script editor, but when use this as expression in import format is throwing error Error: An error occurred importing the file. Detail: Object requir[More]

How to extract a field from Binary object

Category:DefaultRelease time:2015-10-11Views:130

Hi Guys, I have a Binary object in custom aggregator and I would like to extract a field from the Binary object without de-serializing the Binary object. I know this can be done but figure out how.. Appreciate your help. Have tried this PofValue valu[More]

How to save an "Object" in a selected file ?

Category:DefaultRelease time:2015-10-11Views:130

Hi, I would like to save an object with for example a PlanarImage object type in a selected file from JFileChooser Do you know how to do it ? I tried this but it didn't work : File fChoosen = chooser.getSelectedFile(); ObjectOutputStream os = new Obj[More]

Unable to update rating (rating column) on host document using JavaScript Object Model API inside sharepoint hosted apps

Category:DefaultRelease time:-0001-11-30Views:130

Hi Everyone, We are developing SharePoint hosted apps for Office 365, for that we are going to implement document rating functionality inside Sharepoint app. The host web contain document library (“Documents”) and from apps we need to rate each docum[More]

How can I save an object Image in a file with .jpg or .gif format?

Category:DefaultRelease time:-0001-11-30Views:130

Greetings I'm programming a Ray Tracer but now I need to know like save an object Image in a file with .jpg or .gif format. Could anyone help me, please? It's very important to me do this as soon as possible. Thanks.In 1.4 you have ImageIO available[More]

How can I use Diagnostics Object Model APIs?

Category:DefaultRelease time:-0001-11-30Views:130

Hi. In the Internet Explorer DevCenter page I could reach a very interesting section about developer APIs. In particular there is a section devoted to the Diagnostics Object Model API. This is something very cool I think but the problem is that I cou[More]

Air Javascript Save Binary File

Category:DefaultRelease time:-0001-11-30Views:130

I'm trying to download and save binary file to the local disk. I've spent all morning trying to get this to work bu am stumped             function saveFile(outData) {                     try    {                         stream = new air.FileStream()[More]

DEFECT: Locks up on save of object being used elsewhere

Category:DefaultRelease time:-0001-11-30Views:130

When I try to save an object (such as a package body), Oracle (quite rightly) will not let me replace the object's code if some other process is using that object. However, SQL Developer handles this situation in a very, very unpleasant manner. Basic[More]

Hot
Can anyone please tell me if I can use the same JavaBean Class to hold information form different pages? well, let me explain exactely what I want to do: I have a Java bean Class that holds a property 'Name': package ContactManager; public class Pers [More]
I am looking for a CRM system that integrates with mail chimp or constant contact, hoot suite and forms stackHi, I could resolve the issue since there were lot of issues after system copy. 1. During distribued to Cenrtal system - system copy. You nee [More]
I live in the USA, and 99% of my calls are from upstate NY to New York City - I cant find what the rates are for these calls.  What is the rate for individual call within USA. I have  subscription, and I buy credit on-line.Hello, 2.3 cents per minute [More]
While running an OBIEE report, I receive the following error: State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46073] Operation 'stat()' on file '/u02/OracleBIData/tmp/nQS_28056_15671_7 [More]
I'm on the east coast of the United States. Since the time change, firefox refuses to let me surf to a majority of my websites. I can't use Google because every time I search on something, the "new" google page (the link with the search terms) c [More]
1. We have CCUM 8.6, and 50 DID that are by provider tight to main number. I have one user requesting his number shows up as external line was set up on his phone.  I think I should go with different route pattern than [email protected] so for example I can choose [More]
like the iphoto icon was on my toolbar and i daw it got moved to my desktop so i wanted to keep my desktop clean so i moved it to trash and it asked me for my password so i typed it in and then i emptied my recyclebin and when i dumped my trash sudde [More]
Our requirement is to make a flexfield item as search criteria. Flexfield is having 2 segments Applicaiton and Responsibility, where 2nd segment *(Responsibility) is dependent on 1st (Application).* Accordingly, an LOV must get displayed for each fle [More]
Hi, I want to do a very minor modification to the BasicPasswordLoginModule. In which jar is this class file present to modify? could some one please guide me in this regard. Regards MMKHere is what I have found: Oracle Big Data DocumentationRead othe [More]
I want to genereate Proxy Classes in OAS with JAX-WS Compatable... But, the information which i got from google is that , it generate Proxy Classes compatable with JAX-RPC. if any one knows the solution how to generate these proxy classes Compatable [More]