How to access java arraylist from xslt v1?

Hi everybody,
I have a problem using xsl trasformation and an object that contains nested arraylistes.
the object is structured in this way
Request
|---id
|---event
|---ListOfComponent
|------*<List>component*
|---------idComponent
|---------description
|---------*<List>properties*
|-------------name
|-------------value
I'm able to get the values of id and event in this way: Request.id and Request.event;
I'm not able to get the values of the idComponent and the name values of the list subobjects: Request.ListOfComponent.component[0].idComponent;
When I execute the application that call the xsl trasformation i get an exeption not a vector or an array.
So, I would like to know if is possible and if yes how can I do!
thanks!
Edited by: EttoreMI on 10-nov-2011 7.21
Edited by: EttoreMI on 10-nov-2011 7.21

Since I'm using an HP product right now I can only the exeption without stack
Unexpected exception: java.lang.Exception: Cannot create a new transformer instance: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Illegal value: objInput.listOfComponent.component[0].idAppuntamento used for QNAME attribute: name
localhost.localdomain     Nov 10, 2011 9:54:12 AM     TransformXML     Running Errorhandler ID #682. Workflow: 'inserisciAppuntamento', Step: 'TransformXML', com.hp.ov.activator.mwfm.component.WFException: Cannot create a new transformer instance: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Illegal value: objInput.listOfComponent.component[0].idAppuntamento used for QNAME attribute: name
here the xsl trasformation that I wrote
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="JOB_ID" />
<xsl:param name="objInput"/>
<xsl:param name="objInput.requestId"/>
<xsl:param name="objInput.idOdl"/>
<xsl:param name="objInput.evento"/>
<xsl:param name="objInput.azione"/>
<xsl:param name="objInput.listOfComponent.component[0].idAppuntamento"/>
<xsl:template match="/">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:px="http://px_request.hp.com/">
<soapenv:Header>
     <JOB_ID><xsl:value-of select="$JOB_ID"/></JOB_ID>
</soapenv:Header>
<soapenv:Body>
<px:Request>
<requestId><xsl:value-of select="$objInput.requestId"/></requestId>
<idOdl><xsl:value-of select="$objInput.idOdl"/></idOdl>
<evento><xsl:value-of select="$objInput.evento"/></evento>
<azione><xsl:value-of select="$objInput.azione"/></azione>
<listOfComponent>
<component type="Appuntamento">
<pratica><xsl:value-of select="$objInput.listOfComponent.component[0].pratica"/></pratica>
<idAppuntamento><xsl:value-of select="$objInput.listOfComponent.component[0].idAppuntamento"/></idAppuntamento>
          <property>
</property>
<component/>
</component>
</listOfComponent>
</px:Request>
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>
</xsl:stylesheet>
I hope it is helpful in order to understand

