Hello everyone,

I post this here as I am stuck on my project. Thanks in advance for your
help.

What I have to do is to call a Oracle stored procedure in order to
create a new user in the database.
I am very new with NIM and I encounter few problems.

I used the 'tutorial from geoffc' (http://tinyurl.com/6g4ssr) (thanks to
him !) to do what I've done from now.

My stored procedure is called *IAM_NEW_USER* and requires three *IN
variables* and one *OUT* :
- *UserID *(obtained from the Operation attribute)
- *Password *(obtained from the Operation attribute)
- *company *(obtained from a local attribute previously defined, with a
driver-scope)

Here is my code. First my conditions :

Code:
--------------------
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="case" op="equal">add</if-operation>
<if-op-attr name="uniqueID" op="available"/>
<if-op-attr name="nspmDistributionPassword" op="available"/>
<if-local-variable name="lvCompany" op="available"/>
</and>
</conditions>
--------------------


And then, my actions :

Code:
--------------------
<actions>
<do-set-local-variable name="JDBC-CALL" scope="policy">
<arg-node-set>
<token-xml-parse>
<token-global-variable name="CALL-STORED-PROC"/>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="JDBC-RESULT">
<arg-node-set>
<token-xpath expression="command:execute($destCommandProcessor, $JDBC-CALL)"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="primary-key" scope="policy">
<arg-string>
<token-xpath expression="$JDBC-RESULT//jdbc:value/text()"/>
</arg-string>
</do-set-local-variable>
<jdbc:statement>
<jdbc:call-procedure jdbc:name="IAM_NEW_USER">
<!-- PROCEDURE IAM_NEW_USER (V_MATRICULE IN VARCHAR2, V_PASSWORD IN VARCHAR2, V_SOCIETE IN VARCHAR2, N_CODE_RETOUR OUT NUMBER); -->
<jdbcaram>
<!-- V_MATRICULE -->
<jdbc:value>0</jdbc:value> <!-- need to get Operation attribute-->
<!-- V_PASSWORD -->
<jdbc:value>0</jdbc:value> <!-- need to get Operation attribute-->
<!-- V_SOCIETE -->
<jdbc:value>$lvCompany$</jdbc:value>
<!-- N_CODE_RETOUR -->
<jdbcaram/>
</jdbcaram>
</jdbc:call-procedure>
</jdbc:statement>
<do-set-local-variable name="JDBC-RESULT">
<arg-node-set>
<token-xpath expression="command:execute($destCommandProcessor, $JDBC-CALL)"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="primary-key" scope="policy">
<arg-string>
<token-xpath expression="$JDBC-RESULT//jdbc:value/text()"/>
</arg-string>
</do-set-local-variable>
</actions>
--------------------


I have to admit that I did not made much changes from the exemples in
the tuto as I am quite lost with all of that !

Here are my questions :
- Shall I wrap the -<jdbcaram>- with a -<jdbcarams>- ?
- How to use my Operation attribute within my XML sources (*userId *and
*pwd*)
- Shall I use the -<password>- tag to wrap my *pwd *?
- And finally, what is missing / incorrect in order for my code to work
?

I am using *Designer 4.0.2.* My Oracle db is in *11g*.

Here is the list of the package from my connector :
'[image: http://img4.hostingpics.net/thumbs/m...21Capture.png]'
(http://img4.hostingpics.net/pics/174921Capture.png)

Huge thanks in advance to anyone who try to help !

Best regards,
Arnaud


--
francoisarnaud
------------------------------------------------------------------------
francoisarnaud's Profile: https://forums.netiq.com/member.php?userid=6144
View this thread: https://forums.netiq.com/showthread.php?t=49120