Hi,

I have a simple procedure:

create procedure [dbo].[sp_seg_ins_usuario_u]
( @x_login varchar(30),
@x_nome varchar(20),
@x_sobrenome varchar(20),
@x_grupo varchar(30),
@x_entidade varchar(05),
@x_matricula varchar(07),
@x_serverid varchar(40) )
as
begin
-- set nocount on added to prevent extra result sets from
-- interfering with select statements.
set nocount on;
insert into tb_usuario ( login, nome, sobrenome, grupo, entidade,
matricula, serverid ) values
( @x_login, @x_nome, @x_sobrenome, @x_grupo,
@x_entidade, @x_matricula, @x_serverid );
select 0;
end

I have a simple JDBC driver with a Rule in Police Builder:

<actions>
<do-set-local-variable name=\"jdbc-call\" scope=\"policy\">
<arg-node-set>
<token-xml-parse>
<token-text xml:space=\"preserve\">&lt;nds>
&lt;input xmlns:jdbc=\"urn:dirxml:jdbc\">
&lt;jdbc:statement event-id=\"0\">
&lt;jdbc:call-procedure jdbc:name=\"sp_seg_ins_usuario_u\">
&lt;jdbcaram>
&lt;jdbc:value>abc_01&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;jdbcaram>
&lt;jdbc:value>abc_02&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;jdbcaram>
&lt;jdbc:value>abc_03&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;jdbcaram>
&lt;jdbc:value>abc_04&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;jdbcaram>
&lt;jdbc:value>abc_05&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;jdbcaram>
&lt;jdbc:value>abc_06&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;jdbcaram>
&lt;jdbc:value>abc_07&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;/jdbc:call-procedure>
&lt;/jdbc:statement>
&lt;/input>
&lt;output>
&lt;jdbcut-parameters event-id=\"0\" jdbc:number-of-params=\"1\">
&lt;jdbcaram jdbc:name=\"return_value\" jdbcaram-type=\"out\"
jdbcosition=\"1\" jdbc:sql-type=\"java.sql.types.integer\">
&lt;jdbc:value>1&lt;/jdbc:value>
&lt;/jdbcaram>
&lt;/jdbcut-parameters>
&lt;status event-id=\"0\" level=\"success\"/>
&lt;/output>
&lt;/nds></token-text>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name=\"jdbc-result\" scope=\"policy\">
<arg-node-set>
<token-xpath expression=\"cmd:execute($destcommandprocessor,
$jdbc-call)\"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name=\"result\" scope=\"policy\">
<arg-string>
<token-xpath expression=\"$jdbc-result//jdbc:value/text()\"/>
</arg-string>
</do-set-local-variable>
</actions>


I can't get the result from Stored Procedure, see log below:

[...]
begin get metadata for procedure/function 'sp_seg_ins_usuario_u'.
allocated result set sqlserverresultset:360.
begin column.
name: '@return_value'
sql type: java.sql.types.integer
native type: int
parameter type: return value
precision: 10
scale: 0
position: 1
nullable: no
end column.
[...]
stored procedure 'sp_seg_ins_usuario_u' contains an unsupported
parameter type. parameter '@return_value' @ index 1' is not usable.
ignoring.
begin call stored procedure 'sp_seg_ins_usuario_u'.
{call sp_seg_ins_usuario_u(?,?,?,?,?,?,?)}
begin instantiate callable statement.
allocating statement from connection connectionid:214.
allocated statement sqlservercallablestatement:427.
end instantiate callable statement.
begin set in, register out parameter(s).
in @ index 1, param '@x_login', field '$1', length: 6, value =
'abc_01'
in @ index 2, param '@x_nome', field '$2', length: 6, value =
'abc_02'
in @ index 3, param '@x_sobrenome', field '$3', length: 6, value =
'abc_03'
in @ index 4, param '@x_grupo', field '$4', length: 6, value =
'abc_04'
in @ index 5, param '@x_entidade', field '$5', length: 6, value =
'abc_05'
in @ index 6, param '@x_matricula', field '$6', length: 6, value =
'abc_06'
in @ index 7, param '@x_serverid', field '$7', length: 6, value =
'abc_07'
end set in, register out parameter(s).
begin execute procedure.
end execute procedure.
begin get out parameter values.
end get out parameter values.
[...]

The call of SP should be: "{ ? = call
sp_seg_ins_usuario_u(?,?,?,?,?,?,?) }"

What's happened? Can anyone help me?

Ps.: I can't put here whole log because the max char is 1000.


--
alberto_yano
------------------------------------------------------------------------
alberto_yano's Profile: http://forums.novell.com/member.php?userid=81942
View this thread: http://forums.novell.com/showthread.php?t=415587