Adding Java Api
hi everyone,
i'm a little java programmer, and i've to make a question, maybe stupid for most of you...
yesterday i've downloaded a java api, that should allow me to treat Excel files, downloadable from here:
http://jexcelapi.sourceforge.net/
After putting into my system, i un compressed it, and tryed to make a simple class where i started to learn how it works, but Textpad said that the package doesn't exsists...
then i thought :" damned environmental variables" and i put a new E.V. named CLASSPATH, with the following data: ".;", because i remembered that this entry would allow me to locate java files into my entire system...
but it's not so...
i used to develop programs, small programs, with other packages like corejava and graphicio, but now they are not visible.
i'm thinking now if could concern with the fact that i've formatted c: a couple of days ago, and something critical changed... but WHAT??
at the end, my question is:
how can i make work a downloaded API, just like the excel one?
thank you everyone, i hope i didn't break any rules!
bye!
thank you very much,
infact i've done something like you told me and the package works...
now i can use
import jxl.*;
but another error occurred.
jxl package creator, said that to read an excel workbook, i could write the following code:
import java.io.File;
import java.util.Date;
import jxl.*;
Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
where he omits the try-catch block.
once written, i just compile and everything is right, but when i run it, textpad tells me:
java.lang.NoClassDefFoundError: jxl/Workbook
at 12th row of my code, where i wrote "wb=Workbook.getWorkbook(...);"
how it can be possble?
what's wrong!!
(i'm crying)
Similar Messages
-
Java API for adding new User in OID
I am search documentation for sample code to add a new User to the OID via Java API, I could not find any. Is it not possible to do so? if it is, can someone point me to the right location.
Thanks* This method adds employee details into directory
* @param emp Employee details to be added
* @param password Password for the employee
* @exception GroceryAppException if directory operation fails
public void addEmployee(Employee emp, String password)
throws GroceryAppException {
Map attrs = new HashMap();
List objclass = new ArrayList();
// Object classes that the employee must use
objclass.add("top");
objclass.add("inetOrgPerson");
objclass.add("orcluserv2");
// create other attributes and their values
// Add all attributes that you need to set
attrs.put("uid",emp.getEmpId());
attrs.put("cn",emp.getFirstName());
attrs.put("sn",emp.getLastName());
attrs.put("postaladdress",emp.getAddress());
attrs.put("mail",emp.getEmail());
try {
// create the Directory Entry with the specified attributes
dirManager.addDirectoryEntry("cn="+emp.getFirstName()+"cn=Users,dc=oracle,dc=com"
, objclass, attrs);
} catch (NamingException namingEx) { // for Directory errors
throw new GroceryAppException("Error while adding employee entry to directory :" +
namingEx.getMessage());
}And the Directory Manager
* Creates an entry in Directory with the specified attributes and objectclass,
* with the specified Distingushed Name.
* @param dn Distinguished name of the entry to be created
* @param objCls Object classes that the entry must use
* @param map Attribute,value mappings of the entry
* @exception NamingException if adding entry fails
public void addDirectoryEntry(String dn, List objCls, Map map)
throws NamingException {
// Create attribute list, ignore case of attribute names
Attributes attrs = new BasicAttributes(true);
if( !objCls.isEmpty()) {
Attribute objclass = new BasicAttribute("objectclass");
// Iterate thriough the collection and add the object classes to the attribute
Iterator objclsIter = objCls.iterator();
while(objclsIter.hasNext()) {
// Add the object classes
objclass.add(objclsIter.next());
// Add the object class attribute to list
attrs.put(objclass);
// Iterate through other attributes and add to attributes list
Iterator attrsIter = map.entrySet().iterator();
while( attrsIter.hasNext() ) {
Map.Entry attr = (Map.Entry)attrsIter.next();
attrs.put(new BasicAttribute((String)attr.getKey(),attr.getValue()));
// add the directory entry to the directory with the attributes
dirctx.createSubcontext(dn, attrs);
} -
Bug report (and solution): adding multiple records through Java API in bulk
I have found some bugs in the Java API (version 4.1.25) that makes it impossible to add mulitple values in bulk to a RECNO database. The fixes are as follows:
MultipleEntry.java, line 80:
"DbUtil.int2array(curr_off, this.data, pos);"
should be replaced by
" DbUtil.int2array(recno, this.data, pos);"
MultipleRecnoDatabaseEntry.java, line 130:
"return append_internal(data, doff, dlen, recno);"
should be replaced by
"return append_internal(data, offset, len, recno);"
Regards,
Johan WaltersHello,
It looks like there were some corrections to this area in the post 4.1 i.e. 4.2 release. And I do not see these same issues in the current 5.1.25 release. If you do find them in the current release, just let us know.
Thanks,
Sandra -
Problems adding WFS layer via Java API
Hi
I am trying to add a WFS layer to my map via the java api. There is little documentation on this and I am struggling a bit, I wonder if anyone has done the same? The call I am developing looks like:
mapViewer.addWFSTheme("devprop",
"WFS",
"http://cjones:8080/geoserver/wfs?",
"EPSG:27700",
"ST_Building",
"the_geom",
"building",
"ID",
attributeList,
renderStyleAttributes,
featIds
but the mapviewer log states:
Jun 30, 2011 4:03:47 PM oracle.sdovis.util.WfsCapabilities readUsingHttpGet
INFO: GetCapabilities request: http://cjones:8080/geoserver/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities
Jun 30, 2011 4:03:47 PM oracle.sdovis.util.WfsCapabilities decodeCapabilities
SEVERE: Decode GetCapabilities failed: null
Jun 30, 2011 4:03:47 PM oracle.sdovis.theme.WFSThemeDefinition readCapabilities
WARNING: Unable to get Capabilities for url: http://cjones:8080/geoserver/wfs?
Jun 30, 2011 4:03:47 PM oracle.sdovis.DBMapMaker renderEm
INFO: **** time spent on loading features: 172ms.
Jun 30, 2011 4:03:47 PM oracle.sdovis.RenderingEngine prepareForRendering
FINEST: xfm: 3.0236220472436512 0.0 0.0 -3.0236220472436512 -1047236.0393699252 532885.8661416543
Jun 30, 2011 4:03:47 PM oracle.sdovis.VectorRenderer render
FINER: time to render theme WFS with 0 styled features: 0ms
Jun 30, 2011 4:03:47 PM oracle.sdovis.VectorRenderer label
FINER: time to label theme WFS with 0 styled features: 0ms
Jun 30, 2011 4:03:47 PM oracle.sdovis.DBMapMaker renderEm
INFO: **** time spent on rendering: 0ms
if I goto http://cjones:8080/geoserver/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities via the browser I get:
<WFS_Capabilities version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://cjones:8080/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd">
+<Service></Service>
+<Capability></Capability>
+<FeatureTypeList></FeatureTypeList>
+<ogc:Filter_Capabilities></ogc:Filter_Capabilities>
</WFS_Capabilities>
Any pointer appriciated
Thanks
ChrisIf the getcapabilities result is:
<WFS_Capabilities version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://cjones:8080/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd">
+<Service></Service>
+<Capability></Capability>
+<FeatureTypeList></FeatureTypeList>
+<ogc:Filter_Capabilities></ogc:Filter_Capabilities>
</WFS_Capabilities>
then it's empty and there are no features to be served up.
Test the WFS service in mapbuilder first. -
Adding and Modifying Calendar w/ EWS JAVA API
Hello -
The functionality that I want to achieve is pull appointment information in from a source and then use this information to appointment on to calendar of users. Each user will have different appointments. With the JAVA API how do I go about doing this
as an Exchange admin user or something similar?
Thank you,Hello -
The functionality that I want to achieve is pull appointment information in from a source and then use this information to appointment on to calendar of users. Each user will have different appointments. With the JAVA API how do I go about doing this
as an Exchange admin user or something similar?
Thank you, -
Hi all,
When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
Environment:
The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
Version: 3.4.1".
i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
The Jars i added in the classpath:
adobe-forms-client.jar
adobe-livecycle-client.jar
adobe-usermanager-client.jar
adobe-utilities.jar
ejb.jar
j2ee.jar
ecutlis.jar
com.ibm.ws.admin.client_6.1.0.jar
com.ibm.ws.webservices.thinclient_6.1.0.jar
server.jar
utlis.jar
wsexception.jar
My code is :
Properties ConnectionProps = new Properties();
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
//Create a ServiceClientFactory object
ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
//Create a FormsServiceClient object
FormsServiceClient formsClient = new FormsServiceClient(myFactory);
//Get Form data to pass to the processFormSubmission method
Document formData = new Document(req.getInputStream());
//Set run-time options
RenderOptionsSpec processSpec = new RenderOptionsSpec();
processSpec.setLocale("en_US");
//Invoke the processFormSubmission method
FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
List fileAttachments = formOut.getAttachments();
Iterator iter = fileAttachments.iterator();
int i = 0 ;
while (iter.hasNext()) {
Document file = (Document)iter.next();
file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
short processState = formOut.getAction();
...... (To the end of the sample)
My Error was:
com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
at HandleData.doPost(HandleData.java:62)
at HandleData.doGet(HandleData.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
aI assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
Do the following test:
- Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
- Ping machine1 from machine1 and note the ip address.
The two pings should match.
- Ping machine2 from machine1 and note the ip address.
- Ping machine2 from machine2 and note the ip address.
The two pings should match.
Usually this kind of error would happen if your servers have internal and external ip addresses. -
Hi all,
I am trying to upload an image into MDM repository using the Java MDM4J API. I have referred to the earlier posting in this forum for the same problem I am not able to add images into Catalog thru java API. However I am working on SP3 version of MDM software and looks like the Images table structure changed a bit and the code in the earlier posting isn't working.
I am getting an error code <b>-5586944</b> and the message that gets printed on the console is
<i>a2i.core.StringException: AddRecord error
at a2i.common.CatalogData.AddRecord(Unknown Source)
at a2i.common.CatalogData.AddRecord(Unknown Source)</i>
Here is the code that I am using to upload the image
String filePath = "C:\temp\Sunset.jpg";
File file = new File(filePath);
byte[] bytes = new byte[(int) file.length()];
try{
//read byte from file, and set the large data
FileInputStream inputStream = new FileInputStream(file);
inputStream.read(bytes);
mdmFields.Add(new A2iField("Data ID", new Value(bytes)));
}catch(IOException ioex){
ioex.printStackTrace();
int dataGroupId = 0;//Hardcoded it to 0. There is one group already in the repository
mdmFields.Add(new A2iField("Data Group ID", new Value(dataGroupId)));
//adding the name
mdmFields.Add(new A2iField("Name", new Value(file.getName())));
mdmFields.Add(new A2iField("Original Name", new Value(file.getName())));
//adding OrigLocationId
int origLocationId =0;
try{
origLocationId = catalog.AddDataLocation(filePath, 0, DataLocationType.ComputerLocation);
System.out.println("Location id generated is " +origLocationId);
}catch(StringException ex){
System.out.println("Error while generating the location id");
ex.printStackTrace();
mdmFields.Add(new A2iField("Original Location ID", new Value(origLocationId)));
try {
//adding the image to the "Images" table
int newImageId = catalog.AddRecord("Images", mdmFields, 0, 0);
} catch (StringException e) {
// TODO Auto-generated catch block
System.out.println("Error while adding the image record " + e.GetErrorCode() + " " + e.GetRCMessage(e.GetErrorCode()));
e.printStackTrace();
I am not able to figure out what is causing the problem. Any ideas would be greatly helpful. Thanks in advance.
Suman.Hi Mausam,
Thanks for your help. However, the problem doesn't seem to be going.
I printed the records in the <b>Data Groups</b> table using a program to find the record ids that are already existing. My Data Groups table has 3 records. Here are the values.
ID :1 Value :MyGroup
ID :2 Value :Group2
ID :3 Value :Group3
I tried passing all the above 3 values (1,2,3) as input to the <b>Data Group ID</b> field. However, this time, I am getting a different error code this time
Error while adding the image record -2147483647 No message for RC (0x80000001)
a2i.core.StringException: AddRecord error
at a2i.common.CatalogData.AddRecord(Unknown Source)
at a2i.common.CatalogData.AddRecord(Unknown Source)
at images.MyImageUpload.uploadImage(MyImageUpload.java:82)
The error code <b>2147483647</b> from the javadocs says <b>RC_BADPARAM</b>. Not able to figure out what exactly is causing the problem with Data Group ID.
Any ideas or pointers to solve this would be greatly helpful. Thanks in advance.
Regards
Suman
> Hi Suman,
>
> If you look at the description for the error code,
> you get RC_CM_DATAGROUPNOTFOUND.
>
> Try giving some other value ( 1 worked for me ) in
> the Data Group or try following the code given for
> the Data Group in other forum post that you have
> mentioned.
>
> Regards,
> Mausam -
Java API for Adobe Flex(AIR and Browser)
Hello Community,
Sometime ago i started the project located at: : http://code.google.com/p/gwt4air/ , wich primary goal was to bring another approach on writing AIR application by providing a Java API for the AIR API. On top of that i added support for PDF and Excel generation using Java.
I m glad to announce that the project will now add support for the Flex Framework
I wrote a post about it on the main page.
The Idea behind it is to give Java Developers a more simple way to write Flex Application by leaveraing a swing like API.
I hope this project will be a good alternative to the MXML+ ActionScript approach and looking for people willing to join the project.
Regards,
AlainGood question, I'd like to know this myself. 4.5 has a huge number of changes since 4.0.
-
Need Sample Code for Vendor creation using JAVA API
Hi,
I have a scenario like Vendor creation using <b>Java API</b>.
1.I have Vendors (Main) Table.
2.I have <b>look up</b> tables like Account Group.
3.Also <b>Qualifier table</b>(Phone numbers) too.
Could you please give me the sample code which helps me to create Vendor records using Java API?
<b>I need Code samples which should cover all of the above scenario.</b>
<b>Marks will be given for the relevent answers.</b>
Best Regards
PK DevarajHi Devraj,
I hope the below code might solve all your problem:-
//Adding Qualified field
//Creating empty record in Qualifed table
//Adding No Qualifiers
Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
try {
qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
catch (IllegalArgumentException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
catch (MdmValueTypeException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
//Creating Record in Qualified table
CreateRecordCommand create_command = new CreateRecordCommand(connections);
create_command.setSession(sessionId);
create_command.setRecord(qualified_record);
try
create_command.execute();
catch(Exception e)
System.out.println(e.toString());
RecordId record_id = create_command.getRecord().getId();
//Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
QualifiedLookupValue lookup_value = new QualifiedLookupValue();
int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
//Adding Yes Qualifiers
lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
//Now adding LookUP values
//Fetch the RecordID of the value selected by user using the following function
public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
rsd.addSelectField(new FieldId(Fieldid));
StringValue [] val = new StringValue[1];
val[0] = new StringValue(value);
RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
val_command.setSession(sessionID);
val_command.setResultDefinition(rsd);
val_command.setFieldId(new FieldId(Fieldid));
val_command.setFieldValues(val);
try
val_command.execute();
catch(Exception e)
RecordResultSet result_set = val_command.getRecords();
RecordId id = null;
if(result_set.getCount()>0)
for(int i = 0 ; i < result_set.getCount() ; i++)
id = result_set.getRecord(i).getId();
return id;
//Finally creating the record in Main table
com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
try {
empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp value Retrieved above
} catch (IllegalArgumentException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (MdmValueTypeException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
//Actually creating the record in Main table
CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
create_main_command.setSession(sessionId);
create_main_command.setRecord(empty_record);
try
create_main_command.execute();
catch(Exception e)
System.out.println(e.toString());
Thanks
Namrata -
JAVA API AND ABAP API SIMPLE SCENARIO
Hello MDM gurus
I have never used any Java API or ABAP API to leverage and present MDM functionalities on front end systems like portal,etc...
Could you please give me all the required to play around with JAVA api and ABAP api's.
Points will be given to every valuable answer.
ThanksHi Nazeer,
In order to use Portal you need Java APIs and to start with refer the MDM Java docs to get the basic idea of various classes and methods to be used in developing the simple java application and access it using portal.
http://help.sap.com/saphelp_mdm550/helpdata/en/47/9f23e5cf9e3c5ce10000000a421937/frameset.htm
Sample code for Duplicating Repository
public class TestDuplicateRepository
public static ConnectionPool simpleConnection;
public static RepositoryIdentifier repIdentifier,repIdentifier1;
public static String session;
public static String connection = "MDMServer_Test";
public static String repository1 = "Test_Repository";
public static String repository2 = "Test_Duplicate";
public static DBMSType dbmsType = DBMSType.MS_SQL;
public static void main(String[] args)throws CommandException, ConnectionException
//Creating Connection.
simpleConnection = ConnectionPoolFactory.getInstance(connection);
//Establishing connection with Repository.
repIdentifier = new RepositoryIdentifier(repository1, connection, dbmsType);
repIdentifier1 = new RepositoryIdentifier(repository2, connection, dbmsType);
//Creation Sever Session.
CreateServerSessionCommand createServerSessionCmd = new CreateServerSessionCommand(simpleConnection);
createServerSessionCmd.execute();
session = createServerSessionCmd.getSession();
//Authenticating Server Session.
AuthenticateServerSessionCommand auth= new AuthenticateServerSessionCommand(simpleConnection);
auth.setSession(session);
auth.setUserName("Admin");
auth.setUserPassword("Admin");
auth.execute();
session = auth.getSession();
//Duplicate Repository Command
DuplicateRepositoryCommand duplRepCmd = new DuplicateRepositoryCommand(simpleConnection);
duplRepCmd.setDBMSUserName("sa");
duplRepCmd.setDBMSUserPassword("abc");
duplRepCmd.setSession(session);
duplRepCmd.setSourceRepositoryIdentifier(repIdentifier);
duplRepCmd.setTargetRepositoryIdentifier(repIdentifier1);
duplRepCmd.execute();
Similarly you can try with Getting server version, Archive repository and then move on to adding,modifying records etc.
For ABAP APIs refer the below link
http://help.sap.com/saphelp_mdm550/helpdata/en/44/93aa6e31381053e10000000a422035/frameset.htm
Regards,
Jitesh Talreja -
Insert Value(s) in Lookup Flat Multi-valued Table with Java API
I've been looking in MDM Java API Library Reference Guide, MDM SP4 API JavaDoc, and SDN Forums for information on how to Insert/Update different values in a field in the Main Table of a given repository that belongs to a Lookup Flat Multi-valued Table using the Java API with no success.
I also haven't been successful in adding this values in the same way that I'll add a single value, using the MDM Java API, in a single-value Lookup Table (a2iFields.Add(new A2iField(FIELD_CODE,FIELD_VALUE)) for each value I want to add, like for example:
a2iFields.Add(new A2iField("Country","USA")
a2iFields.Add(new A2iField("Country","Mexico")
a2iFields.Add(new A2iField("Country","Germany")
Can anybody point me to the correct documentation that I need to read to fulfill this task? Or, even better, if someone can post a piece of code, I'll be more thankful.
Thanks for your help.HI,
little code example, where you add existing lookup values based on there record id:
int USA = 1;
int GERMANY = 2;
A2iValueArray countryArray = new A2iValueArray();
countryArray.Add(new Value(USA));
countryArray.Add(new Value(GERMANY));
A2iFields record = new A2iFields();
record.Add(new A2iField("Country", new Value(countryArray)));
Please reward points if helpful.
Regards,
Robert -
How to start to work on MDM JAVA API by using webdynpro for java
Hi all
I have basic idea on MDM business package thru portal by using standard iViews.
now i am planning to work on MDM JAVA APIs by using Webdynpro for Java as UI.
1) can you please share the required documents on the same. how to start working on this by using MDM JAVA APIs in webdynpro for java
2) what are the JARs files are required and how to integrate those jar files into webdynpro for java application.
3) is there any SDN help on MDM JAVA API with webdynpro for java? . can you please send the link on the same.
4) can you please help by providing sample code on how to use JAVA APIs for retrieving,deleting,inserting and Updating the data in the database.
if anybody helps on the same then it is the great help to me.
points are always rewardable...
Regards
Suresh babuHi Suresh,
You can have the MDM JAVA API javadocs from the link
http://help.sap.com/javadocs/MDM/SP06P2/index.html
There you can see a package named com.sap.mdm.examples.The classes in it contains some examples using which you can start understanding the code.
You need to have MDM JAR files for it. And these JAR files to be used at build time can be added to the project thru :-
Right click on project-> properties->Java Build Path - > Add external JARs
At run time you can add them the reference in
Right click on project-> properties->web dynpro references->library reference.
Thanks
Namrata -
How to upload Image to MDM 5.5 SP3 using Java APIs
Hi,
I am trying to upload Image to Images table in MDM 5.5 using JAVA API for MDM. But. I'm not able to find particular field in Images table where I need to set the Blob object ( Image data ).
I'm not aware of the method to set the Blob, there is one for getting the Image data.
I have gone through I am not able to add images into Catalog thru java API forums posts and tried the code. But with no luck....
I think this code is for some other MDM version as the fields mentioned are not present in the Images table e.g. DataObject - this field is used in the above posts to set the Blob data but this field does not exist in Images table in MDM 5.5
Can anyone suggest the solution?
Thanks and Regards,
MausamHi Mausam,
Please try the following:
// adding to a image table
// get the bytes for the image
byte[] imageBuf = readFile("C:\pic.bmp");
// setup A2iFields
fields = new A2iFields();
fields.Add(new A2iField("DataObject", new
Value(imageBuf))); // the image binary (required)
fields.Add(new A2iField("Name", new Value("pic.bmp")));
// a name for the image
fields.Add(new A2iField("OrigName", new
Value("pic.bmp"))); // the original image file name
(required)
fields.Add(new A2iField("DataGroupId", new Value(888)));
// the data group to add to (required)
fields.Add(new A2iField("OrigLocationId", new
Value(999))); // the data location of the image
(required)
fields.Add(new A2iField("Description", new Value("a
short description"))); // a short description here
// add the image
String imageTable = "Images";
catalog.AddRecord(imageTable, fields, -1, -1);
It's taken out of the API guide for SP3 (the example for method AddRecord.
Best regards,
Amit -
How to initialize a replica by using Java API?
Hi, I used to initialize a replica by adding the attribute nsDS5BeginReplicaRefresh=start to the replica agreement and it works fine by using the ldapmodify commandline utility. Now I am trying to use the Java API to do the same, but I always get the Object class violation error. And I noticed that when I use the Java API to create the replica, it has the different attributes than the one created by the commandline utility. The former has the serializedJavaData and javaClass, ... And I can't find any documentation on this issue. It's really frustrating! I am wondering if the replica agreement has different attribute for initializing? If so, why it's never documented?
I badly need your help!!!
LouisHi Govada,
(1)You need to add the MDM4j and other JAR files at:-
right click on project -> Java Build Path -> Libraries -> Add External JARs
(2)If the project is Web Dynpro project one
then right click on project -> Web Dynpro Reference -> Library Reference -> and add sap.com/com.sap.mdm.tech.mdm4j
Are you using JAVA API 1 or 2???
Thanking you
Namrata Dixit -
PRC Collab Java API - external op job?
I am looking into using the PRC Collab Java API (to add calendar tasks programmatically) and want to know if that could be called as an external operation. It would probably be possible if the latest version edk.jar with the Collaboration API was on the Automation Portal Server. We have Automation Portal 5.0.4 installed and it comes with an older version of the EDK.jar.
Any comments and recommendations on on the best method way to accomplish what I am trying to do, would be appreciated.
Thanks.
VanitaCollaboration Server API support is added to the EDK since v 5.1. It provides support for Collab Project, documents, tasks and disucssions. You can use methods in com.plumtree.remote.prc.collaboration.tasklist.ITaskListManager and ITaskList to create tasklists and tasks. However, if you want to manage Collab Calendar events, you cannot use PRC Collab API, since there is currently no Calendar support in the API.
Maybe you are looking for
-
Source code for "Creating an Extended Web Dynpro Application"?
Hello! I'm a rookie in the field of SAP Netweaver and I'm justing getting started with some tutorials. My problems with "Creating an Extended Web Dynpro Application" are to massive to be posted on this forum in this stage. What I want to have some he
-
Hi all, Is normal class or abstract class or interface a good place for declaring constants?What is best practices for constants? Regards Ranjeet
-
Hello, I have a problem with grouping some data: SELECT pas_code, pas_profile, count(sutp_id), sum(sutp_price), (sutp_price_proc * count(sutp_id) * pbk_price / 100) x FROM [...tables and inner joins...] WHERE lelele GROUP BY pas_code, pas_profile, su
-
[SOLVED] Postgresql and systemd - Unable to start or enable service
I'm trying to run postgresql in a pure systemd machine. i've done a fresh install of postgresql using pacman as instructed in the wiki. However when i try to start the service i get the following: user@frodo:~$ sudo systemctl start postgresql.service
-
My iPod doesn't show song ratings in iTunes
When I am listening to music on the street, I give 1 star rating to songs i dislike, so I can delete them from my device when I get home and connect it with iTunes. In iTunes, there are the 5 and 4 tar ratings I gave to specific songs before I even p