XSLT and Java lookup cache

Hi,
I´m trying the "Easy RFC lookup from XSLT mappings using a Java helper class" article and I getting a weird problem.
The result of the RFC lookup called inside the java class is maintained in a kind of cache and  I always get the same results independent of the parameters I use in the following calls.
Just after calling a Complete Cache Refresh (SXI_CACHE) I got a new result to the lookup.
If I call in the Interface Mapping Test option it runs fine. However, when I call it from my scenario (SOAP Adapter Sender) the first result of the lookup will be returned until a forced cache refresh.
Any ideas?
Thank you,
Fabiano.

Hello Fabiano,
I had the same problem like you had.
The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
Source source = new DOMSource(request.item(0));
So I've created a workaround for this problem.
In the call of the template I've put the request as a parameter object at the template call:
<xsl:with-param name="req">
<rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
  <APPLICATION>Z001</APPLICATION>
  <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
  <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
  <PLANT>FSD0</PLANT>
  <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
  <BOMITEM_DATA/>
</rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
</xsl:with-param>
With this change the request will be provided as a String object and not as a NodeList object.
Afterwards the RfcLookup.java has to be changed to the following:
package com.franke.mappings;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.sap.aii.mapping.lookup.Channel;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.lookup.RfcAccessor;
import com.sap.aii.mapping.lookup.LookupService;
import com.sap.aii.mapping.lookup.XmlPayload;
* @author Thorsten Nordholm Søbirk, AppliCon A/S
* Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
* The class is generic in that it can be used to call any remote-enabled
* function module in R/3. Generation of the XML request document and parsing of
* the XML response is left to the stylesheet, where this can be done in a very
* natural manner.
* TD:
* Changed the class that request is sent as String, because of IndexOutOfBound-exception
* When sending multiple requests in one XSLT mapping.
public class RfcLookup {
     * Execute RFC lookup.
     * @param request RFC request - TD: changed to String
     * @param service name of service
     * @param channelName name of communication channel
     * @param inputParam mapping parameters
     * @return Node containing RFC response
     public static Node execute( String request,
             String service,
             String channelName,
             Map inputParam)
          AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
          Node responseNode = null;
          try {
              // Get channel and accessor
              Channel channel = LookupService.getChannel(service, channelName);
              RfcAccessor accessor = LookupService.getRfcAccessor(channel);
               // Serialise request NodeList - TD: Not needed anymore as request is String
               /*TransformerFactory factory = TransformerFactory.newInstance();
               Transformer transformer = factory.newTransformer();
               Source source = new DOMSource(request.item(0));
               ByteArrayOutputStream baos = new ByteArrayOutputStream();
               StreamResult streamResult = new StreamResult(baos);
               transformer.transform(source, streamResult);*/
                // TD: Add xml header and remove linefeeds for the request string
                request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                // TD: Get byte Array from request String to send afterwards
                byte[] requestBytes = request.getBytes();
               // TD: Not used anymore as request is String
                //byte[] requestBytes = baos.toByteArray();
                trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                // Create input stream representing the function module request message
                InputStream inputStream = new ByteArrayInputStream(requestBytes);
                // Create XmlPayload
                XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                // Execute lookup
                XmlPayload responsePayload = accessor.call(requestPayload);
                InputStream responseStream = responsePayload.getContent();
                TeeInputStream tee = new TeeInputStream(responseStream);
                // Create DOM tree for response
                DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document document = docBuilder.parse(tee);
                trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                responseNode = document.getFirstChild();
          } catch (Throwable t) {
               StringWriter sw = new StringWriter();
               t.printStackTrace(new PrintWriter(sw));
               trace.addWarning(sw.toString());
          return responseNode;
     * Helper class which collects stream input while reading.
     static class TeeInputStream extends InputStream {
           private ByteArrayOutputStream baos;
           private InputStream wrappedInputStream;
           TeeInputStream(InputStream inputStream) {
                baos = new ByteArrayOutputStream();
                wrappedInputStream = inputStream;
           * @return stream content as String
           String getStringContent() {
                return baos.toString();
          /* (non-Javadoc)
          * @see java.io.InputStream#read()
          public int read() throws IOException {
               int r = wrappedInputStream.read();
               baos.write(r);
               return r;
Then you need to compile and upload this class and it should work.
I hope that this helps you.
Best regards
Till

Similar Messages

  • RESOURCE_NOT_FOUND for XSLT and Java Mappings (SXMB_MONI)

    Experts,
    I need your opinion / experience about a problem that we have been facing here:
    XI 3.0 was upgraded to PI 7.0, but since then all interfaces that uses XSLT and Java Mappings throws a RESOURCE_NOT_FOUND error in SXMB_MONI only in the production environment.
    We found SAP Note 951318 that describes exactly the scenario we have here. The note also inform that the issue is solved at SP 07 (for PI 7.0).
    The problem is that we find out that abap and java instance are with different SP ( SP 13 for abap and SP 09 for java) after XI upgrade to 7.0, since they had a error at java instance.
    Have anyone of you facing with this problem?
    I believe that even having a SP greater than 07 (as sap note 951318 requires), as we have an difference between abap and java SP, this issue might have been causing the problem.
    Points will be given.
    Regards,
    Daniela

    Yes, thats true. As you can see,
    In XI 3.0 (SAP Netweaver'04), the issue is solved in:
               SP 18,
               SP 17, patch 1 (archive SAPXITOOL17_1. sca for XI Tools)
               SP 16, patch 4 (archive SAPXITOOL16_4.sca for XI Tools).
    you need to import and put a patch if you are using XI 3.0. but in your case it is PI 7.0.
    So please check out the SAP Note : 950608 and download SP 07,patch 2 (archive SAPXITOOL07_2.sca for XI Tools).and Note 952402 .
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • XSLT and Java Mapping

    Hello friends,
    Can any one know that how to create a XSLT and Java Mapping file(Jar File).
    I am not able to find any of the example so if you create a example or find some where please let me know on that How to create such files...
    Thanks...
    Gaurav Jain

    Hi,
    I am trying to invoke a Java Extension Function from a XSLT. I added both the class file and the XSLT file to a folder, then zipped the entire folder and uploaded into the Archive for my Interface MApping.
    The CLASS gets loaded but the runtime engine gives an error when calling the JAVA Function.
    Here is what it says:
    Creating mapping sequence with 2 steps. --- Creating Java mapping Deliveries/stringHandler --- Creating mapping sequence with 2 steps. --- Creating XSLT mapping Deliveries/test1 --- Using MappingResolver with context URL /sapmnt/XD1/global/xi/mapping/http%3A%2F%2Fwolterskluwer%2Ecom%2Fxi%2F wk_midas_deliveries%2Ftest/cd2e6820267511d9cb52c3c5143c3524/ --- Loaded class Deliveries.stringHandler --- com.sap.aii.ibrun.server.map.MappingRuntimeException: at com.sap.aii.ibrun.server.map.MappingRuntimeException.code_STYLESHEET_OR_CLASS_NOT_FOUND(MappingRuntimeException.java:91) at com.sap.aii.ibrun.server.map.RUMappingJava.instantiate(RUMappingJava.java:168) at com.sap.aii.ibrun.server.map.RUMappingJava.execute(RUMappingJava.java:41) at com.sap.aii.ibrun.server.map.RUSequence.execute(RUSequence.java:50) at com.sap.aii.ibrun.server.map.RURunner.run(RURunner.java:58) at com.sap.aii.ibrun.server.map.RUManager.run(RUManager.java:66) at com.sap.aii.ibrun.sbeans.map.MappingRequestHandler.handleRequest(MappingRequestHandler.java:67) at com.sap.aii.ibrun.sbeans.map.MappingServiceImpl.processFunction(MappingServiceImpl.java:83) at com.sap.aii.ibrun.sbeans.map.XMappingServiceObjectImpl0.processFunction(XMappingServiceObjectImpl0.java:24) at com.sap.aii.ibrun.sbeans.map.MappingServiceKey.processFunction(MappingServiceKey.java:10) at java.lang.reflect.Method.invoke(Native Method) at com.inqmy.services.rfcengine.RFCDefaultRequestHandler.invokeBean(RFCDefaultRequestHandler.java:83) at com.inqmy.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:50) at com.inqmy.services.rfcengine.RFCJCOServer.handleRequest(RFCJCOServer.java:69) at com.sap.mw.jco.JCO$Server.dispatchRequest(Unknown Source) at com.sap.mw.jco.rfc.MiddlewareRFC$Server.nativeListen(Native Method) at com.sap.mw.jco.rfc.MiddlewareRFC$Server.listen(Unknown Source) at com.sap.mw.jco.JCO$Server.listen(Unknown Source) at com.sap.mw.jco.JCO$Server.run(Unknown Source) at java.lang.Thread.run(Thread.java:513) --
    Please tell me what is the problem?
    Thanks for your time
    A

  • Simple XML to Text onversion using XSLT and Java?

    Hi all!
    I'm completly new to using XSLT and Java and are trying to convert a XML file into a ordinary Textfile that I am gonna import into another application.
    I started up writing a ordinary XML parser in Java which interpreted the XML file, but realized later on that it was possible to do with a ordinary XSLT.
    So far it is a 2-step process right now, I've tied my XSLT to the XML file and then just open the XML file up in a ordinary browser and then get the result.
    I found an example (http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=3) where u hook up a XML file and a XSL file separately and the process it, and dump it to Stdout. But do I need to hook up a XSL file like this when the XML file is tied to a XSL file internally?

    Just to give you an example to show you how easy it is: http://www.daniweb.com/forums/thread137587.html

  • Give me description for ABAP and XSLT and JAVA Mapping

    i want detailed description for XSLT AND ABAP,JAVA Mapping and where they require coding and some examples for this items and differences for these mappings and message mapping and some examples which shows difference between these items

    Hi,
    Java mapping:
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    ABAP Mapping:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    XSLT mapping
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    ABAP XSLT mapping
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    Regards
    Vijaya

  • Message Mapping ...  ABAP ,XSLT and JAVA

    HI Friends
    I have a general question ... but it will confuse me a lot ....
    my question is we have four types of message mappings
    1) GUI ( and UDFs)
    2) ABAP
    3)XSLT
    4) JAVA
    when we have plenty of options in GUI (and User defined functions also)  to define sender 2 receiver message mapping
    then what is need of JAVA,ABAP and XSLT Message Mapping and when we use these message mappings( exactly in which situation) and difference b/w them
    Thanks in Advance
    Mahesh

    Green = recommended
    Yellow = Acceptable
    Red = not recommended
    In my experience.
    XSLT mapping: is confotable to convert to another format different to xml(when we do not have a complex logic)
    Java Mapping: is to implement complex logics(but the maintainbilityis not good...you need a external tool)
    ABAP mapping: I think is the best option when the you have the skills on that technology but take account that is not portable neither good for usability.
    Regards
    Ivan

  • Forms10g JAR and Java Plugin Caching problems

    Hello,
    Does anybody know following problem:
    We are deploying the forms java classes in a jar-file
    signed with our own certificate.
    We have a our own second (JavaBeans for forms) and a third jar file signed and deploying it in the right order
    archive = 'f90...jar,f2.jar,f3.jar'
    We are using the Sun Java Plugin 1.4.2 on the Client.
    Everything starts and works correct when it loads
    from the Application server the first time.
    Then the jar-files are in the cache.
    If you restart your Browser the Java Console hangs...
    No error messages in the console
    If we only load the forms jar file starting works
    except the error message in the console:
    Deactivating Caching also helps.
    Any ideas why there are problems with the
    Caching?
    sun.plugin.cache.DownloadException
         at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
         at sun.plugin.cache.FileCache.get(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
         at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
         at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
         at sun.awt.image.ImageFetcher.run(Unknown Source)
    proxyHost=null
    proxyPort=0
    connectMode=HTTPS, native.
    sun.plugin.cache.DownloadException
         at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
         at sun.plugin.cache.FileCache.get(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.util.ResourceBundle.loadBundle(Unknown Source)
         at java.util.ResourceBundle.findBundle(Unknown Source)
         at java.util.ResourceBundle.getBundleImpl(Unknown Source)
         at java.util.ResourceBundle.getBundle(Unknown Source)
         at oracle.forms.registry.MessageManager.getMessage(Unknown Source)
         at oracle.forms.registry.MessageManager.getMessage(Unknown Source)
         at oracle.forms.engine.Runform.createInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Version von Forms-Applet: 9.0.4.0
    sun.plugin.cache.DownloadException
         at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
         at sun.plugin.cache.FileCache.get(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
         at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
         at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
         at sun.awt.image.ImageFetcher.run(Unknown Source)

    Thanks. But It is not solely about LAF. It is just that my form applet is not getting dowloaded as soon as user opens application on browser. It is the whole applet nothing about LAf. But still I would send the email.
    Thanks,
    RK

  • Data and Index lookup Cache

    Hi All,
    We are facing performance issue on executing a task WC_SIL_APInvoiceDistributionFact, this takes 1:20:13mins to complete the load.
    Issue is with the Lookup table W_EMPLOYEE_D that takes around 35mins, so we have increased the data and index cache size of that lookup table. Now the Lookup table W_EMPLOYEE_D takes 7mins and the load duration is around 28mins.
    Calculation for Data and Index Cache
    Count of rows + 16 = Index Cache
    (Count of rows + 16) * 2 = Data Cache.
    Since the Data volume will not be same in all the instances do we need to change the cache size for each instance? And will be any other impact if we add this cache size.
    Can you please help on this to proceed further.
    Thanks ,
    Shalini Peddibhotla

    Hi Shalini,
    In that case: the cache will be filled and used as long as the number of rows sourced from the table fits in the defined size. If it exceeds the max size, it will not store the rows in cache and every mapping using the lookup operator will wait for the query generated by the lookup operator to return the resultset.
    So basically, you will potentially hit the same problem you are trying to solve.
    Regards,
    Marco Siliakus

  • How to modify an XML values using XSLT and Java

    Hi Friends,
    I wish to modify a simple xml to another xml using XSLT, please let me know what are the things i need to know to convert the XML to another XML.
    If somebody can give a sample code, it will be great...
    I wish to do the following sample conversion of XML
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <ROOT>
    <NAME>TEST1</NAME>
    </ROOT>so that the results look like below....
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <ROOT>
    <NAME>TEST2</NAME>
    </ROOT>Notice TEST1 is replaced with TEST2 in the 2nd XML, I wish to get that result...please help.
    Thanks and Regards,
    JG

    Thanks for your nice reply... do you have a sample code...

  • Xml xslt and java

    To obtain a HTML form from a xsd (xml schema) I thought I must use a parser to parse the schema and extract field info (how many fields needed and which type) to create the form to add records to a simple XML DB, like:
    <db>
    <rec id="0">
    </rec>
    </db>
    but someone suggested me to use a XSLT, but I don't figure I can use it... and anyway... I must use xalan to apply that xslt to my xml schema to translate it, right?
    suggestions, tips and so on are really appreciated!
    Thank you in advance!
    Dakkar

    javax.xml.transform:
    javax.xml.transform.stream:
    Source xsltSource = new StreamSource(new File("mytemplate.xslt")); // e.g. from XSLT file
    Transformer t = TransformerFactory.newInstance().newTransformer(xsltSource);
    t.transform(source,result); // where source is your schema doc and result is the target (a stream, a file ...)

  • XSLT with JAVA enhancement

    Hi All,
    I have an XSLT mapping program which has JAVA function in it. How should I import these files  in XI repository. I tried importing zip file together and separately the XSLT and Java JAR files. When I executed the interface mapping, I am getting tons of exceptions. Could anyone please tell me the real way to succeed importing the files in repository.
    Thanks
    Ricky

    Hi Sandro,
    I have zipped the xsl and java files in a zip file together and imported in IR.
    But still its showing plenty of exceptions. Pasting the same here.
    23:48:37 Start of test
    com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method transform. at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:218) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java(Compiled Code)) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java(Inlined Compiled Code)) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java(Compiled Code)) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java(Compiled Code)) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java(Compiled Code)) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java(Compiled Code)) at java.security.AccessController.doPrivileged1(Native Method) at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code)) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java(Compiled Code)) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java(Compiled Code)) Caused by: java.lang.UnsupportedClassVersionError: DateTime (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code)) at java.lang.ClassLoader.defineClass(ClassLoader.java:708) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java(Compiled Code)) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java(Compiled Code)) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java(Compiled Code)) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java(Inlined Compiled Code)) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java(Inlined Compiled Code)) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java(Inlined Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java(Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java(Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java(Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java(Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java(Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java(Compiled Code)) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) ... 11 more  ; nested exception is: java.lang.UnsupportedClassVersionError: GetDATE_Time (Unsupported major.minor version 49.0)
    23:48:38 End of test
    Thanks
    Ricky

  • Question about Java,XSLT and XML

    I am new to Java and XML. I'm not quite clear the relationship between Java,XSLT and XML.
    To exercise, I am going to write a Java program that makes embedded calls to an XSLT processor(XALAN), to produce results for several constrained transformations from a given XML document(x.xml) such as:
    1.Transform the x.xml (which satisfies d1.dtd) in such a way that it now conforms to the DTD d2.dtd. Output the resulting xx.xml document.
    2.query some information from the x.xml and then form an Html output.
    3.summary some information, do some statistics from the x.xml and then form an Html output.
    I don't konw which java classes and XSLT functions might be used.(Actually I don't know how/where to start).
    Can anyone give me some clue ?
    thanks a lot!

    You must provide XSLT stylesheeds to specify transformations (1), (2),
    and (3); let's call those stylesheets task1.xsl and so on.
    The following code will transform x.xml into xx.xml according to task1.xsl. It gives you an idea which packages and classes to use, but it doesn't teach you proper Java programming technics :)
    import java.io.File;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class Test
        public static void main(String[] args) throws Exception
            TransformerFactory factory = TransformerFactory.newInstance();
            Source config = new StreamSource(new File("task1.xsl"));
            Transformer transformer = factory.newTransformer(config);
            Source source = new StreamSource(new File("x.xml"));
            Result result = new StreamResult(new File("xx.xml"));
            transformer.transform(source, result);
    }To read about XSLT, see:
    http://www.w3.org/TR/xslt
    there is a tutorial on using XSLT with Java:
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/index.html.

  • XSLT or JAVA Mapping

    How to choose between XSLT & JAVA Mapping.

    HI
    Usually Java mapping is preferred when the target structure is relatively complex and the transformation cannot be accomplished by simple graphical mapping.
    When to use Java mapping
    1) Java mapping are used when graphical mapping cannot help you.
    Advantages of Java Mapping.
    1)you can use Java APIs and Classes in it.
    2) file look up or a DB lookup is possible
    3) DOM is easier to use with lots of classes to help you create nodes and elements.
    Java mapping can be used when you have complex mapping structures.
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    Java Mapping (Part I)
    https://Difference in using java,xslt,message mapping
    Java Mapping (Part I)
    Java Mapping (Part II)
    Check these for JAVA Mapping
    Java Mapping (Part I)
    Java Mapping (Part II)
    Java Mapping (Part III)
    Testing and debugging
    Testing and Debugging Java Mapping in Developer Studio
    Implermenting JAVA Mapping in PI
    Implementing a Java Mapping in SAP PI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/400ee77e-f9d6-2a10-2b8c-99281a4dcf6b
    XSLT mappings can be imported into the Integration Repository; java methods can be called from within the XSLT style sheet. Advantages of this mapping are: open standard, portable, extensible via Java user-defined functions
    XSLT Mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    xpath functions in xslt mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=xslt+mapping&adv=false&sortby=cm_rnd_rankvalue#
    XSLT MAPPING:
    Generic XSLT Mapping for SAP XI,Part I
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    Generic XSLT Mapping for SAP XI,Part II
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    XSLT: Recursive Templates
    XSLT: Recursive Templates
    Easy RFC lookup from XSLT mappings using a Java helper class
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
    Step u2013 By u2013 Step Simple Approach for XSLT Mapping
    Step – By – Step Simple Approach for XSLT Mapping
    Advantages of using XSLT mapping
    XSLT program itself defines its own target structure.
    XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
    XSLT can be used in combination with graphical mapping.
    Multi-mapping is also possible using xslt.
    XSLT can be used with ABAP and JAVA Extensions.
    Disadvantages of using XSLT mapping
    Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
    XSLT mapping requires more memory than mapping classes generated in Java.
    It all depends upon the required Scenario and the requirement , which mapping has to be used.
    cheers

  • Value Mappings and Mapping lookups?

    Hi Experts,
    I've came across a thread on SDN which is mention below.
    value mapping
    can anyone explain me what is value mapping and fix mappings and why we need them and wht is mapping lookups?
    plz refer some weblogs which can explains in detail about  value mappings, fixed mappings and mapping lookups?
    pts will b rewarded
    thanks
    Faisal

    Hi,
    Hope this information is useful to you..
    Value Mapping Blogs.
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    Mapping look up API
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/mapping%20lookups:%20RFC%20API.pdf
    what is lookups
    Lookups are used to identify / request the data from mapping , i mean interupting the process and looking for data which was stored in some where and get that data and comback to process and continue with that data.
    why we can use for lookups.
    We will use these type of lookups in Message mapping for refering DB Lookup for data base which is not SAP, RFC lookups for SAP data
    Look up tables
    In the error handling topic we have seen the different validations which need to be performed on file.
    This can be done through Lookup.
    Some use cases:
    • Look up employee information.
    • Lookup for raising an alert.
    The purpose of the lookup may be:
    • To perform application-level validation of the data, before sending it to the backend.
    • To populate fields of the XML document with some additional data found in the backend application.
    There are two ways in which we can do lookup:
    • Call lookup method from GUI mapping.
    • Call lookup method from XSLT mapping.
    Some useful blogs...
    /people/shabarish.vijayakumar/blog/2006/02/13/unable-to-open-iresrid-xipipi-71-updated-for-pi-71-support
    Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
    Lookup’s in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    /people/sravya.talanki2/blog
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    Thanks,
    Satya..
    Reward points if it is useful..

  • Urgent :::::.i WISH TO DO THIS WITH JDOM and JAVA .

    file A.XML
    <XML>
    <TP>
    <FF>
    </FF>
    </TP>
    </XML>
    file B.XML
    <XML>
    <TP>
    <GG>
    </GG>
    </TP>
    </XML>
    I WANT TO PASTE node GG in b.xml to a.xml like this
    <XML>
    <TP>
    <FF>
    <GG>
    </GG>
    </FF>
    </TP>
    </XML>
    i WISH TO DO THIS WITH JDOM and JAVA .
    Please let me know how to do this ....
    i dont want to use XSL OR XSLT ...
    i am free for discussions...pls help me
    ciao

    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • One .mac and two Gmails = mess (10.5)

    I had my Tiger mail set up with a .mac IMAP account and two Gmail POP accounts. After upgrading (archive & install) it all seemed OK but I couldn't delete anything from either Gmail account; I'd get an error saying it couldn't be moved to mailbox wha

  • How to change remote_login_passwordfile from exclusive to NONE?

    Hi all, I used dbca to create a database in linux server. then created an ops$oracle user using the below SQL: create user ops$oracle identified by externally; grant dba to ops$oracle; How can i change this parameter to NONE? Thanks

  • Error: ATTRIBUTE_IDOC_RUNTIME FM NLS_GET_LANGU_CP_TAB: Could not determine

    Hi All Production issue Scenario is: File to IDOC From 2 days our R3 production server was down. Before R3 went down i didn't stop my Sender File Communication Channels and XI was continuously accepting files to process it and then trying to post it

  • Runtime errors in a Worker

    How does one capture runtime errors in a worker? I am using Flash Pro and following the simple documentation example, which works okay (other than AIR problems I posted in the AIR forum), but when there is a runtime error in the Worker.swf I've notic

  • Adobe Updates Crashing my computer

    I have a brand new computer with Windows 7, It has 'frozen" at least a half a dozen times!!! The screen freezes, I get a spinning ring and can't do nothing, when I try ctrl+F4 or F2 the desktop and open windows turn milky white. This problem ALWAYS h