Similar Messages

  • How to call Java method from XSLT??

    Hi All,
    Jdev 11.1.1.3.0
    I have a requirement to implement that, I have to call Java method from XSLT. Could anyone please suggest to implement that??
    Thanks,
    Santosh M E

    As pointed by others, you must expose your method as a custom function, registering with JDeveloper (for development time) as well as with SOA Suite (for runtime).
    In the link below you will find a simple step by step example:
    https://blogs.oracle.com/reynolds/entry/building_your_own_path
    Regards,
    Luis F. Heckler

  • How to call java code from xslt.

    I have to do some complex looping in my stylesheets. It is difficult to implement it directly. can i write a javacode for the same and invoke it from my stylesheet? Can anyone help me out with a demo if possible?

    you're the one supposed to provide updates on your progress, not anyone else...

  • (how) can I access Java APIs from web-page-hosted JavaScript?

    Can I access Java APIs from a web-page via JavaScript if I have a JRE installed on the client machine? And if so, how?
    Thanks in advance for your time and consideration.

    John L. wrote:
    Can I access Java APIs from a web-page via JavaScript if I have a JRE installed on the client machine? And if so, how?As far as I can remember that was actually possible in the very first versions of Netscape because Netscape really wanted to pretend Javascript and Java were meant to be used together. But they soon removed that functionality. Can you guess why?
    Because people were using the File/IO classes to easily steal or remove files on the harddrive, among other such niceties. You do NOT want to have such control from a web application. People will abuse it.

  • How to access java method in JSP

    Hi all,
    I need to access java class (abstract portal component) method doContent() in a JSP which is under PORTAL-INF/jsp folder.
    I did
    <%@ page import = "com.mycompany.Aclass" %>
    <%com.mycompany.Aclass a = new com.mycompany.Aclass (); %>
    Aclass is coming as autofill/prepopulated with cntrl+space
    Till this time, it is working. no errors. But when I do
    a.
    a. (a dot) no methods are populating (autofill..cntrl+space) or If I forcebly add method a.doContent(req,res)... at runtime its giving error.
    It's not only with doContent method... Its with any simple methods in that class or any other class.
    (Other than doContent method in the APC java class are prepopulating/autofilling but giving error in runtime)
    Can anyone help me... how to access java method in JSP.
    I already gone through many SDN forum post... and implemented too---but no use I refered below forum thread
    Retrieve values from Java class to JSP
    URGENT! How to call a java class from JSP.
    Calling a java method from jsp file -
    this thread is same as my issue
    Thanks,
    PradeeP

    1st. The classes must be in packages. 2nd, the package that they are in must be under the WEB-INF/classes directory. 3rd Look on google and/or this site for web application deployment

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How to call Java Map in XSLT map

    Hello,
    Can anyone tell me how to call Java Map in XSLT map.
    Thanks and Regards
    Hemant

    Hello, Vijay,
    Can you help in understanding how can we pass whole payload in the parameter in XSLT map.....
    for eg
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:DATEandTIME.Date_Time">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <MT_TARGET>
              <date>
                   <xsl:if test="function-available('javamap:getDateValue')">
                       <xsl:value-of select="javamap:getDateValue($inputparam)"/>                    </xsl:if>
              </date>
              <time>
              <xsl:if test="function-available('javamap:getTimeValue')">
                       <xsl:value-of select="javamap:getTimeValue($inputparam)"/>                       <xsl:value-of select="$test"/>
              </xsl:if>
              </time>
              <project>
                        <xsl:value-of select= "//project"/>
              </project>
         </MT_TARGET>
         </xsl:template>
    </xsl:stylesheet>
    here we are passing static value in parameter.....
    Java code is:
                private static AbstractTrace trace = null;
                public static String getDateValue(Map inputparam)
                        trace = (AbstractTrace)inputparam.get(
                                 StreamTransformationConstants.MAPPING_TRACE );
                        Date now1 = new Date();
                        SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMd");
                        String dateString = formatter.format(now1);
                        return dateString;
                public static String getTimeValue(Map inputparam)
                            trace = (AbstractTrace)inputparam.get(
                                    StreamTransformationConstants.MAPPING_TRACE );
                            Date now1 = new Date();
                            SimpleDateFormat formatter = new SimpleDateFormat ("hhmmss");
                            String dateString1 = formatter.format(now1);
                            return dateString1;
    I want to pass whole payload so how can i pass it.

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • How to call java method from workflow script?

    Hi
    I have a requirement of updating field value 'Document Status' based on review/approve of content from Workflow and hence need to update the version number. For that I need to call my java method from workflow during submit of review/approve condition. Please let me know how to call java method from workflow?
    Is there any alternative better way to achive this requirement from workflow? Please suggest.
    Thanks,
    Sarang

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • How to call Java API from BSP?

    I have a requirement to call Java API from BSP application.
    I have checked the forum and found that it is possible by using some ABAP codes.
    However there is no pointer on how this is done.
    Can someone explain the details on how to call Java API from BSP is done?
    I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
    Actually is there any BSP extention which can used to call Java API?
    Thanks,
    Hendri

    check out these weblogs, it should give you an idea how to go about it.
    /people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
    /people/puru.govind/blog/2006/12/20/let-abap-speak
    Regards
    Raja

  • How to call java implementations from C language

    How to call java implementations from C language....
    I know using JNI java can call C code....is the converse also possible????
    -Rams

    How to call java implementations from C language....
    I know using JNI java can call C code....is the
    converse also possible????Yes.

  • How to invoke java application from ABAP

    How to invoke java application from ABAP  ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
    Thanks,
    Manish

    Hi Manish,
    did you get some further documents concerning "abap program calls ejb"?
    If yes, could you please send me some informations.
    Thank you for your help.
    Kind regards, Patrick.

  • Accessing java objects from within javascript

    Hello,
    Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
    Thanks in advance,
    Antana.

    What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?

Maybe you are looking for

  • Need Help with complex query and computing values

    I have an issue trying to combine data from several tables. I need help trying to compute the "Total Hours", "Max Pressure" ,"Average Pressure" while displaying the "Manufacturer", "Part Type" , "Serial Number", "District", "Status","Truck Type",and

  • MM - Retrieve List of G/L Account

    Dear experts, For PR creation, how to retrieve the list of G/L account and what it based on? Thank you. Regards, Weng Edited by: Weng on Feb 7, 2009 6:45 AM

  • Creating a fillable and editable pdf?

    How do i turn a pages document into a fillable and editable pdf?

  • Animations Won't work

    I made a digital portfolio and it has external flash animations in it. When i view it on my computer (as either a .swf or a mac app) it works just fine. But when I put them on a CD (to give out my portfolio?) the animations will not work. Why is this

  • 'Notes' App won't start.

    My iPhones Notes App won't start. It starts, then closes on its own. Tried restore from iTunes backup - but that didnt help. Any idea please.