Skip to Content
author's profile photo Former Member
Former Member

Not in class path - XSLT Mapping using Stylus studio

Hello,

I am using Stylus studio for XSLT mapping. I have written a JAVA function and when I tried to execute, I am getting an error " ...... not inclasspath".

I have put JAVA file in the classpath as expained in the Stylus studio help documentation.

Can anyone help me on how to place the Java class file in the proper class path and how that java file has to be called from main XML program.

Regards and Thanks in Advance

Arvind

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 04, 2006 at 11:23 AM

    As far as in knw the process is pretty simple - http://www.stylusstudio.com/docs/v2006R3/d_xslt_xmlxml37.html#wp224691

    But in case it is not working in stylus (it sud) then just zip the xsl file and the .java + .class file together and use in your interface mapping to test the same.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2006 at 12:12 PM

    Hello sabarish,

    I have tried already as explained in the link you have mentioned. But still not working. In fact i was thinking to zip xsl, class and java files together and upload to XI. But I want to ensure whether i have called the java extension properly from XSL file.

    Request you check this:

    -


    Java file

    package com.eds.ehro.ximapping;

    import java.util.Map;

    //import com.sap.aii.mapping.api.AbstractTrace;

    //import com.sap.aii.mapping.api.StreamTransformationConstants;

    import java.util.*;

    import java.text.*;

    public class Concat_Employee_Sydate_Sytime {

    public static String concat(String empno)

    {

    return empno + "-" + System.currentTimeMillis();

    }

    }

    -


    XSL file

    <?xml version='1.0' ?>

    http://www.w3.org/1999/XSL/Transform" xmlns:ns0=" http://www.gemsconsult.com/idoctofile/employee"

    xmlns:javamap="com.eds.ehro.ximapping.Concat_Employee_Sydate_Sytime">

    <xsl:template match="/">

    <ns1:SetEmployeesDemographics_R xmlns:ns1="urn:EmpDemoVi">

    <ns1:demographics0>

    <ns2:address xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">

    <ns2:adressLine>

    <xsl:value-of select="concat(ns0:MT_EMPDETAILS/AddressLine1,ns0:MT_EMPDETAILS/AddressLine2)"/>

    </ns2:adressLine>

    <ns2:countyCode>

    <xsl:value-of select="ns0:MT_EMPDETAILS/Country"/>

    </ns2:countyCode>

    <ns2:postalCode>

    <xsl:value-of select="ns0:MT_EMPDETAILS/Zipcode"/>

    </ns2:postalCode>

    </ns2:address>

    <ns2:clientID xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">200</ns2:clientID>

    <ns2:employeeID xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">

    <xsl:param name="empno">

    <xsl:value-of select="ns0:MT_EMPDETAILS/EmployeeNo"/>

    </xsl:param><! xsl:value-of select="ns0:MT_EMPDETAILS/EmployeeNo"/ >

    <xsl:if test="ns0:MT_EMPDETAILS/EmployeeNo">

    <xsl:value-of select="javamap:concat($empno)"/>

    </xsl:if>

    </ns2:employeeID>

    <ns2:personName xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">

    <ns2:firstName>

    <xsl:value-of select="ns0:MT_EMPDETAILS/FirstName"/>

    </ns2:firstName>

    <ns2:middleName>

    <xsl:value-of select="ns0:MT_EMPDETAILS/LastName"/>

    </ns2:middleName>

    </ns2:personName>

    </ns1:demographics0>

    </ns1:SetEmployeesDemographics_R>

    </xsl:template>

    </xsl:stylesheet>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.