Java Code to Connect to OIM on HTTPS

Hi All,
I have recently disabled the HTTP Port for OIM and enabled only HTTPS Port. I have java code that I used to connect to OIM on HTTP Port but that doesn't working anymore.
I have update the OIM_URL to use t3s but not sure what else in system property I need to add (I think its has to be keystore path). So, i added System Property
weblogic.security.SSL.trustedCAKeyStore = "Path of Kesytore"
but I am getting below error:
javax.security.auth.login.LoginException: java.lang.NoSuchMethodError: com/certicom/net/ssl/SSLContext.getCertificateSupport()Lcom/certicom/tls/interfaceimpl/CertificateSupport;
at com.bea.sslplus.CerticomSSLContext.setTrustManager(Unknown Source)
at weblogic.security.utils.SSLContextWrapper.<init>(SSLContextWrapper.java:62)
at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapper.java:55)
at weblogic.security.utils.SSLSetup.getSSLContext(SSLSetup.java:323)
Any pointers on what I have to add?
TIA

The issue was due to the order of jar files in build path:
This is the correct order :
1. Crypto.jar
2. wlfullclient.jar
3. wlcipher.jar
4. webserviceclient+ssl.jar
I use the JDK Keystore configured with IDE cacerts, import root ca cert and it worked.

