How to Use SPML?

We are working on a requirement for using SPML in our project and we�ve been able to do simple tasks like Add Delete Search Modify a user using SPML.
Now here is a brief understanding jotted down in points that I�ve about SPML
SPML is an XML- based framework for exchanging user, resource and service provisioning information between organizations
A given requesting authority, or client, sends the provisioning service a set of requests via a well-formed SPML document (an XML document that conforms to the SPML standard).
Based on a pre- defined service execution model, the provisioning service takes the operations specified within the SPML document and executes provisioning actions on a pre- defined set of service targets or resources.
Sun Java Identity Manager comes with a toolkit for OpenSPML which is bundled with the Identity Manager Suite itself.It is basically a collection of Java classes that assist in submitting OASIS SPML 2.0 (SPML2) requests and receiving SPML2 responses.
Now using the OpenSPML.jar(The collection of Java Classes) that is available with Sun Java Identity Manager 6.0 I am able to do the following
Add a User
Delete a User
Modify a User
Search for a User
Etc.
If we consider the following sample code for a add operation it would be as simple as the following.
LighthouseClient client = new LighthouseClient();
client.setUrl("http://localhost:8080/idm/servlet/rpcrouter2");
client.setUser("configurator");
client.setPassword("configurator");
AddRequest req = new AddRequest();
req.setOperationalAttribute("trace", "true");
req.setObjectClass("person");
req.setIdentifier("jkerry");
req.setAttribute("password", "heinz57");
req.setAttribute("gn", "SPML");
req.setAttribute("sn", "Test3");
req.setAttribute("email", "[email protected]");
SpmlResponse res = client.request(req);
Now following are the answers I am looking for.
How do I get access to information about the person I am going to add using SPML?
( In the above case information about jkerry)
Do you guys have some documentation regarding flow you�ve implemented in your previous projects?
How does one handle a scenario when there are batch/multiple requests coming in (say for creation of users)?
Do I need to design in such a fashion that I need to have a Custom XML Parser and get all the information (say creation of users) in a well formed XML Document? Then user the Custom XML Parser to get information from XML document and use the OpenSPML jar API�s to do the provisioning part?
I hope I made myself clear.
Regards,
Vinod Kandukuri

Hi again Vinod ,
You were asking :
1.How do I get access to information about the person I am going to add using SPML?
( In the above case information about jkerry)
2.Do you guys have some documentation regarding flow you�ve implemented in your previous projects?
3.How does one handle a scenario when there are batch/multiple requests coming in (say for creation of users)?1. A solution to access user information might be using a SPML searchRequest :
<%@page contentType="text/html"%>
<%@page import="org.openspml.browser.*"%>
<%@page import="org.openspml.client.*"%>
<%@page import="org.openspml.message.*"%>
<%@page import="org.openspml.message.Filter"%>
<%@page import="org.openspml.server.*"%>
<%@page import="org.openspml.util.*"%>
<%@page import="java.util.List" %>
<%@page import="java.util.Iterator"%>
<html>
<head>
<title>Edit User Result</title>
</head>
<body>
<%
  String userName = request.getParameter("name");
  if (userName != null && userName.length() == 0)
    userName = null;
  String firstName = request.getParameter("firstName");
  if (firstName != null && firstName.length() == 0)
    firstName = null;
  String lastName = request.getParameter("lastName");
  if (lastName != null && lastName.length() == 0)
    lastName = null;
  LighthouseClient client = new LighthouseClient();
  client.setUrl("http://traian:8080/idm/servlet/rpcrouter2");
  client.setUser("configurator");
  client.setPassword("configurator");
  SearchRequest sreq = new SearchRequest();
  System.out.println(" Equals : "+FilterTerm.OP_EQUAL);Hi Vinod ,
