Loading ...
Sorry, an error occurred while loading the content.

oracle identity manager and SOAP

Expand Messages
  • lemmetink
    Hi Guys, I ve been struggling to understand how the bits and pieces of code in SOAP::Lite and the data in the produced XML output hang together, and am almost
    Message 1 of 3 , May 13 3:38 PM
    • 0 Attachment
      Hi Guys,

      I've been struggling to understand how the bits and pieces of code in
      SOAP::Lite and the data in the produced XML output hang together, and
      am almost at the point of producing the required XML by hand and push
      it out using LWP because I spent so much time on SOAP w/o a reasonable
      result in sight (ugly and kludgy as it may be to do the manual thing).

      I'm trying to produce a header like this:

      <soap-env:Envelope
      xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <soap-env:Header>
      <wsa1:OIMUser
      soap-env:actor="http://schemas.xmlsoap.org/soap/actor/next"
      soap-env:mustUnderstand="0"
      xmlns:wsa1="http://xmlns.oracle.com/OIM/provisioning">
      <wsa1:OIMUserPassword>xelsysadm</wsa1:OIMUserPassword>
      <wsa1:OIMUserId>xelsysadm</wsa1:OIMUserId>
      </wsa1:OIMUser>
      <wsa1:lang
      soap-env:actor="http://schemas.xmlsoap.org/soap/actor/next"
      soap-env:mustUnderstand="0"
      xmlns:wsa1="http://xmlns.oracle.com/OIM/provisioning">
      <wsa1:language>en</wsa1:language>
      <wsa1:sublanguage>US</wsa1:sublanguage>
      </wsa1:lang>
      </soap-env:Header>
      <soap-env:Body>
      <processRequest xmlns="">
      <parameters>
      <addRequest returnData="everything"
      xmlns="urn:oasis:names:tc:SPML:2:0"
      xmlns:dsml="urn:oasis:names:tc:DSML:2:0:core">
      <data>
      <dsml:attr name="objectclass">
      <dsml:value>Users</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.User ID">
      <dsml:value>10abb1</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.Role">
      <dsml:value>E</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.First Name">
      <dsml:value>Anna</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.Disable User">
      <dsml:value>0</dsml:value>
      </dsml:attr>
      <dsml:attr name="USR_UDF_EMPLOYEE_NUMBER">
      <dsml:value>00029368</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.Last Name">
      <dsml:value>Barbers</dsml:value>
      </dsml:attr>
      <dsml:attr name="Organizations.Organization Name">
      <dsml:value>Xellerate Users</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.Xellerate Type">
      <dsml:value>End-User</dsml:value>
      </dsml:attr>
      <dsml:attr name="Users.Password">
      <dsml:value>welcome</dsml:value>
      </dsml:attr>
      <dsml:attr name="USR_UDF_USER_FROM_EDIR">
      <dsml:value>1</dsml:value>
      </dsml:attr>
      </data>
      <operation-data parent-node-1="addResponse">
      <return-to-me class-name="Users" command="add"
      event-id="authtest1#20080427222023#1#1"
      qualified-src-dn="O=IRD\OU=users\OU=people\CN=10abb1"
      src-dn="\IAMSTEST\IRD\users\people\10abb1" src-entry-id="51178"/>
      </operation-data>
      </addRequest>
      </parameters>
      </processRequest>
      </soap-env:Body>
      </soap-env:Envelope>


      My code snippet so far looks like this (version 371 :/)
      my $header = SOAP::Header ->name('OIMUser' =>
      \SOAP::Header->name("wsa1:OIMUserID")->value("xelsysadm")
      );


      And the resulting soap header looks like:
      <SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"



      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"



      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"


      xmlns:xsd="http://www.w3.org/1999/XMLSchema"



      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">


      <SOAP-ENV:Header>


      <OIMUser>


      <wsa1:OIMUserID
      xsi:type="xsd:string">xelsysadm</wsa1:OIMUserID>


      </OIMUser>
      </SOAP-ENV:Header>


      How do I rectify this?



      Cheers,
      Andrej
    • Andrej Ricnik-Bay
      ... Hi Marlin, And thanks for that input. ... I ll work until Monday, in the hopes that one of the Gods that be on the list say Sure, it s easy: you just do
      Message 2 of 3 , May 15 4:03 PM
      • 0 Attachment
        On 16/05/2008, Marlin Mixon <marlin@...> wrote:

        > Andrej
        Hi Marlin,

        And thanks for that input.

        > I had a close look at what you are doing, and my previousl email stands.

        > Here's the rule of thumb: SOAP::Lite works great for Fahrenheit->Celsius
        > conversions. Anything more complicated than that is going to waste your
        > time.

        I'll work until Monday, in the hopes that one of the "Gods that be" on the
        list say "Sure, it's easy: you just do this!"... if that doesn't happen...



        > The approach I've used is to take that nice SOAP envelope you have already
        > created and turn it into a template and store it in a perl variable. Only
        > those fields that you need to
        >
        > change, simply replace the value with an easily searchable key like
        > VALUE="..firstname..". Then in your perl code use a substitution like:
        >
        > $myTemplate =~ s/..firstname../Andrej/;
        >
        > Then push the template out using an LWP Post. See? Very simple and also
        > not as compute-intensive as working with XML even.

        Yes, this is pretty much what I was thinking of. The only potential
        issue is that I may have to store a whole lot of different templates,
        depending on which user attributes may need a change to be
        provisioned, which could easily turn into a maintenance night-mare
        if Oracle later on decide to modify that interface.

        If I could (with reasonable effort) coerce SOAP::Lite to co-operate
        it would be much cleaner in that respect.

        My biggest problem is that I lack usage examples for SOAP::Lite
        that have a comparable level of complexity, and I find the documentation
        a tad terse, to say the least, specially when it comes to the usage
        of more intricate features, like the insert_ns (I still haven't understood
        where that would go, or how to use it - I believe it is what would give
        me the desired "wsa1:" in the header elements). I keep wishing for
        a "map" that shows a full-blown XML code example with all bells
        and whistles, and points at which part of the SOAP::Lite methods
        will produce which element. I'm almost certain that it CAN be done
        using SOAP::Light ... just the HOW completely eludes me.




        > Marlin

        Cheers,
        Andrej

        --
        Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

        http://www.american.edu/econ/notes/htmlmail.htm
      • Andrej Ricnik-Bay
        ... Thanks for the heads-up ... :} I ve been using Net::LDAP quite extensively for the last two years, so should be reasonably fine with references (i hope).
        Message 3 of 3 , May 15 5:22 PM
        • 0 Attachment
          On 16/05/2008, Marlin Mixon <marlin@...> wrote:
          > It sounds like you are on the right track Andrej. The one thing I can say
          > about working with SOAP::Lite is if you use it be prepared to know your Perl
          > references extremely well. You may find Data::Dump helpful if you don't.
          > In my opinion, references are the weakest part of Perl. In other languages
          > (like Java, C#, etc.), it's almost trivial to make a reference to complex
          > structures. In Perl, though, while flexible, it requires a LOT of knowledge
          > and expertise and even then I think it's damned difficult. Then when you
          > start to work with SOAP::Lite, you find that you must really apply whatever
          > references knowledge you have at your disposal (or take time to study even)
          > just to get even trivial things to work.

          Thanks for the heads-up ... :} I've been using Net::LDAP quite extensively
          for the last two years, so should be reasonably fine with references (i hope).



          > Marlin
          Cheers,
          Andrej



          --
          Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

          http://www.american.edu/econ/notes/htmlmail.htm
        Your message has been successfully submitted and would be delivered to recipients shortly.