Similar Messages

  • Urget Help --- Please give me the core java code that connects to UNIX ser

    Can anyone provide the core java code that connects UNIX server after verifying credentials and allow to implements UNIX commands through java program?

    no, you don't want to do that.
    You want to connect yourself, which Java is quite capable of doing, rather than go through some 3rd party client program that's not only specific to a particular operating system but not guaranteed to be installed at any particular machine or if it is to be installed in such a way that you can start it from your Java program.
    And then there's the little matter of figuring out the external API to use that program in the way you intent to (if it has one).

  • Java code to connect to unix box(putty)

    i'm having a great problem regarding accessing the putty box from java code.
    I need to read some log files from unix through java code.In my client program when i'm giving hostname and port=22...ssh terminal is getting detected,but i'm confused how to open that unix box by giving the username and password.and how am i goin to embed unix command in it.The entire job i've to do through java code.
    please help!!..Thanks
    Message was edited by:
    liz310
    Message was edited by:
    liz310

    thanks a lot guys for ur time...but i tried in every way..i'm getting hell lot of errors..please help..its really urgent
    /*this is my code:*/
    import com.jcraft.jsch.*;
    import com.jcraft.jsch.Channel;
    import com.jcraft.jsch.JSch;
    import com.jcraft.jsch.JSchException;
    import com.jcraft.jsch.Session;
    import com.jcraft.jsch.UserInfo;
    import java.io.*;
    public class shell_test {
    public static void main(String args[])
    String user="user15";
    String host="punlin040";
    String cmd="ls -l";
    JSch jsch = new JSch();
    try{
    Session session=jsch.getSession(user,host,22);
    session.setPassword("user15");
    //UserInfo usrInfo=new MyUserInfo();
    //session.setUserInfo(usrInfo);
    session.connect();
    Channel channel=session.openChannel("exec");
    ((ChannelExec) channel).setCommand(cmd);
    channel.setXForwarding(true);
    channel.connect();
    //code
    channel.setInputStream(System.in);
    // channel.setOutputStream(System.out);
    //((ChannelExec) channel).setErrStream(System.err);
    InputStream in = channel.getInputStream();
    channel.connect();
    byte[] tmp = new byte[1024];
    while (true)
    while (in.available() > 0)
    int i = in.read(tmp, 0, 1024);
    if (i < 0)
    break;
    System.out.print(new String(tmp, 0, i));
    if (channel.isClosed())
    in.close();
    // System.out.println("JSCH: exit-status: " +
    //channel.getExitStatus());
    break;
    try
    Thread.sleep(1000);
    catch (Exception ee)
    channel.disconnect();
    session.disconnect();
    //code
    //ch.setInputStream(System.in);
    //ch.setOutputStream(System.out);
    }catch(Exception e)
    {e.printStackTrace(); }
    /*public static class MyUserInfo implements UserInfo {
    public String getPassword()
    { return "password"; }
    public String getPassphrase()
    { return ""; }
    public boolean promptPassword(String arg0)
    { return true; }
    public boolean promptPassphrase(String arg0)
    { return true; }
    public boolean promptYesNo(String arg0)
    { return true; }
    public void showMessage(String arg0)
    but i'm getting following errors:
    com.jcraft.jsch.JSchException: java.lang.ClassNotFoundException: com.jcraft.jsch
    .jce.Random
    at com.jcraft.jsch.Session.connect(Session.java:160)
    at com.jcraft.jsch.Session.connect(Session.java:145)
    at shell_test.main(shell_test.java:25)
    Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.jce.Random
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.jcraft.jsch.Session.connect(Session.java:156)
    ... 2 more

  • Java code to connect to remote windows machine from local machine

    Hi,
    I have developed a code to connecting remote windows M/C from local M/C by using SSH2 (ganymed-ssh2-build209.jar) API. when I run the code its giving below error. Can any one please help me how to resolve it. And also please let me know, is there any other way to connect remote windows system using java code.
    Exception.
    java.io.IOException: There was a problem while talking to <host name>:22
      at ch.ethz.ssh2.Connection.connect(Connection.java:642)
      at ch.ethz.ssh2.Connection.connect(Connection.java:460)
      at Connect.RemoteServer.ConnectWindowsServer.runCommand(ConnectWindowsServer.java:55)
      at Connect.RemoteServer.ConnectWindowsServer.main(ConnectWindowsServer.java:27)
    Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at ch.ethz.ssh2.transport.TransportManager.initialize(TransportManager.java:299)
      at ch.ethz.ssh2.Connection.connect(Connection.java:591)
      ... 3 more
    JAVA Code
    import ch.ethz.ssh2.Connection;
    import ch.ethz.ssh2.Session;
    public void setAuthenticationInfo(String hostname, String username,String password) {
           this.host = hostname;
           this.userid = username;
           this.password = password;      
           this.recentCommand = "";     
           System.out.println("setting authentication info completed for host=" + host );
      public void runCommand() throws Exception {
    try{
            // Setup ssh session with endpoint
           System.out.println("starting connection with " + host);
           Connection connection = new Connection(host);
           System.out.println("connection object created..");
           connection.connect();
           System.out.println("Connect to connection");
           connection.authenticateWithPassword(userid,password);
           System.out.println(connection.isAuthenticationComplete());
           Session session = connection.openSession();
          System.out.println("connected");
      }catch (Exception e) {
      e.printStackTrace();
    Regards,
    Praveen

    Hi baftos,
    I tried to telnet remote windows machine from my local machine on port 23, its not connected and given error message like "Connect failed".
    As your response, if we can telnet to remote windows machine from local machine then we can connect from Java. Is it correct ?.
    Can you please help me to resolve this issue. And also please confirm the port (23) is correct, which I was used to connect remote machine from telnet.
    Regards,
    Praveen

  • Java code to connect to WSDL file with custom header

    Hi all,
    I am an absolute noob when it comes to Java. I need to write a Java app that can connect to a WSDL file with a custom header. Basically, all I need to do is connect to the web service and pass a username and password.
    Any help would be appreciated.
    Thanks,
    A

    Better you use tools which can generate code(interface,proxy and stub classes) which can take care of calling all the WSDL defined methods..i generally use RAD not an open source as per OP use eclipse open source or netbeans which can do the trick

  • Java code to make connection to web server??

    Hi,
    we are looking at simple java code to connect to IIS Server and retrive a ZIPed file.
    this zip file contains photos. all individual photos are stored in zip file under doc root of IIS server..
    any sample code will be great

    Here is some code on how to open an URL and read from it.
    url = new URL("http://IIS_server/doc/Yourfile.zip");
    URLConnection conn = url.openConnection();
    conn.setDoInput(true);
    in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    StringBuffer sbResponse = new StringBuffer();
    int intChar = 0;
    while ((intChar = in.read()) !=-1) {
         // got one byte as int from the server do something here to pass the byte from one stream to another (filestream)
         // there is a way to save to the local HD with an applet but you have to sign it and adjust some security policys
    in.close();

  • Update USR table from Java Code outside OIM

    Hi,
    I want to update a particular field in the USR table using the update query specifically from the java code. I dont want use updateUser api.
    I have written the code which works fine for some userids. But for some user ids it gets the tcUtility object successfully but when trying to execute the update query, it throws the tcDatasetException with message as Data Access Error.
    Please let me know how can i achieve this.
    Also let me know the groups the userid should be member to execute a update query on OIM DB from external java code..
    TIA...

    You are performing an unsupported process. I suggest you correctly code a connection to OIM, and perform the update correctly.
    If you need to update the database directly, use jdbc java connection and run the update. You can do a google search for jdbc and java to find plenty of samples.
    -Kevin

  • Client Code not connecting to WebLogic 8.1 with Mutual Authentication

    I am trying to connect to a WebLogic 8.1 web services application. The weblogic instance has mutual authentication enabled, so the client needs to send a certificate when it does an SSL handshake with the server. I am trying to connect with standalone Java JUnit tests. Both the web services and the JUnit tests are using Apache Axis 1.4.0. I've obtained what I believe to be the appropriate certificates from the weblogic administrator that configured the mutual authentication. There is a certificate for the machine I'm trying to connect to, and two other certificates in the chain (three certificates all together, including the root). I've tried several different methods of putting those three certificates in keystores and trust keystores, reading in those keystores in my java code, and connecting to the web services, and I always end up with the same error in the WebLogic server logs. "Certificate chain receved from <ip address> was incomplete."
    Here is an example of my code:
    I initialize like so:
         Properties tempProperties = // (here is where I obtain my properties from a properties file... code removed for security reasons)
         System.setProperty("javax.net.ssl.trustStore", tempProperties.getProperty("trust.keystore.file"));
         System.setProperty("javax.net.ssl.trustStorePassword", tempProperties.getProperty("trust.keystore.password"));
         System.setProperty("javax.net.ssl.trustStoreType", "jks");
         System.setProperty("javax.net.ssl.keyStore", tempProperties.getProperty("keystore.file"));
         System.setProperty("javax.net.ssl.keyStorePassword", tempProperties.getProperty("keystore.password"));                         System.setProperty("javax.net.ssl.keyStoreType", "jks");
         System.setProperty ( "java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol" );
         Security.addProvider ( new com.sun.net.ssl.internal.ssl.Provider ( ) );
    I bind to the appropriate port and locate the service, etc. using auto-generated methods descendant from Apache Axis. No matter what I try, I get the same results. The client says: main, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    The server log says: Certificate chain received from <ip address> was incomplete.
    I've even tried implementing a custom SSL handler as described here http://alweb.homeip.net/dw0rm/dblog/?p=38, and I can verify by stepping into my code that everything gets initialized and set up correctly, and that all three certificates in the chain that I need are obtained from my keystore, but I still get the same error on the client and the server. I've enabled ssl handshake debugging on my client and I can see the whole certificate chain being output to the debug console.
    Any idea what I might be doing wrong?

    My guess would be that the server is not able to validate your certificate. Make sure that the CA for your certificate is trusted by WLS.
    I always like to debug something like this by add -Djavax.net.debug=ssl to both the client and server. It should give you a complete picture of what is going on.
    Edited by: joshbregmanoracle on May 20, 2009 8:49 PM

  • How to embid java code in JavaScript

    Hi!!
    I am writing JSP program.
    Do u know how to embid java code in javascirpt
    ex:
    <SCRIPT>
    alert("hello");
    <%
    System.out.println("Hello...Satish. ");
    %>
    </SCRIPT>
    This alert message is not comming when i add the java code.

    Do u know how to embid java code in javascirptYou can't.
    Java/JSP code runs, and produces a web page. At this point any html/javascript is treated just as "text" to output.
    That web page is then sent to the browser which runs javascript.
    All java code has been run/removed - maybe generating HTML in its place.
    The only way to call java code again is to submit an HTTP request - normally by clicking a link/submitting a form.

  • Code to parse java code

    anyone know where we can get the code that parses the Java code that we put here ?
    i was thinking it would be a good base to use as a pre-compiler project - so we can have pre-compiler flags like in c - say to include logging ...
    example of the code formatting at work:
    class Rename{
      * Rename a file from command line,
      * args[0] is the existing file name
      * args[1] is the new file name
      public static void main (String[] args)
       try{
        java.io.File fExisting = new java.io.File(args[0]);   
        java.io.File fNew = new java.io.File(args[1]);
        if(!fExisting.exists()){
         System.out.println("Rename will fail as source does not  exist. Exiting");
         return;
        if(fNew.exists()){
         System.out.println("Rename might fail as target already exits - delete it first ");
        System.out.println("attempt rename :\n" + fExisting.getAbsolutePath() + "\n to:\n" + fNew.getAbsolutePath() );
        boolean b = fExisting.renameTo(fNew);
        if(b){
         System.out.println("Done ok ");
        }else{
         System.out.println("rename failed ");
       }catch(Throwable e){
        System.out.println("Could not rename " + e);
        e.printStackTrace();
    synchrozied (objSync){
    try{
      while(bPause){
       Thread.sleep(250);  
      }catch(Throwable e){
       //can ignore
    }would be a nice source forge project - unless there is already one out there

    Try this link from Javaranch - I started reading it, but got distracted and did not pursue it very far. It's about JFlex parser and an example of parsing java code is provided or linked to:
    http://www.javaranch.com/journal/2008/04/Journal200804.jsp#a4
    Look for the section titled: "Handling Uncommon File Formats - Introducing Lexers"

  • OpenScript/How to add .jar file to Java Code in relative path

    Hi all,
    I want to add a .jar file which can be executed separately (like "java -jar A.jar") to my recorded Java Code.I've read this wiki http://everest2.us.oracle.com/wiki/Generic_JAR_Project about how to add a .jar file to "Assets", however, I cannot figure out how to use the .jarr file in Java code,I mean , how to get this .jar file like the method the databank added in "Assets"?
    Things I did are as followed:
    1.Execute my .jar file in OpenScript Java code with absolute path like this:
    String cmd = "C:\Users\A.jar";
    Runtime.getRuntime().exec(cmd);
    This does work, but must set a absolute path in Java code like "C:\User\A.jar" ,which is not the workaround I want (I need my scripts can be run on other machines).
    2.Try to get its current path with following codes:
    File directory = new File(".");
    String currentPath=directory.getCanonicalPath();
    However,though this can get its absolute path (which is the the project path) in Eclipse like "C:\Users\Workspace\testProject", this only gets "C:\OracleATS\openScript" in OpenScript.
    I thought to copy my .jar file to the project path , got its current path in java code first,then can know the path of .jar file, but this workaround failed because of the above reason.
    I notice that in the "Assets" there are "Databanks","Object Libraries","JAR Files","Scripts". Since the databanks and scripts that added to "Databanks" and "Scripts" can be got or run in Java Code like:
    *getDatabank("DatabankName").getNextDatabankRecord(); String data = eval("{{db.DatabankName.data}}");*
    *or getScript("ScriptName").run();*
    *Is there a method to get and run the jar file added to "Assets\JAR Files" like the above?*
    Thank you very much!
    Regards,
    Angyoung

    Hi DM,
    Thanks for your reply!
    I've found a workaround,which is calling OpenScript's APIs ,such as this.getScriptPackage().getRepository() and this.getScriptPackage().getWorkspace(),etc to locate the .jar file.
    And this workaround can still work even though the script is run on other machine.
    Sorry to reply you so late!
    Regards,
    Angyoung

  • Need JAVA code to create OIM ITresource-connection values are in a csv file

    Hi,
    Could any one plz help me with the java code used / tested before to create OIM IT resource dynamically, for the reference. IT resource parameter (connection) values in a .csv file, where in I've multiple environments.
    Thanks,
    Ramesh
    Edited by: user13267745 on Aug 19, 2010 12:37 AM

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • Code to connect java to LDAP

    Hi,
    I am in urgency to get code to connect LDAP server on Domino server,just tell me where i can find a simple code to connect LDAP server using java.

    You can use the JNDI API for this
    The tutorial contains the basic code examples for connecting to LDAP using this API:
    http://java.sun.com/products/jndi/1.2/javadoc/
    You'll also need to download the JNDI API from:
    http://java.sun.com/products/jndi/

  • How to compile connection pool sample java code

    I recently bought David Knox's "Effective Oracle Database 10g Security by Design", and have been working through his examples with client identifiers and how to leverage database security with anonymous connection pools.
    The database side of things I totally understand and have set up, but I now want to compile/run the java code examples, but don't know what is required to compile this.
    I'm running Oracle 10.2.0.4 (64-bit) Enterprise Edition on a Linux (RHEL 5) PC. Java version is 1.6.0_20. Relevant .bash_profile environment variables are as follows:
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
    When I try to compile, I get:
    oracle:DB10204$ java FastConnect.java
    Exception in thread "main" java.lang.NoClassDefFoundError: FastConnect/java
    Caused by: java.lang.ClassNotFoundException: FastConnect.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: FastConnect.java. Program will exit.
    The java source code of one of the examples is below. Is someone able to point me in the right direction as to how I get this to compile? Do I just have a syntax and/or environment configuration modification to do, or is there more to it than that to get this example working? Any help much appreciated.
    oracle:DB10204$   cat FastConnect.java
    package OSBD;
    import java.sql.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class FastConnect
      public static void main(String[] args)
        long connectTime=0, connectionStart=0, connectionStop=0;
        long connectTime2=0, connectionStart2=0, connectionStop2=0;
        ConnMgr cm = new ConnMgr();
        // time first connection. This connection initializes pool.
        connectionStart = System.currentTimeMillis();
        Connection conn = cm.getConnection("SCOTT");
        connectionStop = System.currentTimeMillis();
        String query = "select ename, job, sal from person_view";
        try {
          // show security by querying from View
          Statement stmt = conn.createStatement();
          ResultSet rset = stmt.executeQuery(query);
          while (rset.next()) {
            System.out.println("Name:   " + rset.getString(1));
            System.out.println("Job:    " + rset.getString(2));
            System.out.println("Salary: " + rset.getString(3));
          stmt.close();
          rset.close();
          // close the connection which resets the database session
          cm.closeConnection(conn);
          // time subsequent connection as different user
          connectionStart2 = System.currentTimeMillis();
          conn = cm.getConnection("KING");
          connectionStop2 = System.currentTimeMillis();
          // ensure database can distinguish this new user
          stmt = conn.createStatement();
          rset = stmt.executeQuery(query);
          while (rset.next()) {
            System.out.println("Name:   " + rset.getString(1));
            System.out.println("Job:    " + rset.getString(2));
            System.out.println("Salary: " + rset.getString(3));
          stmt.close();
          rset.close();
          cm.closeConnection(conn);
        } catch (Exception e)    { System.out.println(e.toString()); }
        // print timing results
        connectTime = (connectionStop - connectionStart);
        System.out.println("Connection time for Pool: " + connectTime + " ms.");
        connectTime2 = (connectionStop2 - connectionStart2);
        System.out.println("Subsequent connection time: " +
                            connectTime2 + " ms.");
    }Code download is at: http://www.mhprofessional.com/getpage.php?c=oraclepress_downloads.php&cat=4222
    I'm looking at Chapter 6.

    stuartu wrote:
    When I try to compile, I get:
    oracle:DB10204$  java FastConnect.java
    Exception in thread "main" java.lang.NoClassDefFoundError: FastConnect/java
    Caused by: java.lang.ClassNotFoundException: FastConnect.java
    I will try to explain what is happening here.
    You are launching java telling it to run a class named 'java' in a package named 'FastConnect'
    and java says it cannot find that class.
    What you intended to do:
    $ # make the directory structure match the package structure
    $ mkdir OSBD
    $ # move the source file in the directory structure so it matches the package structure
    $ mv FastConnect.java OSBD/
    $ # compile OSBD/FastConnect.java to OSBD/FastConnect.class
    $ javac OSBD/FastConnect.java
    $ # launch java using the OSBD/FastConnect class
    $ java -cp . OSBD.FastConnectNote that the package 'OSBD' does not follow the recommended naming conventions
    you might consider changing that to 'osbd'.

  • OIM should send spmlv2 requests via java code to service provider

    Hi,
    We have the situation in which OIM acts as Requesting authority,Spml provider acts as service provider.
    Oim should send spml requests from custom java code.Spml2Client is used.We are not using genericc technology connector.
    Require sample java code for Search operation.
    I had done for modify request.
    The request and response is as follows
    PSO ID returned after searching: org.openspml.v2.msg.spml.PSOIdentifier@5c32a864
    <deleteRequest xmlns='urn:oasis:names:tc:SPML:2:0' recursive='false'/>
    <deleteResponse xmlns='urn:oasis:names:tc:SPML:2:0' status='success'/>
    <modifyRequest xmlns='urn:oasis:names:tc:SPML:2:0' returnData='identifier'>
    <psoID ID='cn=TPS User8,ou=TPS,dc=fosterstechodc,dc=com'/>
    <modification modificationMode='replace'>
    <data>
    <dsml:modification xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' name='otherHomePhone' operation='replace'>
    <dsml:value>999999</dsml:value>
    </dsml:modification>
    </data>
    </modification>
    <modification modificationMode='delete'>
    <data>
    <dsml:modification xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' name='description' operation='delete'>
    </dsml:modification>
    </data>
    </modification>
    <modification modificationMode='add'>
    <data>
    <dsml:modification xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' name='firstname' operation='add'>
    <dsml:value>Barbara</dsml:value>
    </dsml:modification>
    </data>
    </modification>
    </modifyRequest>
    SpmlClient: sending to http://10.101.151.209/ARServerSPML/SPMLProvider.asmx
    <modifyRequest xmlns='urn:oasis:names:tc:SPML:2:0' returnData='identifier'>
    <psoID ID='cn=TPS User8,ou=TPS,dc=fosterstechodc,dc=com'/>
    <modification modificationMode='replace'>
    <data>
    <dsml:modification xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' name='otherHomePhone' operation='replace'>
    <dsml:value>999999</dsml:value>
    </dsml:modification>
    </data>
    </modification>
    <modification modificationMode='delete'>
    <data>
    <dsml:modification xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' name='description' operation='delete'>
    </dsml:modification>
    </data>
    </modification>
    <modification modificationMode='add'>
    <data>
    <dsml:modification xmlns:dsml='urn:oasis:names:tc:DSML:2:0:core' name='firstname' operation='add'>
    <dsml:value>Barbara</dsml:value>
    </dsml:modification>
    </data>
    </modification>
    </modifyRequest>
    SpmlClient: received
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><modifyResponse status="failure" xmlns="urn:oasis:names:tc:SPML:2:0"><error>malformedRequest</error><errorMessage>At least one &lt;modification&gt; element must be specified.</errorMessage></modifyResponse></soap:Body></soap:Envelope>
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><modifyResponse status="failure" xmlns="urn:oasis:names:tc:SPML:2:0"><error>malformedRequest</error><errorMessage>At least one &lt;modification&gt; element must be specified.</errorMessage></modifyResponse></soap:Body></soap:Envelope>
    org.openspml.v2.util.Spml2ExceptionWithResponse: At least one <modification
    The response says the modifaction tag is not present.
    The code for this request is
    Modification[] modifications =
                   { newModWithDSMLMod("otherHomePhone", "999999", ModificationMode.REPLACE),
                             newModWithDSMLMod("description", null, ModificationMode.DELETE),
                             newModWithDSMLMod("cn", "Barbara", ModificationMode.REPLACE)};
                   modifyResp = customSPMLClient.modifyUser(client,searchPSOId,modifications);
    method:
    public ModifyResponse modifyUser(Spml2Client client,PSOIdentifier psoId,Modification[] modifications) throws Exception {
              client.setTrace(true);
              ReflectiveXMLMarshaller marshaller = new ReflectiveXMLMarshaller();
              ModifyRequest modReq = new ModifyRequest(null, // String requestId,
                        null, // ExecutionMode executionMode,
                        psoId, // PSOIdentifier psoID
                        modifications, // Modification[] modifications
                        ReturnData.IDENTIFIER // ReturnData returnData
              System.out.println(modReq.toXML(marshaller));
              ModifyResponse modResp = (ModifyResponse) client.send(modReq);
              System.out.println(modResp.toXML(marshaller));
              return modResp;
    private static Modification newModWithDSMLMod(String modName, String modValue, ModificationMode modMode)
         throws DSMLProfileException
              /*DSMLModification dsmlMod = null;
              dsmlMod = new DSMLModification(modName, modValue, modMode);
              Extensible data = new Extensible();
              data.addOpenContentElement(dsmlMod);
              Selection component = null;
              return new Modification(component, data, null, modMode);
    Please help me out.
    I need sample java code for search operation tooo.
    regards,
    Sindhu.M

    the sample JAVA codes are provided for sending SPML requests, HTTPClient and one more (i dont remember rite now) within the OIM installation folders itself. It's in the 'SampleHttpClient' folder. Check it once. WSDL, sample XML's and the JAVA codes all are there. You just need to set the classpath and run it.
    - oidm.

Maybe you are looking for

  • How can I cut a section of video, but leave the audio playing?

    iMovie 6 Hi, I want to edit, or remove a small section of video, but leave the audio playing in the background. I want to just put up a picture in the same spot. But, I need the video's audio to keep playing. I videotaped someone speaking, but there

  • WRT54GS question.....DNS Server address?????

    Someone please help,           I had a problem with my wireless not working on my 2nd PC. I originally thought that it was because of that PC being old and possibly having some trojan horses or other virus's that i could not get off. I have since thr

  • Conditionally formatting a graph in ADF

    Hi, We've developped an ADF application in which tasks are assigned to users. Each task has a due date and depending on the proximity of this due date the color of the task changes from green over orange to red. Now, what we are trying to do is showi

  • Weird characters in Ultrabeat

    Sorry if this has been posted elsewhere but I've recently started to get some weird characters when opening an Ultrabeat instrument (see attached screenshots). /Users/neilmorgan/Desktop/Screen shot 2010-12-27 at 16.53.59.png /Users/neilmorgan/Desktop

  • Script UI breaks connection with AI Document?

    Last week I wrote a simple script that interacts with my document and exports layers as images. The script works great, but I thought I'd add a nice UI to it before I release it to the world, so I spent last Saturday making the GUI. Now, I've built m