Where to Place Custom Java Code

We are planning on adding customized Java code to Identity Manager 8; XPRESS will be used to call the customized Java code.
Questions:
1) Where does this customised code reside in the Java Application Server (Glassfish)?
2) Does the customized Java code have to be packaged in a JAR file?
Many thanks for your help.

You would deploy custom Java code along with the IDM war/ear file. Classes go in the WEB-INF/classes/ folder, JARs in WEB-INF/lib/ and that is application server independant.
Class files or JARs? Do you have any build process for your IDM, like the custom build environment CBE, then the source files might end up as class files; if you are using a seperate build environment for those custom classes, then packaging them in a JAR would be the way to go.
Generally speaking, using a JAR for your custom code is neater; whether a class in classes/com/foo/bar/Foo.class or in lib/myfoobars.jar takes precedence over the other is up to the class loader and depending on your application server and its settings, the behavior might vary - so be careful about mixing use of those locations.

Similar Messages

  • [Best practice] How to call a service from custom Java code

    Hi all,
    I'm wondering what the best method is to call a standard service from custom Java code?
    In a specific situation iDoc script is extended with custom functions with a custom component. There's Java code mapping to these functions that is executing these functions. The iDoc script functions are called from a workflow entry script.
    In the Java code that runs when the custom iDoc functions are called, I want to call a standard Content Server service. I don't think that the m_service variable is available, so filling the binder and using m_service.executeService() probably isn't possible.
    Also, if it were possible (that is, if I want to call a standard service from my own custom service Java code), what would then be the best method to do so?
    Regards, Stijn

    Hi Sapan,
    Let me explain a bit further.
    I'm an UCM consultant trying to solve a problem that occured at a client when they installed the CS10gR35CoreUpdateBundle.
    Content items are entered into a Workflow when they are checked in. Part of one of the entry scripts of the a workflow step is that related content to the content item in the workflow is (re)submitted for conversion.
    To achive this, a custom component provides an iDoc script extension. This iDoc function (resubmitForConversion) is implemented in Java (the class extends ScriptExtensionsAdaptor).
    In this Java method, first the related content items are fetched. Then the service RESUBMIT_FOR_CONVERSION should be called for all dID's in of the related content.
    Thus, at a certain point in the custom Java code, a native Content Server service must be called. Of course the class of this Java code does not extend the Service class, so the m_service object isn't available.
    The thing is: before installed the 10gR35CoreUpdateBundle everything worked OK. This code was used to execute the service:
            Workspace workspace = CommonUtils.getSystemWorkspace();
            String cmd = binder.getLocal("IdcService");
            if (cmd == null) throw new DataException("!csIdcServiceMissing");
            ServiceData serviceData = ServiceManager.getFullService(cmd);
            if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
            Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
            UserData fullUserData = CommonUtils.getFullUserData(userName, service);
            service.setUserData(fullUserData);
            binder.m_environment.put("REMOTE_USER", userName);
            ServiceException error = null;
            try {
                service.setSendFlags(true, true);
                service.initDelegatedObjects();
                service.globalSecurityCheck();
                service.preActions();
                service.doActions();
                service.postActions();
                service.updateSubjectInformation(true);
                service.updateTopicInformation(binder);
            } catch (ServiceException e) {
                error = e;
            } finally {
                service.cleanUp(true);
                if (!CommonUtils.isWorkspaceConnectionInTransaction(workspace)) {
                     workspace.releaseConnection();
            }the first problem was that the CS began to complain that a transaction was started within another transaction. So I suspect that the 10gR35 update wrapped a transaction around a workflow script entry.
    With some decompiling I figured out how a service is called from iDoc with the <$executeService()$> command. So I replaced the code above with:
                  String cmd = binder.getLocal("IdcService");
                ServiceData serviceData = ServiceManager.getFullService(cmd);
                if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
                Workspace workspace = CommonUtils.getSystemWorkspace();
                Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
                UserData fullUserData = CommonUtils.getFullUserData(userName, service);
                service.setUserData(fullUserData);
                binder.m_environment.put("REMOTE_USER", userName);
                service.initDelegatedObjects();
                service.executeSafeServiceInNewContext(cmd, true);This solved the transaction problem but introduces another problem: !csUnableToResubmitItem,(null)!csIllegalScriptAccess,RESUBMIT_FOR_CONVERSION
    The Service Reference Guide says that the access level for RESUBMIT_FOR_CONVERION is 33 (Read, Scriptable). However, in shared/config/resources/std_services.htm the access level is specified as 2 (write).
    Thus, my question still is:
    What is the best method to call a standard Content Server service from any Java code (so without extending the Service class, or having the m_service object available)?

  • Where do i write java code

    I am a java beginner. i need to know which interface i can use to write java code

    Hi ,
    u can write java code in many places
      notepad,
      edit plus ,
      eclipse ,
      netbeans ,
      NWDS (in j2ee perspective thisis for sap side )
    all the thing u need to install jdk first ...
    set your class path .
    go to command promt -> type cmd
    ur command prompt opens .
    open note pad write some code
    execute in command promt  by typing javac  abc.java
    i fno errors  type  java abc
    ur code will be executed and result displayed
    regards ,
    venkat p

  • How to execute a custom java code from the process

    Hi All,
    I'm writing a process to generate the PDF and it works fine. Now, at the end or in the middle of the process, i would like to execute/write a java code then it will be invoked when the process running. Assume not using web service, is there another way? samples how to write custom code?
    Thanks,

    The Execute Script service allows you to execute java code on a particular step.
    A more robust solution would be to create a custom component for your custom code.
    Jasmin

  • Where to place my java bean files in iplanet Webserver  6.0

    Hi,
    I have installed SunOne iPlanet webserver 6.0 (Not Application Server). I have written very simple jsp program, that will instance a java bean (not EJB).and say Hello world. I have written test.jsp I have placed under c:\iplanet\servers\docs (root webdirectory). Where do i need to place helloBean.java file in iplanet webserver 6.0. Even i have created WEB-INF\classes & WEB-INF\lib folder under c:\iplanet\servers\docs I have created a .war file, that also put in classpath of iplanet. Finally i am getting here message that, helloBean.not found, when i see the error log file. Do i need to create jar / war file to do this simple program ?
    Please answer me, i am very much interest on this.
    Thank a lot
    Regards
    - Thilip

    Hi,
    Thanks for your immediate reply. Still, i am getting the same problem. I have gone through your instruction.
    i have placed my jsp file in c:/iplanet/servers/docs folder
    i have placed my bean file in c:/iplanet/servers/docs/firstBean folder
    Also mentioned in JVM classpath as like this
    c:/iplanet/servers/docs/firstBean
    But i am getter error msg that firstBean.databaseBean class not found.
    Please suggest me to do any other neccessary step ?
    Please inform me.
    Thanks in advance.
    Regards
    - Thilip

  • Where to place custom packages?

    Hi Forum:
    I am implementing a custom java class in IDM 8 using NetBeans.
    I would like the custom java class to import a 'jar' file.
    Here are the steps I have taken:
    1) I have placed the jar files in the folder: 'custom>WEB-INF>lib'
    2) Added the jar files to 'Java Sources Classpath' and for good measure also to 'Web Sources Classpath'
    However, when I attempt to build the project, I received the error: 'package foobar does not exist'
    Can anyone help me out?
    Thanks.

    Hi:
    I have solved this one.
    The jars do indeed go to 'custom>WEB-INF>lib'.
    Adding the jar file to the 'Java Sources Classpath' is in sufficient; you will also need to add the jar file to the build path;

  • Error while executing a custom java code from report in BI Publisher

    Hi,
    I have created a custom code added the jar in /opt/oracle/BI_Middleware/user_projects/domains/bifoundation_domain/lib and created a rtf template and added a code in that
      <?namespace:bipext=http://www.oracle.com/XSL/Transform/java/com.test.bi.CustomFunctions?>
      <?for-each:listOfNames?>
      <?bipext:helloFunction(name)?>
      <?end for-each?>
    according to the blog
    Vishal's blog: Using custom transformations in BI Publisher 10G
    I am using BI Publisher 11g and weblogic . But I am getting the below error when running the report . Please help . Its urgent.
    getting the below error from the BI Publisher desktop software
    FOProcessor setLocale: en-us
    oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException
        at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1205)
        at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:276)
        at oracle.xdo.template.FOProcessor.createFO(FOProcessor.java:1973)
        at oracle.xdo.template.FOProcessor.generate(FOProcessor.java:1117)
        at RTF2PDF.runRTFto(RTF2PDF.java:659)
        at RTF2PDF.runXDO(RTF2PDF.java:452)
        at RTF2PDF.main(RTF2PDF.java:302)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at oracle.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:917)
        at oracle.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:609)
        at oracle.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:327)
        at oracle.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:187)
        at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1181)
        ... 6 more
    Caused by: oracle.xdo11g.xpath.XPathException: Extension function error: Class not found 'com.test.bi.CustomFunctions'
        at oracle.xdo11g.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:1850)
        at oracle.xdo11g.xslt.XSLStylesheet.execute(XSLStylesheet.java:616)
        at oracle.xdo11g.xslt.XSLStylesheet.execute(XSLStylesheet.java:551)
        at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:341)
        at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:189)
        at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:226)
        at oracle.xdo11g.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:122)
        ... 15 more
    and below error from GUI
    Error 
    The report cannot be rendered because of an error, please contact the administrator.
    Error Detail
    oracle.xdo.XDOException: oracle.xdo.XDOException: XSLT10gR1: Failed Secure Java Extensions check.
    Please help
    Thanks,
    Sahana

    BI Publisher

  • How can i get rulefiles name in  appllication with using custom java code.

    Hi.
    I want to get rulefiles names from analytic service with using java api.
    How can i get rulefiles name. Which api can i use for this issue?

    Hi,
    Use IEssCube.getOlapFileObjects() api to retrieve rule files.
    Insert this code snipid in your code, it will list all the rule files.
    IEssCube cube = olapSvr.getApplication("Sample").getCube("Basic");
    IEssIterator itr = cube.getOlapFileObjects(IEssOlapFileObject.TYPE_RULES);
    IEssBaseObject[] rfs = itr.getAll();
    System.out.println("Rule file count: "+rfs.length);
    for (int i = 0; i < rfs.length; i++) {
         System.out.println("RuleFile"+i+": "+((EssOlapFileObject)rfs).getName());
    you can also list data files and other file objects by changing IEssOlapFileObject.TYPE in getOlapFileObjects()
    Regards
    Rajeev Singh

  • Where to place custom step types in teststand 4.1?

    Hi,
    I have placed custom step types like ieee ssh etc, in the folder c:/documents....../components/user  folder.
    But i  could view them, when i use insert step in sequence editor.
    Please let me know is there any other location for teststand 4.1?
    Thanks in advance.
    Kris. 

    This link shows you the default paths for TestStand 4.1
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Where to put java code - Best Practice

    Hello. I am working with the Jdeveloper 11.2.2. I am trying to figure out the best practice for where to put code. After reviewing http://docs.oracle.com/cd/E26098_01/web.1112/e16182.pdf it seemed like the application module was the preferred spot (although many of the examples in the pdf are in main methods). After coding a while though, I noticed that there were quite a few libraries imported, and wondered whether this would impact performance.
    I reviewed postings on the forum, especially Re: Access service method (client interface) programmatically . This link mentions accessing code from a backing bean -- and the gist of the recommendations seems to be to use the data control to drag it to the JSF, or use the bindings to access code.
    My interest lies in where to put java code in the first place; In the View Object, Entity Object, and Am object, backing bean.....other?
    I can outline several best guesses about where to put code and the pros and cons:
    1. In the application module
    Pros: Centralized location for code makes development and support more simple as there are not multiple access points. Much like a data control centralizes services, the application module can act as a conduit for different pieces of code you have in objects in your model.
    Cons: Everything in one place means the application module becomes bloated. I am not sure how memory works in java -- if the app module has tons of different libraries are they all called when even a simple query re-execute method is called? Memory hog?
    2. Write code in the objects it affects. If you are writing code that accesses a view object, write it in a view object. Then make it visible to the client.
    pros: The code is accessed via fewer conduits (for example, I would expect that if you call the application module from a JSF backing bean, then the application module calls the view object, you have three different pieces of code --
    conts: The code gets spread out, harder to locate etc.
    I would greatly appreciate your thoughts on the matter.
    Regards,
    Stuart
    Edited by: Stuart Fleming on May 20, 2012 5:25 AM
    Edited by: Stuart Fleming on May 20, 2012 5:27 AM

    First point here is when you say "where to put the java code" and you're referring to ADF BC, the point is you put "business logic java code" in the ADF Business Components. It's fine of course to have Java code in the ViewController layer that deals with the UI layer. Just don't put business logic in the UI layer, and don't put UI logic in the model layer. In your 2 examples you seem to be considering the ADF BC layer only, so I'll assume you mean business logic java code only.
    Meanwhile I'm not keen on the term best practice as people follow best practices without thinking, typically best practices come with conditions and people forget to apply them. Luckily you're not doing that here as you've thought through the pros and cons of each (nice work).
    Anyway, back on topic and off my soap box, as for where to put your code, my thoughts:
    1) If you only have 1 or 2 methods put it in the AppModuleImpl
    2) If you have hundreds of methods, or there's a chance #1 above will morph into #2, split the code up between the AppModuleImpl, ViewImpl and ViewRowImpls. Why? Because your AM will become overloaded with hundreds of methods making it unreadable. Instead put the code where it should logically go. Methods that work on a specific VO row go into the associated ViewRowImpl, methods that work across rows in a VO go into the ViewImpl, and methods that work across VOs in the associated AppModuleImpl.
    To be honest which you ever option you choose, one thing I do recommend as a best practice is be consistent and document the standard so your other programmers know.
    Btw there isn't an issue about loading lots of libraries/imports into a class, it has no runtime cost. However if your methods require lots of class variables, then yes this will have a memory cost.
    On a side note if you're interested in more ideas around how to build ADF apps correctly think about joining the "ADF EMG", a free online forum which discusses ADF architecture, best practices (cough), deployment architectures and more.
    Regards,
    CM.

  • Where do you place custom classes to invoke in workflow?

    Hi there,
    I have written a custom java class to add entries to an LDAP and want to invoke it from my workflow. It is packaged up as a jar file. When I try to invoke it from my workflow I get an error saying it cannot find the classes. In the documentation it suggests placing custom files in:
    idm_instance/Web-INF/classes/com/waveset/custom
    The file structure from "classes" onwards didn't exist so I created it. I have also tried putting it in the Idm_Instance/WEB-INF/lib directory and also tried the shared/lib directory of my tomcat server, but I am still getting the error. Is it maybe because it is packaged up as a jar?
    Could someone advise.

    If the custom java code is in a jar file, then keep the jar in idm-instance/WEB-INF/lib directory.
    Make sure, in the invoke statement you use the complete package name.class name
    eg: if your package is com.waveset.customcode and class is TestCode then <invoke class='com.waveset.customcode.TestCode' name='method1'/>
    If it's not a jar file, then put the class in idm-instance/WEB-INF/classes.
    The above eg. would be then idm-instance/WEB-INF/classes/com/waveset/customcode/TestCode.class.

  • Custom Java Steps in IP-IVR 7.0

    We have a customer who is upgrading from version 3.x to 7.x. They have scripts that make extensive use of customised steps, so we have avoided going to 8.x (as advised by Cisco) as there are issues supporting custom Java code under that version.
    I have followed the "new" process of loading the jar files through Document Management, I have also attempted to create an AAR file with the appropriate manifest files (where it appears the only mention of custom steps is now made for this platform) all to no avail. The customised steps do not appear in the editor, nor does it appear that the java steps that used to be available are included at this stage either.
    My question is this: does anyone understand what steps we need to take to convert the current environment to version 7? The documentation supplied by Cisco is very lean on detail (unfortunately common), and we have a tight timeframe to get it done.

    Don't hold your breath for developers to hop on the support forums.
    Set aside the AAR upload stuff for now. Follow the directions for the old CRA SDK; I think that will still fly on UCCX7. The simple version, as I pointed you to above, is found in the README for that sample PhonePush step in the IP Phone SDK. Throw your (recompiled) JAR files in \program files\wfavvid on the server, touch up customeditor.xml and customengine.xml there in the same directory (ought to copy right over from your 3.x system) and see what you get.
    As for future support, I've poked around on a UCCX8 system and all that stuff looks like it's still there, but I haven't tried it. You just don't have a supported way to touch the necessary paths on disk short of adding yourself root access. Do-able, but if you run into problems, TAC is going to be of zero help. You might drop [email protected] a note and ask about the ongoing support situation for custom steps and subsystems.
    If you'd set aside your preferred solution for a minute and tell us more detail about your actual business problem, what data you're trying to convert and how, we might be able to help you build a custom Java class the "new" way. This will accomplish your stated goal of encapsulating the code and calling it with nicely defined entry and exit points, and be more conveniently portable to new UCCX versions.

  • Java Code in a text file

    Hi,
    I need an information if whether anything like this can be done in java or not !!
    The requirement is to place the jave code statements into a text file and dynamically execute these statements which have been placed in the file. for eg: if a text file "test.txt" contains a statement
    System.out.println("Hello world"); without the class being defined or the main method being defined. I need to execute this statement and print out hello world on the console.
    is this possible ???
    I would be using JDK 1.2 or 1.3 for this but certainly not 1.4.x and above
    please do let me know if this problem can be tackled in anyway !!
    Thanks in advance !

    I'd suggest first checking to see if the code in question would also be valid code in an interpreted language like Javascript, Groovy, or BeanShell.
    If it is, then use an interpreter for the appropriate language, an interpreter written in Java and which you can plug into the Java program you're using.
    Otherwise, I suppose you could wrap a class and method around the code, and compile and run that.

  • Rel 12 - How to create a new APPS connection from custom Java/Shell Script

    Hi,
    I am looking to write a custom JAVA code / Shell Script which needs to establish a connection to execute a PL/SQL API on Rel 12 db.
    The challenge is to be able to connect without specifying APPS Password anywhere (just like Oracle Apps does it).
    This Shell script / Java code is not called from within Apps hence I need to establish a brand new connection along the lines of using ....
    WebAppsContext ctx = new WebAppsContext(System.getProperty("JTFDBCFILE"));
    OracleConnection conn = (OracleConnection)ctx.getJDBCConnection();
    like in 11i world or possibly using APPLSYSPUB username
    I need help / direction in how to do this in a Rel 12 env. I understnad there are lot of architecture changes and if someone can provide a generic code snipped it will be great.
    I need to keep this as closely aligned to Rel 12 coding and security standards as possible.
    This code will reside in $XXCUSTOM_TOP/bin file or under XXCUSTOM.oracle.apps.java....... if its Java.
    Pls help.
    Cheers
    -- VK.

    Hi,
    Have you looked at Oracle produced dbc file and its contents? That might help. It is under $FND_TOP/secure. It uses GWYUID=APPLSYSPUB/PUB. I am hoping that the APPS_JDBC_URL would help too.
    Regards,

  • 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

  • Email Notification after Job run

    Hi everybody, I want to setup an email notification at the end of a job run. The job is an update run from our Activate Directory and checks if there are some changes to do. At the end or after this job I would like to send an email to the admin that

  • SWITCHING FORM WINDOWS TO MAC- QUICK QUESTION

    this is probably a stupid question, but do you have to pay a monthly internet fee with Safari? also, the rest of my family have Windows and they share a Wireless internet box that gives everyone throughout the house with internet...can that be used f

  • HTTPS communication

    Hi, I got a requirement where in I need to have HTTPS communication with one of my client. Basically I have to send files and receive files from their server. Can anybody guide me what are the requirements my client should work for to support HTTPS c

  • HT1937 How to unlock iphone 4s when they were working in verizon wireless?

    I have two iPhones 4s that they were working with verizon, a few months ago I changed cellphones and I sent to my brother two iPhones 4s to Bolivia, one was unlocked from verizon but the other one I have never called to unlock, any of them are workin

  • Errorcode 7262

    Hi, Am trying to create an index from the portal and getting the following error mentioned below. Please advice. Index could not be created; creating index failed: cannot send XML request to http://BANGUKRISH:30205/TREXHttpServer/TREXISAPIExt.dll; re