Parsing SOAP with JAVA

I need to be able to take the XML portion of a SOAP message and send it to another a program as a text String.
So basically take the SOAPBody, extract the SOAPElements and then write the contents to and output stream...
Can anyone tell me how to do this, sample code would be appreciated.
thanks

http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXM.html

Similar Messages

  • Parsing data with java is killing me

    i created some data in notepad
    which contains :: embedded in the data
    my loop gets to the :: and does not see the ::
    while
    (Strpos < (line.length() ) ) {
    index = Strpos +2;
    colons = (line.substring(Strpos, index)) ;
    System.out.println(colons);// i can see the value i'm looking at here
    if (colons != "::")
    displayline.append(line.substring(Strpos, Strpos + 1));
    Strpos++;
    the pgm always executes the displayline.append.
    is this because i created the data in notepad
    i'm really getting discouraged with java.

    Essentiallly what you're trying to do here is compare Strings. By using the == operator (or != in your case), what you are actually comparing is the address location, which is always going to return true for you, since the address are going to be different (not equal for your code example). Try changing your if statment to the following:String colonMatch = "::"
    if(!colons.equals(colonMatch)) // if you current search is not equal to a pair of colonsUsing the equals() method does a character by character comparison, which is what you are needing. I've made this mistake myself a few times, so no worries.
    James

  • Parsing XML with Java - seeking advice for method to pursue

    Hi guys
    So here's the deal: I want to parse some XML from a server, get all the data I need from it, then shunt that data to the classes that need it. However, I'm really not sure what the best way of parsing the XML is.
    I've just written a class for obtaining the file, and one for building a DOM from the XML file. But looking at org.w3c.dom in the Java API documentation (see HERE) I'll have to implement shedloads of interfaces to be able to take advantage of the DOM, and I don't even know a lot about it.
    So am I best just writing a simple parser based on regular expressions to get the data I want? There's about 5 attributes in the XML file that I need to get - 5 for each instance of the containing element. So I don't think it'll be hard to do with regular expressions.. plus even if I did decide to implement all the DOM interfaces, the only way I'd know how to do half the stuff is with regular expressions anyway. I mean, how else would you do it? How else could you match up Nodes according to the Strings you're using for the elements, attributes etc?
    I worry that a parser using regular expressions might be too slow... I'm building this as an applet to visually display information from the server. I have nothing to support those fears, I'm just not experienced enough to know whether speed would be a problem if I chose this route... I don't think it would, but really need confirmation of that suspicion being unfounded.
    Any advice would be very, very welcome, as I'm tearing my hair out at the moment, unsure what to do.

    Komodo wrote:But JDOM is not in the core class libraries, is it? So if I want to create an applet embedded into a website, am I able to get people to download that as well?
    Sorry, I don't know anything about applets.
    Komodo wrote:Everyone's advice is appreciated, but my core question remains unanswered - would using regular expressions, considering how simple and unchanging the XML files are, be a viable option in terms of speed?
    Yes! I've done more than my fair share of XML processing with REs. It's not always easy. I often wish I could just use something XPath-like. But it's certainly easy to do and would probably mean that you'd have something up and running quicker than if you spent time investigating pure XML parsing approaches.

  • What is the best book on XML and SOAP with Java?

    I need to learn xml and soap. Could someone recommend a book or tutorials on the subject. I have just went through teach yourself java in 21 days.
    Thank you
    Noah

    Well using XML is very easy and I can assure you that a simple tutorial can get you on the right track quickly. A quick google search gave me this one, which looks like a good start: [http://totheriver.com/learn/xml/xmltutorial.html|http://totheriver.com/learn/xml/xmltutorial.html]
    As for SOAP, that is a more complex subject. You are looking for JAX-WS (Java API for XML webservices). I suggest checking out amazon.com searching for "java web services". The user reviews should give you a very good idea which book is good and which one stinks.

  • Wrong XML parsing in Java  6.0 , the same code works fine with Java 5.0

    I have the following xml data in a file ( C:\_rf\jrebug.xml ) :
    <?xml version="1.0" encoding="UTF-8"?>
    <rs>
         <data
              input3='aa[1]'
              input4='bb[1]'
              input6='cc[2]'
              input8='dd[7]'
              output2='ee[7]'
              output4='ff[511]'
              output6='gg[15]'
              output7='hh[1]'
         />
    </rs>
    I have the following code to parse this XML data :
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.xml.sax.SAXException;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.SAXParseException;
    public class DomParserBug {
         Document dom;
         public void runExample() {
    parseXmlFile("C:\\_rf\\jrebug.xml");
              parseDocument();
         private void parseXmlFile(String filename){
              //get the factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              //dbf.setValidating(true);
    dbf.setValidating(false);
              try {
                   //Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   db.setErrorHandler(new MyErrorHandler());
                   //parse using builder to get DOM representation of the XML file
                   dom = db.parse(filename);
              }catch(ParserConfigurationException pce) {
                   pce.printStackTrace();
              catch(SAXParseException spe) {
                   spe.printStackTrace();
              catch(IOException ioe) {
                   ioe.printStackTrace();
              catch(SAXException se) {
                   se.printStackTrace();
    private void parseDocument()
    Element docEle = dom.getDocumentElement();
    NodeList nl = docEle.getElementsByTagName("data");
    if(nl != null && nl.getLength() > 0)
    for(int i = 0 ; i < nl.getLength();i++)
    Element el = (Element)nl.item(i);
    NamedNodeMap attrsssss = el.getAttributes();
    for (int ii=0; ii<attrsssss.getLength(); ++ii)
    Node attr = attrsssss.item(ii);
    System.out.println("Attribute name is =" attr.getNodeName() " AND Attribute value is ="+attr.getNodeValue());
         public static void main(String[] args){
              DomParserBug dpe = new DomParserBug();
              dpe.runExample();
         class MyErrorHandler implements ErrorHandler {
              public void error(SAXParseException e) {
              System.out.println("error : " +e.toString());
         // This method is called in the event of a non-recoverable error
         public void fatalError(SAXParseException e) {
         System.out.println("fatalError : " +e.toString());
         // This method is called in the event of a warning
         public void warning(SAXParseException e) {
         System.out.println("warning : " +e.toString());
    The parsed output is :
    Attribute name is =input3 AND Attribute value is =aa[1]
    Attribute name is =input4 AND Attribute value is =bb[1]
    Attribute name is =input6 AND Attribute value is =cc[2]
    Attribute name is =input8 AND Attribute value is =dd[7]
    Attribute name is =output2 AND Attribute value is =ee[7]
    Attribute name is =output4 AND Attribute value is =ff[511]
    Attribute name   is  =output6 AND Attribute value  is =hh[1]]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]
    THE LAST TWO LINES ARE SIMPLY WRONG.
    With java 5.0 the last two lines are parsed correctly :
    Attribute name   is  =output6 AND Attribute value  is =gg[15]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]
    I have seen this issue only after I upgraded to java 6.0. I have searched the java 6.0 bug database but there is nothing there.
    I have also submitted a bug to the bugdatabase last month but have not heared anything.
    Anybody have any clue about this ???
    Thanks
    Edited by: skaushik on Jan 4, 2008 12:40 AM
    Edited by: skaushik on Jan 4, 2008 6:38 PM

    I have seen similar issue. I found that if you remove the square brackets from the first line in teh XML file, the last two lines are parsed correctly.
    Replace the follwing line : :
    Attribute name is =input3 AND Attribute value is =aa[1]
    with :
    Attribute name is =input3 AND Attribute value is =aa
    and the output is CORRECT :
    Attribute name is =input3 AND Attribute value is =aa
    Attribute name is =input4 AND Attribute value is =bb[1]
    Attribute name is =input6 AND Attribute value is =cc[2]
    Attribute name is =input8 AND Attribute value is =dd[7]
    Attribute name is =output2 AND Attribute value is =ee[7]
    Attribute name is =output4 AND Attribute value is =ff[511]
    Attribute name   is  =output6 AND Attribute value  is =gg[15]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]

  • SAX Parser Validation with Schemas (C, C++ and JAVA)

    We are currently using the Oracle XML Parser for C to parse and validate XML data using the SAX parser interface with validation turned on. We currently define our XML with a DTD, but would like to switch to schemas. However, the Oracle XML Parser 9.2.0.3.0 (C) only validates against a DTD, not a schema when using the SAX interface. Are there plans to add schema validation as an option? If so, when would this be available? Also, the same limitation appears to be true for C++ and JAVA. When will any of these provide SAX parsing with schema validation?
    Thanks!
    John

    Will get back to you after checked with development team...

  • How to read and parse a remote XML file with Java

    Hi.
    Using J2SE v1.4.2, I'd like to read and parse a remote file:
    http://foo.com/file.xml
    Is it possible with Java? I'd be extremely grateful if someone could provide me any webpage showing a very simple code.
    Thank you very much.

    How about the following?
         import java.io.InputStream;
         import java.net.URL;
         import javax.xml.parsers.DocumentBuilder;
         import javax.xml.parsers.DocumentBuilderFactory;
         import org.w3c.dom.Document;
         public static void main(String[] args) throws Exception {
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              DocumentBuilder db = dbf.newDocumentBuilder();
              URL url = new URL("http://foo.com/file.xml");
              InputStream inputStream = url.openStream();
              Document document = db.parse(inputStream);
              inputStream.close();
         }-Blaise

  • SOAP with Attachment Support in Web AS Java

    Hello,
    I want to write an extension to an existing Java application running on Web AS to take a PDF (which is a binary object in the context) and submit it using a Web Service call to a  Web Service running on a WebSphere App Server. My idea is to use SOAP with attachments to do this. I know how to create a simple Web Service call with the NWDS, but I am not so sure about a Web Service call with an attachment.
    1) Is SOAP with attachments supported in Web Java/NWDS?
    2) Does it require a specific Web AS 6.40 SP Stack?
    3) Has anyone used this before? Is there anything I need to consider (e.g. encoding of the attachment)?
    4) Is there a maximum file size for the attachment?
    You help is appreciated. And if I get it running I can show it at TechEd
    Cheers!
    Matthias

    I found what causes the problem.
    I use resource bundle to handle i18n and one of bundle is myapp_zh.properties for Chinese locale. In browser I add  Chinese [zh] in Language Preference then the web page should display Chinese character.
    What puzzles me is that encoding of the page with Chinese characters is Chinese Simplified (GB2312) rather than UTF-8. Tomcat correctly sets page Encoding to UTF-8 since I specify <%@ page language="java" contentType="text/html;charset=UTF-8" %> in each JSP file. Why Web AS ignores this and returns Chinese character in GB2312?
    Thanks a lot
    John

  • Xml parsing with Java

    Hi ..!
    I am having a small problem friends if anybody of you can just help me resolving this .
    I am quiet new to working with parsing XML with SAX and Dom java parsers .
    Problem is when we want to extract the Element name ,Attribute Name or Attribute Value it is quiet simple in Java to do so .
    But supposing i want to extract the value between the tags of an element how can we do so either their is a simple method that i have missed or their is a tedious procedure that i am ignorant of.
    eg- <Node1> this is my name <Node1>
    Java source output -this is my name.
    Thanx to you people for co-operating
    Take care
    Akshat

    in SAX u can do like this
         boolean nodeflag=false;
         public void startElement(String uri,String localName, String qName,Attributes attributes)throws SAXException
              if(qName.equals("Node1"))
                   nodeflag=true;
         public void endElement (String uri, String localName, String qName)throws SAXException
              if(qName.equals("Node1"))
                   nodeflag=false;
         public void characters(char[] ch, int start,int length)throws SAXException
              String s=new String(ch,start,length);
              if(nodeflag==true)
                   if(!s.trim().equals(""))
                        System.out.println(s.trim());
         }here in characters method u can work with data

  • Error message : soap fault: java.lang.NumberFormatException

    Hello,
    I have Idoc to SOAP scenario. We I send Idoc, I get following error,
    SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: java.lang.NumberFormatException Message being parsed:
    To be on safer side, I have populated all the fields with values. I have tested the same scenarion using SOAP UI tool with payload from XI & it works fine.
    This is very annoying. Can anybody help?
    Regards,
    Sunil

    Prateek,
    Here is my xml which goes to web service via SOAp adopter,
       470 {/ns0:company_code} 
       Constant {/ns0:userid} 
       Constant {/ns0:password} 
       1 {/ns0:acklm} 
       20090821 {/ns0:badat} 
       1020104878 {/ns0:banfn} 
       A {/ns0:banst} 
       NB {/ns0:bsart} 
       20090821 {/ns0:erdat} 
       Constant {/ns0:temp1} 
       Constant {/ns0:temp2} 
       Constant {/ns0:temp3} 
       Sunil.Joyous com {/ns0:email} 
       146474 {/ns0:ernam} 
       Sunil Joyous {/ns0:name} 
       {/ns0:zossatb}
       TEST OSAT {/ns0:afnam} 
       1 {/ns0:anln1} 
       1 {/ns0:anln2} 
       1 {/ns0:aufnr} 
       1020104878 {/ns0:banfn} 
       1 {/ns0:bednr} 
       00010 {/ns0:bnfpo} 
       NB {/ns0:bsart} 
       1.000 {/ns0:bsmng} 
       1.000 {/ns0:bumng} 
       1 {/ns0:catalog_info} 
       1 {/ns0:ebakz} 
       T02 {/ns0:ekgrp} 
       IZ {/ns0:ekorg} 
       IZ {/ns0:gsber} 
       5300642603 {/ns0:infnr} 
       1 {/ns0:knttp} 
       1 {/ns0:kostl} 
       20090812 {/ns0:lfdat} 
       1 {/ns0:lifnr} 
       X {/ns0:loekz} 
       BOX CARDBOARD TELESCOPIC PART {/ns0:maktx} 
       00441010 {/ns0:matkl} 
       000000000002647430 {/ns0:matnr} 
       ST {/ns0:meins} 
       10.000 {/ns0:menge} 
       1 {/ns0:mfrpn} 
       1 {/ns0:peinh} 
       10.000 {/ns0:preis} 
       0 {/ns0:pstyp} 
       X {/ns0:repos} 
       1 {/ns0:saknr} 
       1 {/ns0:statu} 
       470 {/ns0:temp1} 
       PACKING {/ns0:temp2} 
       20090821 {/ns0:temp3} 
       BOX CARDBOARD TELESCOPIC PART {/ns0:txt01} 
       TRY {/ns0:waers} 
       1 {/ns0:wempf} 
       X {/ns0:wepos} 
       IZ {/ns0:werks} 
       1 {/ns0:zdegsta} 
       TEST TEST {/ns0:zsastxt} 
       F442617301 ,4085212101 ,JL/QSC-70108949 ,OUT ,7064 58 049 , , , , , , , , , , {/ns0:ztanim} 
       {/ns0:zossatd}
       1020104878 {/ns0:banfn} 
       00010 {/ns0:bnfpo} 
       NB {/ns0:bsart} 
       470 {/ns0:temp1} 
       Constant {/ns0:temp2} 
       Constant {/ns0:temp3} 
       PO TEXT {/ns0:zmetin1} 
       1 {/ns0:zmetin10} 
       1 {/ns0:zmetin2} 
       1 {/ns0:zmetin3} 
       1 {/ns0:zmetin4} 
       1 {/ns0:zmetin5} 
       Constant {/ns0:zmetin6} 
       Constant {/ns0:zmetin7} 
       Constant {/ns0:zmetin8} 
       Constant {/ns0:zmetin9} 
       {/ns0:zossatt}
    Out of these following fields are of decimal type,
    BSMNG, BUMNG, MENGE, PEINH, PREIS
    Rest all are of string type.
    Edited by: Sunil Joyous on Aug 21, 2009 2:01 PM
    Edited by: Sunil Joyous on Aug 21, 2009 2:02 PM
    Edited by: Sunil Joyous on Aug 21, 2009 2:02 PM

  • "Error while parsing SOAP XML payload: no element found" received when invoking Web Service

    Running PB 12.1 Build 7000.  Using Easysoap.  Error ""Error while parsing SOAP XML payload: no element found" received when invoking Web Service".  This error does not appear to be coming from the application code.  Noticed that there were some erroneous characters showing up within the header portion of the XML ("&Quot;").  Not sure where these are coming from.  When I do a find within the PB code for ""&quot;" it gets located within two objects, whereas they both reference a "temp_xml_letter".  Not sure where or what temp_xml_letter resides???   The developer of this is no longer with us and my exposure to WSDL and Web Services is rather limited.  Need to get this resolved...please.
    This is the result of the search.  Notice the extraneous characters ("&quot;"):
    dar1main.pbl(d_as400_mq_xml)
    darlettr.pbl(d_email_xml)
    ---------- Search: Searching Target darwin for 'temp_xml'    (9:52:41 AM)
    ---------- 2 Matches Found On "temp_xml":
    dar1main.pbl(d_as400_mq_xml).d_as400_mq_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> number </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    darlettr.pbl(d_email_xml).d_email_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> imcnumber </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    ---------- Done 2 Matches Found On "temp_xml":
    ---------- Finished Searching Target darwin for 'temp_xml'    (9:52:41 AM)

    Maybe "extraneous" is an incorrect term.  Apparantly, based upon the writeup within Wiki, the parser I am using does not interpret the "&quot;"?  How do I find which parser is being utilized and how to control it?
    <<<
    If the document is read by an XML parser that does not or cannot read external entities, then only the five built-in XML character entities (see above) can safely be used, although other entities may be used if they are declared in the internal DTD subset.
    If the document is read by an XML parser that does read external entities, then the five built-in XML character entities can safely be used. The other 248 HTML character entities can be used as long as the XHTML DTD is accessible to the parser at the time the document is read. Other entities may also be used if they are declared in the internal DTD subset.
    >>>

  • Parse Error in Java

    I am very new to java and I have a piece of code which is written in javascript which i want to replicate in java basically it validates the structure of and XML Dom passed into it.
    function XMLParseError(XMLIsland, XMLName)
    if (XMLIsland.parseError.errorCode != 0)
    alert('XML Parse Error with ' + XMLName + '\n\nreason: ' +
    XMLIsland.parseError.reason +
    '\nline: ' + XMLIsland.parseError.line +
    '\npos: ' + XMLIsland.parseError.linepos +
    '\nsrcText:' + XMLIsland.parseError.srcText +
    '\nurl: ' + XMLIsland.parseError.url);
    in java i have
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    factory.setIgnoringComments(true); // We want to ignore comments
    // Now use the factory to create a DOM parser
    DocumentBuilder parser = factory.newDocumentBuilder();
    //final xml is an xml string
    xmldoc = parser.parse(new InputSource(new StringReader(finalXML)));
    if i want to catch the errors and print them to the screen similar to the javascript program how do i do this.....

    Create a class which extends the DefaultHandler(DefaultHanlder impleents the ErrorHandler interface)
    Set the ErrorHandler on the DocumentBuilder.
    builder.setErrorHandler(errorHandler);

  • XSLT Maps with Java enhancements - JCO_SYSTEM_FAILURE

    Hi,
    I have reviewed several postings regarding XSLT Maps with Java enhancements. I followed instructions and build a jar file and the XSLT document. I built one imported archive with the .jar and .xsl. For the class, The path get loaded properly.
    However, I still have a problem when and execute the interface.
    My xslt has the following information
    <xsl:transform version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:ns="http://xyz.abc.sap.def.com"
        xmlns:javamap="java:xyz.Date_Time">
    <xsl:param name="inputparam" />
        <xsl:template match="/">
            <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
        </xsl:template>
    </xsl:transform>
    In SXMB_Moni I get the following error...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>Exception in method processFunction.</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>"SYSTEM FAILURE" during JCo call. Exception in method processFunction.</SAP:Stack>
      <SAP:Retry>A</SAP:Retry>
      </SAP:Error>
    If i remove the line        
    <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
    The map ends successfuly.
    Comments would be appreciated.
    Regards,
    Sergio

    Stefan,
    Find the class and method definition below. The method is static and it returns the string.
    ==========
    package xyz;
    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 Date_Time {
        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;

  • Should we avoid Graphical mapping and stick with Java mapping?

    After developing mappings in XI for a month, I just don't see any good reasons to use Graphical mappings over Java mappings. Maybe some experienced users here can give me some valid reasons why we should choose Graphical mappings. Here is what I think:
    Disadvantages of Graphical mappings:
    1. No way to perform automated unit testings. This is probably the biggest reason I hate it. You can do some tests manually when you work in Integration Builder. But there is no way you can write some unit testing utilities to automate the task.
    2. Complexity. Even for some simple requirements, your Graphical mappings can become complicated and hard to understand. A lot of times, I find myself staring at several dozens of graphical nodes and try to understand what it does.
    3. Impossible to reuse. This is totally against the DRY (Don't repeat yourself) principle. For example, to generate messages for JDBC adapter, it is common to have two identical fields for primary keys: one in the access node and another in the key node. If you change the mapping logic in one, you have to remember to change the other.
    Advantage with Java mappings:
    1. Fully automated unit testing. You can create JUnit tests along with your Java mapping classes and use Maven or other build tools to perform automated unit testing.
    2. Your choice of XML parsing and binding. With Java mapping, you can choose any open source framework for XML parsing and binding. For example, with XMLBeans, I can convert XML input message to a Java object, transform to another Java object and write to output message. And each Java object is generated from its corresponding XML schema.
    3. Highly reusable. We can use fundamental object-oriented designs to create highly reusable mapping components.
    4. Better version control. Since the mappings are just Java classes, we can use CVS or SVN to track code changes.
    5. Better build tools. We can fully utilize build tools like Ant and Maven to automate the build, unit tests, or even generate documents and mapping web sites.
    So do you guys agree? Maybe I am still new to XI or I am missing some important things. But at this point, I just don't see why I should use Graphical mappings. Is there anyone developing XI interfaces completely with Java mappings?
    Thanks in advance for any comments!
    Kenny Cheang

    Hi Suraj,
    > Since its graphical the blocks will take space, but
    > there is always an adavntage of processing time.
    > Ebven though it may appear bigger, it will take less
    > time as compared with Java code (for the same
    > mapping).
    Could you explain more why the graphical mapping has better performance? I thought the graphical mapping is compiled into a Java class in the runtime anyway.
    > Yes thats there, but same goes with Java mapping too
    > right (if you haven't mentioned it as constants)
    I mainly think about inheritance. If I have to build 10 interfaces and they all have some common behavior, I can create a base interface class to encapsulate the common logic. But with graphical mapping, you have to duplicate them in each interface.
    > Disadvantages of Java mapping:
    > 1. Performance
    Same as above. I just don't see why Java has worse performance. I actually think Java should have better performance. You can optimize the code anyway you want. In some cases, you have to use queue functions in graphical mapping but it's not necessary in Java.
    > 2. All might not be well versed with Java Code(though
    > everyone may know basic java) .
    I am not asking everyone to abandon graphical mapping. I am just wondering which one is better when you have skills for both.
    > 3. Lot of standard functions are available in GM
    > which you can choose, but you have to remember the
    > exact code for those in Java mapping.
    You can create functions in Java too. All you have to do is to remember the function name.
    Kenny

  • Lookup in Xi using XSLT with Java enhancement "Error"

    Hi Experts,
    I need your advice urgently.
    I have done message mapping using XSLT mapping with Java enhancement.
    I included the code for SAP DB connection to read from the table.
    I imported both the sapdbc-7_6_00_30_5567 Driver.jar and my custom jar into imported archives.
    I used the java functions in my XSLT to get the lookup value.
    The code was working correctly in NWDS, but when i tried to execute the scenario, it gave me 'SYSTEM ERROR'
    Following is the error as seen in SXMB_MONI
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_EXCEPTION</SAP:Code>
      <SAP:P1>PortalTransaction_EP_to_Insert_EP_DB</SAP:P1>
      <SAP:P2>http://ab.com/xys/subscription</SAP:P2>
      <SAP:P3>8abf9c80-ad4a-11db-bb9a-ccaaac110865</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Exception occurred during XSLT mapping of the application</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Following is the DEBUG trace when i tries to test the Interface Mapping
    Creating mapping sequence with 2 steps.
    Creating step 0
    Creating XSLT mapping PortalTransaction_SUBSYS_to_PortalTransaction_EP
    Creating step 1
    Creating XSLT mapping PortalTransaction_EP_to_Insert_EP_DB
    Start executing mapping sequence with 2 steps.
    Executing mapping step 0
    Call XSLT processor with stylsheet PortalTransaction_SUBSYS_to_PortalTransaction_EP.xsl.
    Returned form XSLT processor.
    XSLT transformation: PortalTransaction_SUBSYS_to_PortalTransaction_EP.xsl completed with 0 warning(s).
    Mapping step 0 has been executed.
    Executing mapping step 1
    Call XSLT processor with stylsheet PortalTransaction_EP_to_Insert_EP_DB.xsl.
    Loaded class com.cityandguilds.clasp.xi.DateTimeFunctions
    Method fatalError called, terminate transformation
    javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: java.lang.ClassNotFoundException: Class doesn't have appropriate method! -> java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) 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.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: java.lang.ClassNotFoundException: Class doesn't have appropriate method! -> java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:65) at com.sap.engine.lib.xsl.xpath.JLBLibrary.getFunction(JLBLibrary.java:107) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:76) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) 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) ... 19 more Caused by: java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.init(JLBFunction.java:273) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:63) ... 34 more -
    com.sap.engine.lib.xml.util.NestedException: java.lang.ClassNotFoundException: Class doesn't have appropriate method! -> java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.init(JLBFunction.java:273) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:63) at com.sap.engine.lib.xsl.xpath.JLBLibrary.getFunction(JLBLibrary.java:107) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:76) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) 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.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) -
    at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:65) at com.sap.engine.lib.xsl.xpath.JLBLibrary.getFunction(JLBLibrary.java:107) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:76) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) 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.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.init(JLBFunction.java:273) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:63) ... 34 more
    TransfromerException during XSLT processing:
    javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: java.lang.ClassNotFoundException: Class doesn't have appropriate method! -> java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) 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.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: java.lang.ClassNotFoundException: Class doesn't have appropriate method! -> java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:65) at com.sap.engine.lib.xsl.xpath.JLBLibrary.getFunction(JLBLibrary.java:107) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:76) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) 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) ... 19 more Caused by: java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.init(JLBFunction.java:273) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:63) ... 34 more -
    com.sap.engine.lib.xml.util.NestedException: java.lang.ClassNotFoundException: Class doesn't have appropriate method! -> java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.init(JLBFunction.java:273) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:63) at com.sap.engine.lib.xsl.xpath.JLBLibrary.getFunction(JLBLibrary.java:107) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:76) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) 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.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) -
    at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:65) at com.sap.engine.lib.xsl.xpath.JLBLibrary.getFunction(JLBLibrary.java:107) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:76) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:98) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:83) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:132) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) 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.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.ClassNotFoundException: Class doesn't have appropriate method! at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.init(JLBFunction.java:273) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.<init>(JLBFunction.java:63) ... 34 more
    17:44:11 End of test
    Thanks in advance,
    Mona

    Hi,
    Thanks to all who replied.
    I solved the problem.
    I was calling the java method from XSLT without passing any arguement.
    I realised that the java methods called from XSLT should always have input parameter. So i changed the javamethod call from
    public static String getCurrentRecNo() to public static String getCurrentRecNo(Object test)
    and it worked.
    Can anybody explain me why java methods called from XSLT should always have an input arguement.
    Thanks
    Mona

Maybe you are looking for

  • Click Thru Destination from Third Part Website Metrics

    Hi, I was interested if anyone has successfully seen metrics for click thru destinations using web advertisements. I can create the campaign schedule (Internet Advertisement) and create the content and get the tracking URL. However, after clicking on

  • My bill, my data plan

    I currently have 3 phones on my account, 2 of which are smartphones. One has unlimited data (yay) and the other has a 2 Gb cap. The issue is this: the phone with unlimited data belongs to my wife. She usually connects to our WiFi and uses a smidgeon

  • Unable to print -- printer not installed msg

    I am trying to print a psd file via CS4 and I am receiving the following error message: Before you can perform printer-relate tasks such as page setup or printing a document, you need to install a printer I DO have a printer installed and can in fact

  • Non ascii characters in playlist's filenames

    I have strange problem creating playlists. When playlist consist of files with ascii filenames there are no problems - I can select and play them. When filenames with (for instance) Cyrillic characters are mixed with ascii filenames only I don't see

  • What is the name of the cable?

    What is the name of the cable needed to plug into my macbook pro so that the image can be seen on my plasma television