'Public' Flex Java API licensing

Hi all,
I would like to use the MessageBroker and AsyncMessage classes from Flex Java API to publish messages to a Flex destination from Java classes.
The library with this API comes in the LiveCycle Data Services release but when i look at this API, it says clear is 'Public'.
How public is it? Can i use those classes freely for my production application? Is there any license restriction? Same license as for Live Cycle Services?
I need to know to decide what design i will use to connect or Flex client with our java server, so is really urgent.
Thanks,
Dani.

Looks like things have changed a bit since last week when I posted.
With the announcement yesterday of BlazeDS (scheduled for release 2008), it seems the libraries mentioned will be available under the LGPL v3, so I believe you may be able to redistribute them (unmodified and probably as a separate installer/archive) under the terms of the LGPL.
http://labs.adobe.com/technologies/blazeds/
It sounds like there will be some features not included in the OSS version of Data Services, but from reading the FAQ it seems that the messaging API you mentioned will be included in the LGPL licenced version.

Similar Messages

  • Flex Automation API "Licensing Issue"

    Hi,
    We are using "Eclipse Ganymede with Flash Builder Standard Version - 4.0 plugin" + Premium License. We are working with the automation of a Flex application. The automation tool we are using is the FlexMonkium 4.1.5.
    We have some issues with the automation. I have mentioned those below:
    Flex Automation API is limiting the features of the FlexMonkium 4.1.5 as this tool inherits the features and it underlies on the mechanism of the FlexAutomation API only.
    Due to the above mentioned point, the dependencies are:
    License not present. With the trial version only limited records are allowed.
    License not present. With the trial version only limited replays are allowed.
    When we record the user actions performed in the application with the FlexMonkium, we are getting the error as "License not present. With the trial version only limited records are allowed."
    Note: This error is thrown after 15 - 20 user actions have been performed.
    When we execute the recorded script, it is showing up a error message as "License not present. With the trial version only limited replays are allowed."
    Note: This error is thrown after 51 -20 user actions have been executed by the script.
    The complete code of the application is compiled with  "Eclipse Ganymede with Flash Builder Standard Version - 4.0 plugin" + Premium License."
    From the adobe forum: http://forums.adobe.com/thread/682958 we understood that the 4.1 SDK with Premium licence would work fine with record and playback.
    My quesion is, Does the same works with this combination > "Eclipse Ganymede with Flash Builder Standard Version - 4.0 plugin" + Premium License.
    Please guide me to resolve this issue, it would really be very helpful for me:)
    Thanks in advance,
    Anand.S

    May I know what you mean exactly by "Flash Builder Standard Version - 4.0 plugin" + Premium License.
    Have you entered Flash builder premium license key in the screen that asks for serial number? If so, it will be Flash Builder Premium version 4.0 and not Standard version any more.
    If so, automation should work without any issue.
    To check whether premium features are enabled for your version of Flash Builder, please open "Network Monitor" using Window > Show View and see if it is enabled.
    If it is disabled, it shows a message that premium license is required.
    Please confirm.
    Thanks,
    Deeptika

  • GWT meets  Flex:  Java API  for Flex

    Hello people,
    I m  somedays away to release the  version 2.1 of gwt4air. gwt4air is an open source project  based on  gwt (http://code.google.com/webtoolkit/)  and provides a Java API to different platform where Java is not the primary language.
    Version 2.0 added among other features  support for Adobe AIR, Alive PDF, Pure PDF, Aswing and other GWT based  UI libraries like  EXT-GWT
    With version 2.1  i added support for Flex(AIR and Browser). The goal of this approach is to make it easy for Java Developers to switch  to Flex be leveraging  a swing like API. But also to  present an alternative to the classical Flex developement. The overall idea behind this is described here:
    http://code.google.com/p/gwt4air/wiki/Beginn
    A demo application ca be found here: http://gwt4air.appspot.com/
    The application contains around 100 demos with source code illustrating the use of the api.
    I ve tried to keep the API similar to the AS3 api  so one could easely  switch from AS3 to Java and vice versa
    Note that this  flex applicaton is entirely written in Java using gwt4air. No AS3 no MXML.
    The application is still in alpha stage so please expect some errors.
    The project home is located at:
    http://code.google.com/p/gwt4air/
    I m looking forward to hear what you think about this idea. Any inputs (good or bad)  is really welcome
    Help me make this an even better tool.
    It s about time that  Flex rocks the GWT world
    cheers,
    Alain

    It looks like those genius @google are also thinking about a Java(GWT) API for Flash .
    http://www.youtube.com/watch?v=F_sbusEUz5w&t=1718
    Glad to see  that i m not a fool
    Or alteast not the only fool that believe  combining  Java and Flash/Flex is a potent mix.

  • Flex automation and license

    Hi,
    I try to use FlexMonkey with my project but after 30 records I've this error message : "License not present. With the trial verison only limited records are allowed.". However, I bought the license for Flash Builder premium 4.5.
    Maybe the problem is because I compile my project with flex builder 3.6?
    Could you help me? I bought the license specially for using Flex monkey...
    Thanks in advance,
    Bat

    It's not a FlexMonkey problem. It's an automation license problem and I'm having the same problem on one of two Windows 7 64-bit machines. I've done all that I can find in the thread Re: Flex Automation API "Licensing Issue" http://forums.adobe.com/thread/834214 but to no avail. As Deepita suggested to confirm Premium status, network monitor is available. I originally installed the trial version of Flash Builder, even had Burrito on for a while.
    Assuming it was some leftover file, I uninstalled every Adobe product  Bought CS5.5 Master Collection. Installed, same thing. Then I uninstalled CS5.5 MC and made sure that I permanently deactivated as per the suggestion in another thread. No luck.
    As per the above thread, I went looking for the following:
    On Windows 7 and Vista, the license.properties file is located in: ..\ProgramData\Adobe\Flex
    I modified that file's record for serial number (as it wasn't my sn for CS5.5) and had great hope.
    I'm still limited to 20 automation actions, at which point it all stops. Solution?

  • 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,
    Alain

    Good question, I'd like to know this myself. 4.5 has a huge number of changes since 4.0.

  • How to use the Public Java API

    Is it possible to use the Public Java API to write a custom transformation in Java and use this in OWB. i.e. Say I have a Dateofbirth field in my source database and an Agegroup field in the target database, and I write a transformation in Java to take the Dateofbirth as an input parameter to the method and calculate the Agegroup e.g. 25-30, and return it from this method which then populates the Agegroup field in the target database. If so, how do I go about this?

    Martin,
    In general, yes you could... but you do not need to. You could use the UI to implement this requirement. The public Java API is there for you to manipulate metadata. How you implement your system, is independent of that.
    The way you would go about the case you just mentioned... you would write the Java code, deploy it into the database, wrap it in a PL/SQL procedure or function, and call it from OWB.
    Would this be a good idea...? I think no. Unless you have very complicated calculations that can only be performed in Java, I strongly encourage you use the PL/SQL language. Reason being: transformation will be much faster, because there is no need to translate PL/SQL into Java and back again.
    Hope this helps,
    Mark.

  • [License Terms] Porting Java API to PHP5

    Hey folks,
    I hope someone can help me out here, because I could not find a better place to ask that question (if you know a better place, please tell me and do not start a flamewar).
    I am porting parts of the core JAVA Api (1.4.2) to PHP5 which makes sense to me (strict API, migrating from Java to PHP easier, porting frameworks from Java to PHP is easier and so on), but I am not sure about the proprietary license the Java API uses.
    So my question is:
    Is it legal to use method names, class names and even parts of source code (converted to PHP-syntax, of course) in another language?
    Kind regards
    Thorsten

    Hey folks,
    I hope someone can help me out here, because I could
    not find a better place to ask that question (if you
    know a better place, please tell me and do not start
    a flamewar).
    I am porting parts of the core JAVA Api (1.4.2) to
    PHP5 which makes sense to me (strict API, migrating
    from Java to PHP easier, porting frameworks from Java
    to PHP is easier and so on), but I am not sure about
    the proprietary license the Java API uses.
    So my question is:
    Is it legal to use method names, class names and even
    parts of source code (converted to PHP-syntax, of
    course) in another language?
    Kind regards
    ThorstenNot being an Intellectual Property Rights lawyer, I don't know. However, a good start would be reading the license you agreed to when you downloaded the JDK. I don't know if they save it on your hard drive ... you can always go back to the download site and just cancel the download after you read the license.
    RD-R
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Unable to raise password expiry warning exception in OID using JAVA API

    Hi,
    We are maintaing the user information for our application in OID(9.2). During logon, it is required that a warning is given to the user according to the value set in "Password Expiration Warning" parameter.
    A pl/sql program (using DBMS_LDAP/DBMS_LDAP_UTL packages) written to test password expiry raises the PWD_EXPIRE_WARN exception as expected. However we are unable to simulate the same using the JAVA APIs.
    We did try some thing like the following:
    public class SampleExpire {
    public static void main(String argv[])
    throws NamingException {
    // Create InitialDirContext
    InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx( "TCS-UUODC4",
    "4032",
    "cn=orcladmin",
    "welc0me" );
    System.out.println("Hello");
    // Create User Objects
    User myuser = null,
    try {
    // Create User using a subscriber DN and the User DN
    myuser = new User ( ctx,
    Util.IDTYPE_DN,
    "uid=C100013, ou=People, o=UUSD",
    Util.IDTYPE_DN,
    "ou=People, o=UUSD",
    false );
    catch ( UtilException e ) {
    * Exception encountered in User object constructor
    System.out.println("User creation failed");
    // Authenticate User
    try {
    myuser.authenticateUser(ctx,User.CREDTYPE_PASSWD,"Z100013");
    catch ( UtilException e ) {
    * Authenticate fails
    System.out.println("Authentication failed");
    } // End of SampleExpire.java
    The authenticate user does not raise any exception.
    Am I missing something ?
    Regards -
    Adhiraj

    Hi,
    did you manage to solve this problem? Please let me know

  • Java API to read the Encrypted Values from Windows Registry settings

    Is there any Java API to read the Encrypted Values from Windows Registry settings ?
    My Java Application invokes a 3rd party Tool that writes the key/value to windows registry settings under : “HKLM\Software\<3rdparty>\dataValue”.
    This entry is in BINARY and encrypted with 3DES, using crypto API from Microsoft.
    3rd party software to encrypt the data stored in registry it
    either uses C++ code: and uses the call “CryptProtectData” and “CryptUnProtectData” or
    If it is a .NET (C#) it uses the call “Protect” or “UnProtect” from class “ProtectData” of WinCrypt.h from the library “Crypt32.lib.
    Note: The data is encrypted using auto-generated machinekey and there is no public key shared to decrypt the Encrypted data.
    Since the data is encrypted using auto-generated machinekey the same can be decrypted from a .Net / C++ application using CryptUnprotectData or UnProtect() API of WinCrypt.h from the library “Crypt32.lib.
    To know more about Auto-Generated MachineKey in Windows refer the links below
    http://aspnetresources.com/tools/machineKey
    http://msdn.microsoft.com/en-us/library/ms998288.aspx
    I need to find a way in Java to find the equivalent API to decrypt (CryptUnprotectData) and Microsoft will automatically use the correct key.
    But i couldn't find any informato related to Java APIs to enrypt or decrypt data using auto-generated machinekey.
    Is there a way to read the encrypted data from Windows regsitry settings that is encrypted using the Auto-Generated Machine Key ?
    Kindly let me know if Java provides any such API or mechanism for this.

    If the symmetric key is "auto-generated" and is not being stored anywhere on the machine, it implies that the key is being regenerated based on known values on the machine. This is the same principle in generating 3DES keys using PBE (password-based-encryption). I would review the documentation on the C# side, figure out the algorithm or "seed" values being used by the algorithm, and then attempt to use the JCE to derive the 3DES key using PBE; you will need to provide the known values as parameters to the PBE key-generation function in JCE. Once derived, it can be used to decrypt the ciphertext from the Regiistry in exactly the same way as the CAPI/CNG framework.
    An alternate way for Java to use this key, is to write a JNI library that will call the native Windows code to do the decryption; then the Java program does not need to know details about the key.
    That said, there is a risk that if your code can derive the key based on known seeds, then so can an attacker. I don't know what your applicatiion is doing, but if this is anything related to compliance for some data-security regulation like PCI-DSS, then you will fail the audit (for being unable to prove you have adequate controls on the symmetric key) if a knowledgable QSA probes this design.
    Arshad Noor
    StrongAuth, Inc.

  • Java API's supported in the Jdeveloper, IAS, and RDBMS product components

    If there are any technical errors or "mistatement of the facts" in this posting, please let me know about them ..
    This article is being delivered in Draft form and may contain
    errors. Please use the MetaLink "Feedback" button to advise
    Oracle of any issues related to this article.
    PURPOSE
    This article describes the "Enterprise Java Beans" (EJB), "Java Server Pages"
    (JSP) and servlets Application Programming Interfaces (API) supported by the
    Oracle products, Jdeveloper, Internet Application Server (IAS) and the Oracle
    RDBMS release 2 and release 3, also known as Version 8.1.6 and 8.1.7,
    respectively.
    SCOPE & APPLICATION
    All parties interested in the Java API's supported by these products.
    Java API's supported in the Jdeveloper, IAS, and RDBMS product components
    JDEVELOPER
    JDEVELOPER is Oracle's Java development tool designed for coding / development,
    testing / debugging, and deployment of Java Applications to the IAS and
    RDBMS platforms.
    With the java software api's being in a constant state of evolution, each new
    release of Jdeveloper adds support for the "then current" version of the java
    software api's, if it does not already have it implemented.
    JDEVELOPER SERVLET API JSP API EJB API
    VERSION VERSION VERSION VERSION
    3.2.X.X 2.2 1.1 1.1
    3.1.X.X 2.1 1.0 1.0
    NOTE :
    Sun Microsystems and their advisory teams (Oracle is on it) is working on
    "draft" specifications for the next version of all of these API's
    EJB -------> http://java.sun.com/products/ejb/index.html
    JSP -------> http://java.sun.com/products/jsp/index.html
    Servlets --> http://java.sun.com/products/servlet/?frontpage-javaplatform
    It is anticipated that future releases of Jdeveloper will continue to be
    upgraded to include support for the next version of each api.
    To obtain the latest information on Oracle's Internet Development Suite (IDS)
    of tools, please review the "Internet Developer Suite" information located
    on Oracle's technet web site at :
    http://technet.oracle.com/products/index.htm
    IAS
    IAS is Oracle's next evolution of the web server and application server
    product technology superceeding the Web Application Server (WAS) and Oracle
    Application Server (OAS) product lines.
    IAS SERVLET API JSP API EJB API EJE VERSION
    VERSION VERSION VERSION VERSION SUPPORTED
    9I(1.0.2) 2.2 1.1 1.1 817
    8i(1.0.1-NT) 2.0 1.0 1.0 816
    8i(1.0.0-UNIX) 2.0 1.0 1.0 816
    The IAS product contains two Java Virtual Machines (JVM) within it's
    architecture.
    They are called :
    1) APACHE JSERV servlet engine
    2) ORACLE ENTERPRISE JAVA ENGINE (EJE)
    APACHE JSERV servlet engine
    The APACHE JSERV servlet engine is an EXISTING product licensed from the
    apache group which supports the servlet api 2.0.ONLY.
    The APACHE JSERV product does not support ANY JSP's unless the customer
    installs a third party jsp engine.
    The IAS 8i/9i which has the APACHE JSERV product embedded in it, comes with
    Oracle's JSP engine (OJSP) already integrated into it. OJSP supports JSP's up
    to the specific JSP engine version documented in the Oracle Universal
    Installer (OUI) for the 8.1.7 RDBMS or the IAS products. It is also documented
    in the product's release notes.
    Oracle ENTERPRISE JAVA ENGINE (EJE)
    The EJE formerly known as :
    1) Oracle 8i Java Virtual Machine (JVM)
    2) JSERVER component,
    3) Aurora JVM
    was originally releas ed in the RDBMS 8.1.5 database with jdk 1.1.6 based java
    support.
    The currently supported versions of the Oracle 8i RDBMS, versions 2 and 3,
    also known as Version 8.1.6 and 8.1.7, respectively, provides a jdk 1.2.1
    based java virtual machine support.
    "EJE" Version 816
    This EJE, found in rdbms 8.1.6 and IAS 8i, contains support for the ejb
    api 1.0, corba, and java stored procedures.
    "EJE" Version 817
    This EJE, found in rdbms 8.1.7 and IAS 9i, contains support for the ejb,
    corba, and java stored procedures as well as the Oracle Servlet Engine (OSE)
    which provides support for the servlets 2.2 api and JSP 1.1 api.
    Note :
    EJB support in the "EJE" Version 817 has been upgraded to comply with the EJB
    1.1 api specification which includes "entity beans" support.
    What is the bottom line ??
    1) Servlets deployed to the APACHE JSERV must comply with servlet api 2.0.
    2) Servlets 2.1 or higher are only supported in EJE's OSE component found in
    the rdbms 817 or ias 9i products. Servlets api 2.0 can also run in the OSE.
    References
    1) "Oracle9i Application Server Technical White Paper" located at :
    http://technet.oracle.com/products/ias/pdf/9ias_102.pdf
    2) "Whats New? Oracle8i JVM Accelerator, Oracle Servlet Engine, OracleJSP ..."
    located at :
    http://technet.oracle.com/products/oracle8i/pdf/504.pdf
    3) "Oracle8i Release 3 New Features Summary" located at :
    http://technet.oracle.com/products/oracle8i/pdf/8iR3_nfs.pdf
    null

    which jvm is used by jserv ?? EJE or a separate jdk ?
    The Jserv servlet engine is running in a separate jdk JVM external to the EJE jvm which is embedded within the "database" component of ias and the RDBMS.
    See the reference below for more details ...
    if jserv only support old apis, why it is in oracle's products ?
    i would assume that the oracle servlet engine was under development when ias 8i was released and became available in time for the ias 9i and rdbms 817 products.
    looking back in history leads me to believe ias 8i was a migration path to get to ias 9i or rdbms 817.
    Based upon the long history of new releases of every oracle product being upgraded with new features, it's reasonable to assume that these products will continue to evolve.
    when I deploy a jsp how to deploy in the right servlet container ("EJE") ?
    as documented in the reference below, you can deploy JSP's to either the apache jserv jvm or the EJE since the ORACLE JSP engine functionality is in both jvm's.
    there are many posts where you can see that people have deploy in jserv and they have problems because they don't use the right container (servlet 2.0 instead of
    servlet 2.2) http://technet.oracle.com:89/ubb/Forum2/HTML/006349.html
    when ias 8i came out this was clearly an issue since servlet support was at api 2.0, and the current servlet api was probably at 2.1.
    oracle clearly made every effort to get ias 9i released quickly to supply a servlet 2.1 and 2.2 capable engine to resolve this issue.
    since ias 9i and rdbms 8.1.7 are available this is no longer an issue.
    The reference below explains the architecture and understanding it would eliminate a lot of "deploy to the wrong ias 9i component" issues.
    so why jserv is bundled with oracle 8i/9ias since EJE support the right api version ?
    if in ias 9i release , oracle had removed the jserv component without any advance warning, many customers would have been very upset since oracle makes every attempt to give advance notice before removal of functionality.
    References
    1) "Oracle9i Application Server Technical White Paper" located at :
    http://technet.oracle.com/products/ias/pdf/9ias_102.pdf

  • Invoking a BPEL process  from java API (Urgent)

    Hi,
    I am using this java api to invoke a bpel process.
    package mypackage;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.dispatch.IDeliveryService;
    import com.oracle.bpel.client.ServerException;
    public class InvokeBpel1
    // Connect to domain “default” using password “bpel”
    // null IP address means local server
    public static void main(String args[])
    Locator locator=null;
    String xml =" <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope\">"
    +"<soap:Header/>"
    +" <soap:Body xmlns:ns1=\"http://xmlns.oracle.com/BPELMultiplePO\">"
    +"<ns1:BPELMultiplePOProcessRequest>"
    +" <ns1:input>4686</ns1:input>"
    +" </ns1:BPELMultiplePOProcessRequest>"
    +" </soap:Body>"
    +"</soap:Envelope>";
    try
    locator = new Locator("default","bpel","10.227.5.34");
    IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    NormalizedMessage res =
    deliveryService.request("BPELMultiplePO(v1.1)", "process", nm);
    catch (Exception e)
    e.printStackTrace();
    But it is showing following errors.----
    java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DomainManagerBean not found
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
         at com.evermind.naming.FilterContext.lookup(FilterContext.java:138)
         at com.evermind.naming.SubFilterContext.lookup(SubFilterContext.java:55)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:87)
         at mypackage.InvokeBpel1.main(InvokeBpel1.java:26)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:87)
         at mypackage.InvokeBpel1.main(InvokeBpel1.java:26)
    What should I do remove this problem?

    Your problem sounds like many RMI problems answered in this forum in the past, especially if the java client is not on the same container as the bpel engine.
    Usually solved with setting some environment properties like dedicated.rmicontext=true etc.
    Please search the forum history.

  • How do I create a user, in my context in OID using the Java API

    How do I create a user, with subschema, in my context in OID using the JAVA API
    I need to be able to create new users in my OID, I was doing it in our old iPlant Directory, but I don't seem to see the same methods in the Oracle LDAP API. I figured out how to get and modify the attributes of a user, but I can't seem to figure out how to add a new one.

    Try this code , modify it accordingly
    ------- cut here -------
    import oracle.ldap.util.*;
    import oracle.ldap.util.jndi.*;
    import javax.naming.NamingException;
    import javax.naming.directory.*;
    import java.io.*;
    import java.util.*;
    public class NewUser
    final static String ldapServerName = "yourLdapServer";
    final static String ldapServerPort = "4032";
    final static String rootdn = "cn=orcladmin";
    final static String rootpass = "welcome1";
    public static void main(String argv[]) throws NamingException
    // Create the connection to the ldap server
    InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx(ldapServerName,
    ldapServerPort,
    rootdn,
    rootpass);
    // Create the subscriber object using the default subscriber
    Subscriber mysub = null;
    String [] mystr = null;
    try {
    RootOracleContext roc = new RootOracleContext(ctx);
    mysub = roc.getSubscriber(ctx, Util.IDTYPE_DN, "o=dec", mystr);
    catch (UtilException e) {
    e.printStackTrace();
    // Create ModPropertySet with user information
    ModPropertySet mps = new ModPropertySet();
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"cn", "Steve.Harvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"sn", "Harvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"uid", "SHarvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"givenname", "Steve");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"mail", "[email protected]");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"userpassword", "welcome1");
    // Create the user
    User newUser = null;
    try {
    newUser = mysub.createUser(ctx, mps, true);
    System.out.println("New User DN: " + newUser.getDN(ctx));
    catch (UtilException e) {
    e.printStacktrace();
    ------- end cut --------
    Enjoy.
    Suhail

  • MDM Java API (Creation of table)

    Hi,
    can anyone help me for  creation of tables in repository using MDM java API .
    Can u Provide sample code for this.
    Edited by: Srikanth Josyula on Jun 26, 2008 8:52 AM

    Hi Srikanth,
    Check with this code.It may be useful.
    createflattable.java
    Created on June 25, 2008, 5:08 PM
    To change this template, choose Tools | Options and locate the template under
    the Source Creation and Management node. Right-click the template and choose
    Open. You can then make changes to the template in the Source Editor.
    package tabletype;
    import com.sap.mdm.commands.AuthenticateRepositorySessionCommand;
    import com.sap.mdm.commands.CommandException;
    import com.sap.mdm.commands.CreateRepositorySessionCommand;
    import com.sap.mdm.commands.GetRepositoryRegionListCommand;
    import com.sap.mdm.data.MultilingualString;
    import com.sap.mdm.data.RegionProperties;
    import com.sap.mdm.data.RegionalString;
    import com.sap.mdm.net.ConnectionException;
    import com.sap.mdm.net.ConnectionPool;
    import com.sap.mdm.net.ConnectionPoolFactory;
    import com.sap.mdm.schema.TableProperties;
    import com.sap.mdm.schema.commands.CreateTableCommand;
    import com.sap.mdm.schema.commands.GetFieldListCommand;
    import com.sap.mdm.schema.commands.GetTableListCommand;
    import com.sap.*;
    import com.sap.mdm.server.DBMSType;
    import com.sap.mdm.server.RepositoryIdentifier;
    import java.util.Locale;
    public class createflattable {
        /** Creates a new instance of createflattable */
        public createflattable() {
            private static MultilingualString createMultilingualString(RegionProperties[] regionPropertiesList, String baseString)
            MultilingualString mlString = new MultilingualString();
            for (int i = 0; i < regionPropertiesList.length; i++)
                Locale locale = regionPropertiesList<i>.getLocale();
                //Locale locale = regionPropertiesList<i>.getLocale();
                String regionCode = regionPropertiesList<i>.getRegionCode();
                String string = baseString + "_" + locale.getLanguage() + "_" + locale.getCountry();
                RegionalString regionalstring = new RegionalString(string, regionCode);
                mlString.set(regionalstring);
            return mlString;
        private static TableProperties createFlatTable(RegionProperties[] regionPropertiesList)
            //MultilingualString tableName = createMultilingualString(regionPropertiesList, "NewTable" + System.currentTimeMillis());
    MultilingualString tableName = createMultilingualString(regionPropertiesList, "first"+System.currentTimeMillis());
    System.out.println("table is" +tableName);
            TableProperties table = new TableProperties(TableProperties.FLAT);       
            table.setName(tableName);
            table.setCode("NewCode" + System.currentTimeMillis());
            table.setKeyMappable(true);
            table.setDescription("");
            return table;
          public static void main(String[] args) {
                // System Name
         String tag = "";
        ConnectionPool connections = null;
    try {
        connections = ConnectionPoolFactory.getInstance(tag);
    catch (ConnectionException e)
    e.printStackTrace();
    return;
    //////////////// specify the repository to use
    //RepositoryName
    String repositoryName = "";
    //DataBase Name
    String dbmsName = "";
    RepositoryIdentifier  reposId = new RepositoryIdentifier(repositoryName, dbmsName, DBMSType.MS_SQL);
    /////// create a repository session
    CreateRepositorySessionCommand sessionCommand = new CreateRepositorySessionCommand(connections);
    sessionCommand.setRepositoryIdentifier(reposId);
    try {
    sessionCommand.execute();
    catch (CommandException e) {
    e.printStackTrace();
    return;
    System.out.println("Currently connected to "+reposId);
    String sessionId = sessionCommand.getRepositorySession();
    /////////// authenticate the repository session
    String userName = "";
    String userPassword = "";
    AuthenticateRepositorySessionCommand authCommand = new AuthenticateRepositorySessionCommand(connections);
    authCommand.setSession(sessionId);
    authCommand.setUserName(userName);
    authCommand.setUserPassword(userPassword);
    try {
    authCommand.execute();
    catch (CommandException e) {
    e.printStackTrace();
    return;
    //////////////////// retrieve the list of tables
    GetTableListCommand tableListCommand = new GetTableListCommand(connections);
    tableListCommand.setSession(sessionId);
    try {
    tableListCommand.execute();
    catch (CommandException e) {
    e.printStackTrace();
    return;
    // get change stamp
      // this is required when we make any kind of changes to the repository
         int changeStamp = tableListCommand.getChangeStamp();
         //////get repository regionlist
    //A command for retrieving the list of regions supported by the repository.
          // retrieve the available regions (languages) for the repository
          // we need this to set up the table name for each region
      GetRepositoryRegionListCommand gm =  new GetRepositoryRegionListCommand(connections);
       gm.setRepositoryIdentifier(reposId);
            try {
               gm.execute();
            catch (CommandException e) {
                e.printStackTrace();
                return;
       //   RegionProperties[] rs = gm.getRegions();
    RegionProperties[] regionPropertiesList = gm.getRegions();
          TableProperties newtable = createFlatTable(regionPropertiesList);
          CreateTableCommand c = new CreateTableCommand (connections);
            c.setSession(sessionId);
          c.setTable(newtable);
       c.setInChangeStamp(changeStamp);
            try {
                 c.execute();
                System.out.println("sdf");
            catch (CommandException e) {
                e.printStackTrace();
                return;

  • Java API for running entire ".sql" files on a remote DB ( mySQL or Oracle)?

    Hi,
    Would anyone happen to know if there's a java API for executing entire ".sql" files (containing several different SQL commands), on a remote database server ?
    It's enough if the API works with MySQL and/or Oracle.
    Just to demonstrate what i'm looking for:
    Suppose you've created sql file "c:/test.sql" with several script lines:
    -- test.sql:
    insert into TABLE1 values(3,3);
    insert into TABLE1 values(5,5);
    create table TABLE2 (name VARCHER) ENGINE innoDB; -- MYSQL specific
    Then the java API should look something like:
    // Dummy java code:
    String driver="com.mysql.jdbc.Driver";
    String url= "jdbc:mysql://localhost:3306/myDb";
    SomeAPI.executeScriptFile( "c:/test.sql", driver, url);
    Thanks.

    No such a API, but it's easy to parse all sqls in a file, then run those command:
    For instance:
    import java.sql.*;
    import java.util.Properties;
    /* A demo show how to load some sql statements. */
    public class testSQL {
    private final static Object[] getSQLStatements(java.util.Vector v) {
    Object[] statements = new Object[v.size()];
    Object temp;
    for (int i = 0; i < v.size(); i++) {
    temp = v.elementAt(i);
    if (temp instanceof java.util.Vector)
    statements[i] = getSQLStatements( (java.util.Vector) temp);
    else
    statements[i] = temp;
    return statements;
    public final static Object[] getSQLStatements(String sqlFile) throws java.
    io.IOException {
    java.util.Vector v = new java.util.Vector(1000);
    try {
    java.io.BufferedReader br = new java.io.BufferedReader(new java.io.
    FileReader(sqlFile));
    java.util.Vector batchs = new java.util.Vector(10);
    String temp;
    while ( (temp = br.readLine()) != null) {
    temp = temp.trim();
    if (temp.length() == 0)
    continue;
    switch (temp.charAt(0)) {
    case '*':
    case '"':
    case '\'':
    // System.out.println(temp);
    break; //Ignore any line which begin with the above character
    case '#': //Used to begin a new sql statement
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    break;
    case 'S':
    case 's':
    case '?':
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    v.addElement(temp);
    break;
    case '!': //Use it to get a large number of simple update statements
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    String part1 = temp.substring(1);
    String part2 = br.readLine();
    for (int i = -2890; i < 1388; i += 39)
    batchs.addElement(part1 + i + part2);
    for (int i = 1890; i < 2388; i += 53) {
    batchs.addElement(part1 + i + part2);
    batchs.addElement(part1 + i + part2);
    for (int i = 4320; i > 4268; i--) {
    batchs.addElement(part1 + i + part2);
    batchs.addElement(part1 + i + part2);
    for (int i = 9389; i > 7388; i -= 83)
    batchs.addElement(part1 + i + part2);
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    break;
    default:
    batchs.addElement(temp);
    break;
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    br.close();
    br = null;
    catch (java.io.FileNotFoundException fnfe) {
    v.addElement(sqlFile); //sqlFile is a sql command, not a file Name
    Object[] statements = new Object[v.size()];
    for (int i = 0; i < v.size(); i++)
    statements[i] = v.elementAt(i);
    return statements;
    public static void main(String argv[]) {
    try {
    String url;
    Object[] statements;
    switch (argv.length) {
    case 0: //Use it for the simplest test
    case 1:
    url = "jdbc:dbf:/.";
    if (argv.length == 0) {
    statements = new String[1];
    statements[0] = "select * from test";
    else
    statements = argv;
    break;
    case 2:
    url = argv[0];
    statements = getSQLStatements(argv[1]);
    break;
    default:
    throw new Exception(
    "Syntax Error: java testSQL url sqlfile");
    Class.forName("com.hxtt.sql.dbf.DBFDriver").newInstance();
    //Please see Connecting to the Database section of Chapter 2. Installation in Development Document
    Properties properties = new Properties();
    Connection con = DriverManager.getConnection(url, properties);
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    //Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    // stmt.setMaxRows(0);
    stmt.setFetchSize(10);
    final boolean serializeFlag = false;//A test switch to serialize/deserialize the resultSet
    ResultSet rs;
    for (int i = 0; i < statements.length; i++) {
    if (statements[i] instanceof java.lang.String) {
    String temp = (java.lang.String) statements;
    switch (temp.charAt(0)) {
    case 'S':
    case 's':
    case '?':
    System.out.println(temp);
    rs = stmt.executeQuery(temp);
    if (serializeFlag) {
    // serialize the resultSet
    try {
    java.io.FileOutputStream fileOutputStream = new
    java.io.FileOutputStream("testrs.tmp");
    java.io.ObjectOutputStream
    objectOutputStream = new java.io.
    ObjectOutputStream(fileOutputStream);
    objectOutputStream.writeObject(rs);
    objectOutputStream.flush();
    objectOutputStream.close();
    fileOutputStream.close();
    catch (Exception e) {
    System.out.println(e);
    e.printStackTrace();
    System.exit(1);
    rs.close(); //Let the CONCUR_UPDATABLE resultSet release its open files at once.
    rs = null;
    // deserialize the resultSet
    try {
    java.io.FileInputStream fileInputStream = new
    java.io.FileInputStream("testrs.tmp");
    java.io.ObjectInputStream objectInputStream = new
    java.io.ObjectInputStream(
    fileInputStream);
    rs = (ResultSet) objectInputStream.
    readObject();
    objectInputStream.close();
    fileInputStream.close();
    catch (Exception e) {
    System.out.println(e);
    e.printStackTrace();
    System.exit(1);
    ResultSetMetaData resultSetMetaData = rs.
    getMetaData();
    int iNumCols = resultSetMetaData.getColumnCount();
    for (int j = 1; j <= iNumCols; j++) {
    // System.out.println(resultSetMetaData.getColumnName(j));
    /* System.out.println(resultSetMetaData.getColumnType(j));
    System.out.println(resultSetMetaData.getColumnDisplaySize(j));
    System.out.println(resultSetMetaData.getPrecision(j));
    System.out.println(resultSetMetaData.getScale(j));
    System.out.println(resultSetMetaData.
    getColumnLabel(j)
    + " " +
    resultSetMetaData.getColumnTypeName(j));
    Object colval;
    rs.beforeFirst();
    long ncount = 0;
    while (rs.next()) {
    // System.out.print(rs.rowDeleted()+" ");
    ncount++;
    for (int j = 1; j <= iNumCols; j++) {
    colval = rs.getObject(j);
    System.out.print(colval + " ");
    System.out.println();
    rs.close(); //Let the resultSet release its open tables at once.
    rs = null;
    System.out.println(
    "The total row number of resultset: " + ncount);
    System.out.println();
    break;
    default:
    int updateCount = stmt.executeUpdate(temp);
    System.out.println(temp + " : " + updateCount);
    System.out.println();
    else if (statements[i] instanceof java.lang.Object[]) {
    int[] updateCounts;
    Object[] temp = (java.lang.Object[]) statements[i];
    try {
    for (int j = 0; j < temp.length; j++){
    System.out.println( temp[j]);
    stmt.addBatch( (java.lang.String) temp[j]);
    updateCounts = stmt.executeBatch();
    for (int j = 0; j < temp.length; j++)
    System.out.println((j+1)+":"+temp[j]);
    for (int j = 0; j < updateCounts.length; j++)
    System.out.println((j+1)+":" +updateCounts[j]);
    catch (java.sql.BatchUpdateException e) {
    updateCounts = e.getUpdateCounts();
    for (int j = 0; j < updateCounts.length; j++)
    System.out.println((j+1)+":"+updateCounts[j]);
    java.sql.SQLException sqle = e;
    do {
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:" +
    sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    sqle.printStackTrace();
    while ( (sqle = sqle.getNextException()) != null);
    catch (java.sql.SQLException sqle) {
    do {
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:" +
    sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    sqle.printStackTrace();
    while ( (sqle = sqle.getNextException()) != null);
    stmt.clearBatch();
    System.out.println();
    stmt.close();
    con.close();
    catch (SQLException sqle) {
    do {
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:" + sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    sqle.printStackTrace();
    while ( (sqle = sqle.getNextException()) != null);
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();

  • 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 Devaraj

    Hi 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

Maybe you are looking for

  • A mac trying to talk to a PC - Please HELP.

    Mac is set up with ISIGHT/ICHAT PC is set up with LOGICTECH Quickcam Fusion/AOL Instant messenger. So we can text message and we can even do an audio chat. But when it comes to Video it does not go through. When I(the mac) invite the PC, the PC sees

  • HP laserjet 2100M won't print

    Just downloaded the"AirPort Extreme Update 2007-002" (1.0) last night, and have been unable to print through my asante appletalk to the Hewlett Packard laser jet 2100m.since then. Today I downloaded the 10.4.9 OS, and the "003" airport upgrade in hop

  • How can I upgrade my CS5.5 design standard to CS6 extended?

    Please help me

  • Title Search Option Missing on iPhone via Home Sharing

    When accessing home shared media via my iPhone 5, the search option (to enter a movie title) is now missing.  This occurred after the iOS 7 update.  Is there another way to do a title search, or are there plans to add this option back?  My apologies

  • Mise à jour de elements 13

    J'utilise Element 13 sous windows 8. Depuis une semaine, à chaque lancement de photoshop organiseur, le système m'indique que des updates doivent être chargées. Je réponds "oui". Le processus démarre correctement et dès le début du chargement des upd