cancel
Showing results for 
Search instead for 
Did you mean: 

XSTL-JAVA error Illegal number of arguments or types of arguments in a call

Former Member
0 Kudos

Hi All,

I get this error when invoking my Java function from XSLT.I am passing Strings with global param defined like this .

<xsl:param name="inputparam"/>

<xsl:param name="gid" select="//GENERAL_ID"/>

<xsl:param name="vtype" select="//VESSEL"/>

<xsl:template match="/">

<xsl:call-template name="setfilename">

</xsl:call-template>

</xsl:template>

<xsl:template name="setfilename">

<xsl:variable name="response"

select ="javamap:SetTargetFile( $gid , $vtype , 'bol' , $inputparam)"/>

</xsl:template>

java

public static String SetTargetFile (String id ,String type, String ext,Map InputParam){}

Any idea what is going wrong.

Thanks in advance,

Regards,

Bikram

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

From that what I see I would say that everything is fine.

Recompile the Java code and reassign the XSLT and the Java to the object 'Imported Archives', reassign this to the mapping and sava and activate everything.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Type casting $gid and $vtype to string solved my problem.

select ="javamap:SetTargetFile( string($gid) , string($vtype) , 'bol' , $inputparam)".

Thanks for your reply anyway.

Regards,

Bikram

stefan_grube
Active Contributor
0 Kudos

I don't think that you really need to cast the parameters to String as in my tests I never do this.

But I am glad, that your issue is solved now.

Regards

Stefan