System.out.println("AND :"+ FilterTerm.OP_AND);
  Filter f = new Filter();
  FilterTerm ft = new FilterTerm();
  ft.addValue("firstname");
  ft.addOperand(new FilterTerm(FilterTerm.OP_EQUAL));
  ft.addValue(firstName);
  List ops = ft.getOperands();
  for ( int i = 0 ; i < ops.size() ; i ++ ){
       System.out.println("ops :"+ops.get(i).toString());
  System.out.println("Filter initial Thingey :"+ft.getInitialSubstring());
  System.out.println("Filter final Thingey :"+ft.getFinalSubstring());
  System.out.println("Filter match rule Thingey :"+ft.getMatchRule());
  System.out.println("FitlerTerm : "+ft.toString());
  //f.addTerm(ft);
// sreq.setFilter(f);
  sreq.addAttribute("firstname");
    SearchResponse sres = (SearchResponse) client.request(sreq);
  //obtain the result
  List responses = sres.getResults();
  if (responses == null || responses.size() == 0) {
      %>
       Terribly Sorry . No Results Found .
      <%
  else {
       %>
       <table border=1>
            <tr>
            <td>
            User
            </td>
            <td>
            Pass & Stuff
            </td>
            </tr>
       <%
       String name;
         String id;
         SearchResult searchResult;
         Iterator iter = responses.iterator();
         while (iter.hasNext()) {
           searchResult = (SearchResult)iter.next();
           if (searchResult != null) {
            %>
            <tr>
            <td>
            <%= searchResult.getAttributeValue("firstname") %>
            </td>
            <td>
            <%= searchResult.getAttribute("id") %>
            </td>
            </tr>
            <%
%>
</table>The only drawback is that I did not manage to implement Filters . If anyone has any ideas/sugestions or is willing to give it a go please post the information .
Thanks ,
Victor
Edited by: java_gibi on Jan 15, 2008 8:13 AM

Similar Messages

  • How to use SPML Webservice.xml template in VDS(Virtual Directory Server) ?

    Hiii all,
    How to use SPML Webservice.xml template in VDS(Virtual Directory Server) ? In my case , i am researching and wanting to add,search,delete an user object request from Web Services Client to SPML webservice in VDS by SPML request. anybody has documents or tutorials please share to me.
    Thanks

    Hiii all,
    How to use SPML Webservice.xml template in VDS(Virtual Directory Server) ? In my case , i am researching and wanting to add,search,delete an user object request from Web Services Client to SPML webservice in VDS by SPML request. anybody has documents or tutorials please share to me.
    Thanks

  • How to delete group using SPML

    Hi,
    While deleting the group using SPML, we should remove "Access Policies", Users, Membership Rules associated with the group. Can anyone tell me how to do this(de-associating access policies, membership rules and users with group) using SPML??
    Thanks in Advance

    same way you delete a non-group message.

  • How to classify new and old user account from idm system using SPML

    hi all,
    i can use SPML code to create new user on IDM system but, i can't classifying new or old user account
    any advise ? very thank you in advanced.
    athikom.

    Hi Vikram,
    Iam not sure though, did you chekced EXIT_SAPMM06E_022 if it helps you in anyway.
    Regards,
    Swarna Munukoti

  • How to create a user using spml call

    Hello,
    I am trying to create an user in idm using spml call. I have also imported spml.xml into idm. I m using LighthouseClient class to set the user attributes. After authenticating to idm i m sending the request to rpcrouter2 on localhost via client.request(req); But i m getting error
    com.waveset.util.InternalError: Unable to locate view handler for 'user'. Why cant i create a user in IDM from a command line program. Do i need to call this program from a workflow only ? Is it necessary?
    thanks in advance
    ravi

    hi All,
    I am working with Idm7.1 and using SPML to write command-line programe to work with Idm7.1
    getting a guideline from all your post I started with few sample code and got stucked ... Can any of you answer me ....
    Why Can't i do the following in IDM from a command line program using SPML.
    Add a User
    Delete a User
    Modify a User
    Search for a User
    I am using following code to create user:-
    ------ CODE--------
    LighthouseClient client = new LighthouseClient();
    client.setUrl("http://localhost:8080//idm/servlet/rpcrouter2");
    client.setUser("configurator");
    client.setPassword("configurator");
    AddRequest req = new AddRequest();
    req.setOperationalAttribute("trace", "true");
    req.setObjectClass("person");
    req.setIdentifier("user1");
    req.setAttribute("password", "abcd");
    req.setAttribute("gn", "showmen");
    req.setAttribute("sn", "majumdar");
    req.setAttribute("email", "[email protected]");
    SpmlResponse res = client.request(req);
    System.out.println("Response from Server->"+res.getResult());
    System.out.println("Error from server->"+res.getError());
    The output Reflect's as:-
    ------------OUT-PUT--------
    init:
    deps-jar:
    compile-single:
    run-single:
    Response from Server->urn:oasis:names:tc:SPML:1:0#failure
    Error from server->null
    BUILD SUCCESSFUL (total time: 5 seconds)
    ---------------------XXXXX------------------------
    I am currently using Idm7.1 and when i try to Import spml.xml file it throws some Weird Exception
    where as spml2.xml can import without any Exception.
    After all these when i loging to Idm7.1 using login.jsp as -u "configurator" -p "configurator"
    there is no new user created .....
    likewise all the sample code provided is throwing exception's ....
    Can any of you please send me some guideline to figureout these
    Thank's
    Showmen Majumdar
    e-mail: [email protected]
    Wipro Technology
    Bangalore.

  • How to get Admin Roles using SPML in SUN IdM 7.1

    Hi,
    I am tring to get Roles and Admin roles using SPML in IdM 7.1.
    But i am able to get the Roles of the user using the attribute "Role"; For Admin role i tried with the attributes "AdminRole", "adminRole", "AdminRoles", "adminRoles". But I am not able to get the values.
    What is the attribute name where we can fetch the values of admin roles assigned to a user using SPML.
    Please let me know for any queries.
    Thanks and regards,
    Dinesh.

    Hi Dinesh,
    Try using waveset.adminRoles
    Thanks

  • Adding Users in OIM using SPML

    Hi,
    In our project we have a requirement where we have to create a user in OID/OIM. The existing code connects to OIMProvisioning using SPML to search, add and modify users. In SPML we couldn’t find any basedn being set while adding user or searching for user.
    a.     It would be helpful if someone who has knowledge on OID/OIM and SPML to let me know how to query or add users in a specific BaseDN using SPML.
    b.     I would like to know if it is possible to update both OID and OIM using SPML.
    Regards
    Philip

    It may help you:
    http://www.youtube.com/watch?v=7C8cI5zc1DM

  • Using SPML for Identity Management in EJB WebService

    Dear All,
    I have a requirement af using SPML(Service Provisioning Markup Language) for Identity management. Identity management is used to manage the user like deleting a user, modifying, adding a user etc for a application.For that the request for all these functions need to be made using the SPML. The idea is that first the data used to make any request will come from the SAP R3 using an EJB which will retrieve that data by calling a BAPI via JCO and then it is needed to be passed to the entitlement system using the SPML.Thus I have to publish a web service which will get data by calling BAPI and give it to entitlement system using SPML and how can I achieve it?. I have less knowledge about SPML, your guidence will help.
    Thanks & Regards,
    Samir

    There is a document on the SAP Service Market Place that covers the SPML in the UME APIs. This quote is from the [UME documentation|http://help.sap.com/saphelp_nw04s/helpdata/en/5b/5d2706ebc04e4d98036f2e1dcfd47d/frameset.htm]:
    SPML Support
    The UME APIs support access using the Service Provisioning Markup Language (SPML). For more information, see service.sap.com/security > Security in Detail > Secure User Access > Identity Management > SAP Identity Management APIs.
    -Michael
    Edited by: Michael Shea on Jan 17, 2008 9:01 AM

  • How to use one email adress for multiple recipients

    Hello,
    I'd like to know how to use one email adress for multiple recipients. 
    this would be very useful or projects. for example;
    if i send one mail to [email protected], all people in this project get an email.
    I will add the people in this project myself. 
    I know it is possible, but I don't know how to do it ;-)
    please help me! 

    Hope this help.
    _http://technet.microsoft.com/en-us/library/cc164331(v=exchg.65) .aspx

  • Can't figure out how to use home sharing

    Since the latest couple iTunes updates, my family and I can not figure out how to use home sharing. Everyone in our household has their own iTunes, and for a long time we would just share our music through home sharing. But with the updates, so much has changed that we can no longer figure out how to use it.
    I have a lot of purchased albums on another laptop in the house, that im trying to move it all over to my own iTunes, and I have spent a long time searching the internet, and everything. And I just can't figure out how to do it. So.... how does it work now? I would really like to get these albums from my moms iTunes, onto mine. I would hate to have to buy them all over again.
    If anyone is able to help me out here, that would be great! Thanks!

    The problem im having is that after I am in another library through home sharing, I can't figure out how to select an album and import it to my library. They used to have it set up so that you just highlight all of the songs you want, and then all you had to do was click import. Now I don't even see an import button, or anything else like it. So im lost... I don't know if it's something im doing wrong, or if our home sharing system just isn't working properly.
    Thanks for the help.

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • How to use airport time capsule with multiple computers?

    I'm sure there are some thread about this but i couldn't find it... so sorry for that but hear me out! =)
    I bought the AirPort Time Capsule to back up my MBP
    And so i did.
    then i thought "let give this one a fresh start" so i erased all of it with the disk utility and re-installed the MBP from the recovery disk.
    I dont want all of the stuff i backed up just a few files and some pictures so i brought that back.. so far so good.
    Now i want to do a new back up of my MBP so i open time machine settings, pick the drive on the time capsule and then "Choose" i wait for the beck up to begin, and then it fails.  It says (sorry for my bad english, im swedish haha) "the mount /Volume/Data-1/StiflersMBP.sparsebundle is already in use for back up.
    this is what i want:
    i want the "StiflersMBP.sparsebundle" to just be so i can get some stuf when i need them. it's never to be erased.
    i want to make a new back up of my MBP as if it's a second computer...
    so guys and girls, what is the easiest and best solution?
    Best regards!

    TM does not work like that.
    If you want files to use later.. do not use TM.
    Or do not use TM to the same location. Plug a USB drive into the computer and use that as the target for the permanent backup.
    Read some details of how TM works so you understand what it will do.
    http://pondini.org/TM/Works.html
    Use a clone or different software for a permanent backup.
    http://pondini.org/TM/Clones.html
    How to use TC
    http://pondini.org/TM/Time_Capsule.html
    This is helpful.. particularly Q3.
    Why you don't want to use TM.
    Q20 here. http://pondini.org/TM/FAQ.html

  • How to use multiple ipods on one account

    I have an Ipod classic and just bought my sons two nano's how do I use these on the same account without changing my account info?

    Take a look here:
    How to use multiple iPods with one computer
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Discussions page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums, in the User Tips Library and in the Apple Knowledge Base before you post a question.
    Regards.

  • How to use a Table View in AppleScriptObjC

    How can I use a table view and add data to it? And how can I display a button cell and image cell in the table? Thanks.

    Hi all,
    Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
    for ex : select * from (tab_name) where....?
    Can we do inner join on such select statements? If so how?
    Thanks & Regards,
    Mallik.

  • How to use '|' delimited as seprator in GUI_DOWNLOAD ? Plz suggest me ,,

    how to use '|' delimited as seprator in GUI_DOWNLOAD ? Plz suggest me ,,
    i want the output should be seprated by '|' delimited when i download the file.

    Hi,
    We will pass the seperator to the WRITE_FIELD_SEPARATOR parameter as
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = v_file
    write_field_separator = '|'
    TABLES
    data_tab = itab[] . "Our internal talbe filled with data
    Re: Why Function GUI_DOWNLOAD can create XML file but not a flat file?
    Award points if useful
    Thanks,
    Ravee...

Maybe you are looking for

  • Can I upgrade from OS 10.4.11 to Leopard 10.5 on an older iMacG4?

    I was recently gifted an iPad (for my 77th birthday)!. In order to run it, I need OS 10.5 or better. At this point, I cannot afford a new computer, so wonder if I could install OS 10.5 on my iMac G4, 10.4.11, vintage 2004, (the one with the round bas

  • How do I select rows from the same table that have multiple occurances

    Hi Everybody, I am trying to select records from a detail table by grouping it. The table has more than 1 million records and the query is not performing well. The basic question is how to select a distinct record from a table which matches all value

  • 'Add to iPhoto' changed in Yosemite, breaks functionality

    In Mavericks, it was possible to quickly cull from dozens of images by highlighting them all, hitting spacebar for Quick Look, going full-screen while using arrow keys to advance through them, and clicking "Add to iPhoto" to select a handful out of m

  • Drag and drop from mail to address book not happening

    Hi guys, I can no longer drag email addresses from Mail into Address Book. The address just bounces back. I've repaired permissions, installed the latest security update, repaired permissions again, rebooted twice. Any ideas? Mail 4.5. Address Book 5

  • Export Indicator in Intracompany Delivery

    Hi, We are trying to do a local transfer of a material within same company code. The foreign trade data gets into the delivery,-- mode of transport  is coming and this is setting the export indicator in the delivery which is getting copied to the pro