Using Java XML 1.5 toolkit instead of sapxmltoolkit for xslt mappings

Hi All
   We have a case whereby our xlst requires a number of customised java class functions as we are porting webmethods systems across to PI.
eg in the xslt adding
<xsl:when test="function-available('java:concat">
    <xsl:value-of select="java:concat($first, $last, $inputparam)"/>
We are running sap PI 7.1 ehp1. I have been referring to a number of posts on how to complete these tasks.
namely we have implemented the example as provided in:
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/73/f61eea1741453eb8f794e150067930/frameset.htm
This only works if "Sap XML Toolkit" is enabled in the operational mapping.
Left unticked (default setting in the mapping) whenever a testcase is run I end up with the error "could not compile sytle sheet".
I would like to use the Java 1.5 xml processing capability as it is supposed to perform better than the sapxmltoolkit option and support for the latter will be discontinued in future.
Has anyone been able run the case with sapxmltoolkit enabled?
If so did you add any other libraries for java xml 1.5?
thanks

Thanks, I would have thought as much, but theres no guide on the deployment.
For now i assume this will fit into the java/ext area and Pi would need a reboot after the libraries are copied.
Has anyone deployed the additional libraries to PI.

Similar Messages

  • Which Book is good for e-commerce using JAVA & XML

    I want to find a Book that is good for e-commerce using JAVA & XML,
    or where can find JAVA & XML new and develop?
    can you suggest me?
    Thanks very much!

    I can recommend "Java and XML" from O'Reilly. It's a very good book.

  • Problems using java.xml.xpath - How to get values from DTMNodeList?

    Sorry for the waffle in the subject title, but I was unsure what to call it. I hope this thread is in the correct forum.
    I'm having problems using xpath to parse some data from an XML file. I am able to create an expression which obtains the elements I wish to retreive, but I'm unsure on how to go about getting their values. So far I have..
    public int getTerms(int PMID)
              String uri = "http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id="
                           + PMID + "&retmode=xml";
              // Create an XPath object with the XPathFactory class
              XPathFactory factory = XPathFactory.newInstance();
              XPath xPath = factory.newXPath();
              // Define an InputSource for the XML article
              InputSource inputSource = new InputSource(uri);
              // Create the expression
              String expression = "/PubmedArticleSet/PubmedArticle/MedlineCitation/MeshHeadingList/MeshHeading/DescriptorName";
              // Use this expression to obtain a NodeSet of all the MeSH Headings for the article
              try
                   DTMNodeList nodes = (DTMNodeList) xPath.evaluate(expression,
                         inputSource, XPathConstants.NODESET);
                   int length = nodes.getLength();
                   String[] terms = new String[length];
                   // Test mesh terms are being stored.
                    *for (int i=0; i<length; i++)*
    *                    System.out.println(i + ": " + nodes.item(i).getNodeValue());*
                                                    return nodes.getLength();
              catch (XPathExpressionException e2)
              { System.out.println("Article with PMID " + PMID + " has no associated MeSH terms");}
              // return a default
              return 0;
         } The part in bold is the problematic code. I wish to retreive the values of each of the nodes I have taken into my DTMNodeList using a for loop to iterate through each node, and use the getNodeValue() method from the Node class which should return a string. However, the values I retreive are NULL. In the test document I use, the elements do have values.
    Here is a snippet of the XML file I am reading in:
    <MeshHeadingList>
      <MeshHeading>
      <DescriptorName MajorTopicYN="N">Binding Sites</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Chromatium</DescriptorName>
      <QualifierName MajorTopicYN="Y">enzymology</QualifierName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="Y">Cytochrome c Group</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Electron Spin Resonance Spectroscopy</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Flavins</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Heme</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Hydrogen-Ion Concentration</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Iron</DescriptorName>
      <QualifierName MajorTopicYN="N">analysis</QualifierName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Magnetics</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Oxidation-Reduction</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Protein Binding</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Protein Conformation</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Temperature</DescriptorName>
      </MeshHeading>
      </MeshHeadingList>Any help would be appreciated.. thanks :-)

    Answered my own question....
    The element value is actually the child of the node I am current at, so instead of doing:
    i + ": " + nodes.item(i).getNodeValue()); I should have really done:
    i + ": " + nodes.item(i).getChildNode().getNodeValue());

  • How to install and use Java v1.6 in addition of v1.5 for SoaSuite?

    As far as I know the highest Java version with which SoaSuite is running is v1.5 (resp.5).
    Assume I want to (have to) use version v1.6 (for other programs on my computer):
    How can I install and use v1.6 as second Java installation ?
    If I simply install v1.6 then Oracle SoaSuite refuses to run.
    So I have to tell SoaSuite to use an older version on my hard disc.
    How can I do this?
    Is there a single point of reference for the SoaSuite which java location location to use?
    What about the environment variables JAVA_HOME and PATH?
    Or is there an entry in the Application Server settings or any batch script which must be adjusted?
    Peter

    SOA Suite is certified for Java 6.
    Look at metalink note 444462.1 which gives instructions on how to achieve this. You will need to upgrade to 10.1.3.4 though.
    Its fairly straight forward, as SOA Suite uses the JDK from the ORACLE_HOME. This can be changed by editing the opmn.xml file found in SOA_HOME/opmn/config
    Backup the original JDK in the Oracle Home and copy over the new Java 6 into the ORACLE_HOME:
    Example:
    $ cd $ORACLE_HOME
    $ mv jdk jdk.orig
    $ cp –rp <directorypath_to_java6> jdk
    Verify that the new JDK is working by executing:
    $ORACLE_HOME/jdk/bin/java -version
    cheers
    James

  • How to convert from xml file to html using java code

    How to convert from xml file to html file using java code

    Get yourself Apache Xalan or Saxon or some XSLT processor
    String styleSheet = "/YourXSLTStylesheet.xsl";
    String dataSource = "/YourXMLDocument.xml";
    InputStream stylesheetSource = TransformMe.class.getResourceAsStream(styleSheet);
    InputStream dataSourceStream = TransformMe.class.getResourceAsStream(dataSource);
    OutputStream transformedOut = new FileOutputStream("filename.html");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheetSource));
    transformer.transform(new StreamSource(dataSourceStream), new StreamResult(transformedOut));You'll also need to learn XSLT if you don't already know that. Here's a good place to start
    http://www.w3schools.com/xsl/

  • N:1 Mapping Possible using Java Mapping?

    All,
    Is it possible to do a N:1 mapping using Java Mapping?
    If yes , how?
    Reason for this question is that the execute() of the Java Mapping is going to take the source / request message as the InputStream . In the case of N:1 mapping , as we have multiple messages , how will they be send to the InputStream? Will both the messages be sent combined into the InputStream? Will the MESSAGES tag be embedded into the input stream?
    Regards,
    Bhavesh

    Hi @ll;
    i try the same.
    to conduct a java mapping with 2 input structures that fills one target structure.
    This mapping is part of a Integrationprocess.
    I tested the mapping at the Integration Repository (Interface mapping) with the structure given by henrique and it works fine without any error.
    At runtime this structure looks like this (different prefix)
    <?xml version="1.0" encoding="UTF-8"?>
    <sxi:Messages xmlns:sxi="http://sap.com/xi/XI/SplitAndMerge">
         <sxi:Message1>
              <YOURXML1>...</YOURXML1>
         </sxi:Message1>
         <sxi:Message2>
              <YOURXML2>...</YOURXML2>
         </sxi:Message2>
    </sxi:Messages>
    As I put it in the Integrationprocess unfortunately a strange error arises.
    The trace Workflow-Protocoll shows following error.
    <Trace level="2" type="T">Call method execute of the application Java mapping com.endress.infoserve.xi.mapping.MergeConfigStore_IdocOrder </Trace>
    <Trace level="2" type="T">Java mapping com/endress/infoserve/xi/mapping/MergeConfigStore_IdocOrder completed. (executeStep() of com.endress.infoserve.xi.mapping.MergeConfigStore_IdocOrder </Trace>
    <Trace level="1" type="T">Parsing error after multi mapping.Expected Message<i> instead of IDOC </Trace>
    I can't make head nor tail of it.
    what´s the mistake?
    can anybody please help me?
    Thanks in advance
    Kind regards

  • Learning Path: Java & XML

    Right now I'm learning my way through Java as a novice to programming aside from a little bit of script language knowledge. I want to start developing Web Services using Java, XML/SOAP. Being a beginner should I wait until I have a strong foundation in Java or can XML/SOAP be learned concurrently to Java?
    As for specific Java technologies is ther ea specific path that should be followed? I'd like to learn JavaBeans and JSP, should one be studied before the other?

    One doesn't really build on the other, so there's no required path to follow. Since XML is as OO as a scripting language gets, there's no reason you can't learn it along with Java; but using XML doesn't require a strong programming background.
    As for JavaBeans and JSPs, again they're totally separate and one doesn't require the other. If you're doing a lot of GUI building and writing code you plan to reuse, learn about JavaBeans soon. On the other hand, if you're main goal is web development, you'll want to pick up Servlets and JSPs sooner.

  • Java XML Digital Signature API, how to sign different files

    Hello,
    I need to sign several files: binary and/or xml (in some cases just part of xml), and to implement digitla signatures in xAdes standard. So I'm looking to use Java XML Digital signature API, but can't find any examples, that would cover issues I encountered:
    How to sign binary file?
    Just to sign some simple "aaa.png" file and have it's signature in XML. How in right way to create referece?
    (should it be something like: Reference ref = fac.newReference("aaa.png", fac.newDigestMethod(DigestMethod.SHA1, null), null, null, null); )
    And how to pass file for signing? what to add/change to this code:
    Document doc = dbf.newDocumentBuilder().parse(new FileInputStream("aaa.png"));
    DOMSignContext dsc = new DOMSignContext(keyEntry.getPrivateKey(), doc.getDocumentElement());
    (I have only found some information about needing to "dereference" or so - but no examples, how to make things work.)
    How to sing several different files?
    As I wrote before, several files needs to be signed, but in all examples, it's only one Document object (and only one file), how/where to add more files and if API will be capable to deal with such thing?
    In one of examples what I have to achive was such code:
    <Reference URI="aaa.png" xmlns="http://www.w3.org/2000/09/xmldsig#">
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
    <DigestValue>8rl/xzjAnE4yQQ2LTBvFTU2JH+c=</DigestValue>
    </Reference>
    If I do write code like: "fac.newReference("aaa.png", <...> );
    I'll get an error during signing: signature.sign(dsc);
    *"java.net.MalformedURLException: no protocol: aaa.png"*
    How to avoid this?
    Also, from exmaple (what to reach) above:
    <Reference URI="aaa.png" xmlns="http://www.w3.org/2000/09/xmldsig#">
    There is additional attribute "xmlns=<...>" - the question is if it is possible to add it by XMLSignatureFactory.newReference ?
    Java API adds a lot of prefixes "ds:" , like:
    <...>
    <ds:Reference URI="file:/D:/try5/SignableMetadata0.xml">
    <ds:Transforms>
    <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
    </ds:Transforms>
    <...>
    Is it possible to avoid them?
    Any help on any of these questions would be very appreciated

    Hi,
    I would like to sign a specific part of a xml message [Only the contents under the <Buyer> tag]. I have also pasted the code which i used to do this. I am getting an output xml after the xml is signed, but when I validate the xml , the xml is valid even after I change the xml contents. Could you pls tell me what I am doing wrong here. I want to know whether the xpath implementation which I have done is correct.
    <?xml version="1.0" encoding="UTF-8"?>
    <PurchaseOrder>
    <Item number="130046593231">
    <Description>Video Game</Description>
    <Price>10.29</Price>
    </Item>
    *<Buyer id="8492340">*
    *<Name>My Name</Name>*
    *<Address>*
    *<Street>One Network Drive</Street>*
    *<Town>Burlington</Town>*
    *<State>MA</State>*
    *<Country>United States</Country>*
    *<PostalCode>01803</PostalCode>*
    *</Address>*
    *</Buyer>*</PurchaseOrder>
    // The code which i have used to perform the xpath transformation.
              XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
         XPathFilterParameterSpec xpathFilter = new XPathFilterParameterSpec("PurchaseOrder/Buyer");
              javax.xml.crypto.dsig.Reference ref = fac.newReference
              ("", fac.newDigestMethod(DigestMethod.SHA1, null),
              Collections.singletonList
              (fac.newTransform
              (Transform.XPATH, xpathFilter)),
              null, null);
              SignedInfo si = fac.newSignedInfo
              (fac.newCanonicalizationMethod
              (CanonicalizationMethod.INCLUSIVE,
              (C14NMethodParameterSpec) null),
              fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null),
    Collections.singletonList(ref));
    // Load the KeyStore and get the signing key and certificate.
         KeyStore ks = KeyStore.getInstance("JKS");
         char[] password = "changeme".toCharArray();
         ks.load(new FileInputStream("c:\\KeyStore"), password);
         KeyStore.PrivateKeyEntry keyEntry =
         (KeyStore.PrivateKeyEntry) ks.getEntry
         ("EISKeys", new KeyStore.PasswordProtection(password));
         X509Certificate cert = (X509Certificate) keyEntry.getCertificate();
         // System.out.println("X509Certificate:"+cert);
         // Create the KeyInfo containing the X509Data.
         KeyInfoFactory kif = fac.getKeyInfoFactory();
         List x509Content = new ArrayList();
         x509Content.add(cert.getSubjectX500Principal().getName());
         x509Content.add(cert);
         X509Data xd = kif.newX509Data(x509Content);
         KeyInfo ki = kif.newKeyInfo(Collections.singletonList(xd));
         // Instantiate the document to be signed.
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         dbf.setNamespaceAware(true);
         Document doc = dbf.newDocumentBuilder().parse
         (new FileInputStream("C:\\Life2012\\DigSign\\ACORD_Request.xml"));
         NodeList rootChildList = doc.getDocumentElement().getChildNodes();
         Node bodyNode = null;
         for(int i=0;i<rootChildList.getLength();i++){
              if("Buyer".equalsIgnoreCase(rootChildList.item(i).getLocalName())){
                   bodyNode = rootChildList.item(i);
                   System.out.println("Body Node is obtained"+bodyNode);
                   break;
         // Create a DOMSignContext and specify the RSA PrivateKey and
         // location of the resulting XMLSignature's parent element.
         //DOMSignContext dsc = new DOMSignContext
         // (keyEntry.getPrivateKey(), doc.getDocumentElement());
              // Sign only the body node
         DOMSignContext dsc = new DOMSignContext
         (keyEntry.getPrivateKey(), bodyNode);
         // Create the XMLSignature, but don't sign it yet.
         XMLSignature signature = fac.newXMLSignature(si, ki);
         // Marshal, generate, and sign the enveloped signature.
         signature.sign(dsc);

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • How to use java integrate with ondemand

    Hi All,
    As i'm new to integration, can anyone help me to use java integrate with ondemand that inserts some records in ondemand and deletes some records from ondemand in secheduled interval basis.?
    Thanks in advance..!
    regards
    sowm

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • Print different format files using java API

    Hi All,
    I need to print documents ( MS-DOC, PDF, Plain Text ) using Java API. I do not need window for configuring number of pages to be print etc etc.. Whatever the file specified should be printed.
    I checked with printerJob.print(); from java API and able to print simple text. I need to approach same for files of different formats.
    Any other API's ? How do i approach?
    Any help will be appreciated.
    Thanks,
    Praveen

    Which of the LiveCycle products are you looking at? (there is no Java API to Acrobat)

  • How to use Java WebStart with EJB ?

    hi forum...
    how to use Java WebStart with EJB ? examples ?
    thanks
    mindu

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • Auto fit columns in excel using open xml

    I have generate excel using open xml and it contain auto fit property for columns. my problem is that the excel is opening very well in kingsoft spreadsheets
    and other tools, but not opening in microsoft excel 2013 and older version. Is there any solution for auto fit columns in excel using open xml and should open in Microsoft excel  all version

    Hi Raj12345,
    >> I have generate excel using open xml and it contain auto fit property for columns. my problem is that the excel is opening very well in kingsoft spreadsheets and other tools, but not opening in microsoft excel 2013 and older version
    I assume you was using OpenXML SDK and I'm afraid we are not able to find the root cause according to your description, would you mind sharing us some code sample to reproduce this issue.
    >> Is there any solution for auto fit columns in excel using open xml and should open in Microsoft excel  all version
    As far as I know, there is no auto fit property for columns in excel with openxml. I am afraid that you need to calculate the column width depending on the cell contents, and then set the column width. The link below shows more details:
    # Solution: How to AutoFit Excel Content
    https://social.msdn.microsoft.com/Forums/office/en-US/28aae308-55cb-479f-9b58-d1797ed46a73/solution-how-to-autofit-excel-content?forum=oxmlsdk
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • How to print PDF files using java print API

    Hi,
    I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.
    Thanks in advance

    Mike,
    Can't seem to get hold of the example described in your reply below. If you could let us have the URL to get then it would be great.
    My GUI application creates a pdf document which I need to print. I want to achieve this using the standard Java class PrinterJob (no 3rd party APIs I'm afraid, commercial restraints etc ..). I had a stab at it using the following code. When executed I get the pretty printer dialog then when I click ok to print, nothing happens!
    boolean showPrintDialog=true;
    PrinterJob printJob = PrinterJob.getPrinterJob ();
    printJob.setJobName ("Contract.pdf");
    try {
    if (showPrintDialog) {
    if (printJob.printDialog()) {
    printJob.print();
    else
    printJob.print ();
    } catch (Exception PrintException) {
                   PrintException.printStackTrace();
    Thank you and a happy new year.
    Cheers,
    Chris

  • Polling gpib/enet unit over tcp/ip using java

    I understand that there is a linux driver for the gpib/enet product. Since I assume this device is polled over a tcp/ip connection, do I need to do this in C, ot can I establish a socket connection using java ? If so, what is the driver for ? is it just to assign an ip address and other setup functions ?
    Thanks
    John Adams

    Hi John,
    You do not need to do this in C. In fact you can do it in just about any language. The librarys are exported to a shared object, so as long as your language can make calls to a .so, you are good to go. I am positive that java has this capability.
    Hope this helps out! If you need the driver, it is available at www.ni.com/linux.
    Best Regards,
    Aaron K.
    Application Engineer
    National Instruments

Maybe you are looking for

  • Mini-DVI to HDMI Problem

    Hi, I bought a Mini-DVI to HDMI adapter like this one: http://www.hdtvsupply.com/mini-dvi-to-hdmi.html to be able to hook up my macbook (2007 white version) to my HDTV. However, since HDMI is traditionally for both video AND audio, the HDMI channel o

  • How do I select only certain songs from itunes library to upload to my iphone?

    Trying to free up some memory and my whole itunes library is loaded on my phone.  Is there a way to select only certain songs to sync with my phone?

  • WRT320N Internet Issues

    I have set it up and it is sending out a signal so I can connect but when I try to get on the internet on my computer it doesn't connect to the internet correctley on both of my Mac computers or my iPhone. It either constantley tries to connect or ju

  • Weird issue with KDM

    I am missing a dependency or configuration, and I'm not sure how to debug this... I installed the kdebase package. Then I tried starting KDM through systemd like so: $ sudo systemctl start kdm Nothing happened... I installed gnome and interestingly e

  • Patch Prerequisite

    Hi Guys, platform is 11.5.9 OS is solaris Please I want to download patch 5352601(CPUApr2007 5352601) 11iApplications DBA) which is included in CPU April 2007. Now one of the prerequisite for this patch is patch 3180816 (Patch 11i.AD.I) which is obso