JAVA Mapping with SAX: Illegal character exception &

Hi everybody,
I use a SAX JAVA Mapping. It throws an error cause the xml that is parsed has a
&
like in
<D_3036>Company &amp; Co. KG</D_3036>
Does anybody know how to solve the problem?
I do not want to replace the
&amp;
Are there special settings/properties for the handler/parser?
Thanks
Regards
Mario

Hi all,
thanks for your comments and suggestions. The error was not cause by the problem I describes.
FYI:
If there is an ampersand in the middle of a string, than the standard method
characters
in the handler is called three times!
This let me asume the ampersand was the error.
Regards Mario
Edited by: Mario Müller on Dec 19, 2008 1:23 AM

Similar Messages

  • Java mapping of application triggered an exception

    Hi,
    We have ascenario where a vendor will be sending us a cXML file which has the second line as <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.009/InvoiceDetail.dtd">. If I open it in XMLSpy, it is saying the file as invalid. XI is unable to map this file. So we decided to remove that line using Java mapping and then do the regular graphical mapping.
    I took the java code from the SAP note 812966 and used the aii_map_api.jar, dom.jar, jaxp-api.jar to create the class of that java file and used that class file by importing that into XI as a jar file.
    I'm getting this error in the request message mapping of SXMB_MONI
    <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">STREAM_TRANSFORMATION_EX</SAP:Code>
      <SAP:P1>mypackage/DeleteDTDDeclarationWithDOM</SAP:P1>
      <SAP:P2>Failed to load resource from the context classloa~</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I'm new to this java mapping, Can you please provide me some details about what files need to be loaded into the XI along with the class file.
    Appreciate you help.
    Thanks,
    MT.

    Hi Prateek,
    Thanks for your quick reply. Yes I have downloaded the aii_map_api.jar from <SAP_install_dir>/<system_name>/<instance_name>/j2ee/cluster/server<number>/apps/sap.com/com.sap.xi.services/
    And also I have compiled my java code using the dom.jar, sax.jar, jaxp-api.jar and aii_map_api.jar.
    I took the class file of my javacode and all the class files of the above mentioned jar files and prepared one single jar file, which I imported into XI.
    It is not allowing me to make a single jar of the actual class file and all the supporting jar files.
    What is the actual method of doing it.
    Appreciate all your help. Thanks very much.
    Thanks,
    Maulik.

  • Java Mapping with Stream API

    Hi,
      Can you please let me know when java mapping with STAX will be supported in Netweaver XI?
    Regards
    Sudhir

    Hi Sudhir,
      STAX is Stream API for XML. It works similar to SAX but is a pull based model. It can also work with multiple XSD's...
    XI support of STAX will moslty be supported when XI supports Java EE 5. We can say that this will be supported very soon...
    http://www.xml.com/pub/a/2003/09/17/stax.html presents the overview of STAX.
    Hope this helps
    Regards
    Kiran..

  • Java Mapping with CDATA

    One simplest way is read the data element value as the string and ignore first  six or seven characters by using substring method or so... Use the return value string for parsing the values from respective tag element using parser or manually

    Hi Xinaxu,
    Here is the java mapping code.
    public class Cdata implements StreamTransformation{
         public static void main(String[] args) {
              try{
                   Cdata genFormat=new Cdata();
                   FileInputStream in=new FileInputStream("C:\\Apps\\acm\\cdata.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\acm\\cdata1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder builderel=factory.newDocumentBuilder();
                   /*input document in form of XML*/
                   Document docIn=builderel.parse(in);
                   /*document after parsing*/
                   Document docOut=builderel.newDocument();
                   TransformerFactory tf=TransformerFactory.newInstance();
                   Transformer transform=tf.newTransformer();
                   Element root,child,child1;
                   root=docOut.createElement("Header");
                   root.setAttribute("xmlns","urn:bp:xi:hr:edm:test:100");
                   NodeList l;
                   Node n;
                   l=docIn.getElementsByTagName("Data");
                   int i,len=l.getLength();
                   String charSet[]={"&lt;","&gt;","&amp;","&apos;","&quot;"};
                   String replaceSet[]={"<",">","&","'","\""};
                   for(i=0;i<len;++i)
                        child=docOut.createElement("Data");
                        if(l.item(i).hasChildNodes())
                             n=l.item(i).getFirstChild();
                             //System.out.println(n.getNodeType());
                             //System.out.println(n.getNodeValue());
                             int j;
                             if(n.getNodeType()==3 && n.getNodeValue().indexOf("CDATA")>=0)
                                  // that means this is Cdata section
                                  //capture data in a string
                                  String s=n.getNodeValue();
                                  /*if you are sure that string contains
                                   * valid xml tags. You can parse
                                   * the tags.First replace
                                   * &lt; with < less than
                                     &gt; with > greater than
                                     &amp; with & ampersand 
                               &apos; with ' apostrophe
                               &quot; with " quotation mark
                               to avoid exceptions
                                  //System.out.println("s="+s);
                                  for(j=0;j<charSet.length;++j)
                                       s=s.replaceAll(charSet[j], replaceSet[j]);
                                  int ll;
                                  ll=s.length();
                                  String a="";
                                  int count=0;
                                  //extract only xml tags from string
                                  for(j=0;j<ll;++j)
                                       if(count<2)
                                            if(s.charAt(j)=='<')
                                                 count++;
                                            if(count<2)
                                                 continue;
                                       a=a+s.charAt(j);
                                  //System.out.println("a="+a);
                                  for(j=a.length()-1,count=0;j>=0;--j)
                                            if(a.charAt(j)=='>')
                                                 count++;
                                            if(count==2)
                                                 break;
                                  if(j>=0)
                                       s=a.substring(0,j+1);
                                  System.out.println(s);
                                  org.xml.sax.InputSource inStream = new org.xml.sax.InputSource();
                                 inStream.setCharacterStream(new java.io.StringReader(s));
                                  DocumentBuilder b=factory.newDocumentBuilder();
                                  Document cdataSection=b.parse(inStream);
                                  child1=(Element) docOut.importNode(cdataSection.getDocumentElement(),true);
                                  child.appendChild(child1);
                             else if(n.getNodeType()==4)
                                  // that means this is Cdata section
                                  //capture data in a string
                                  String s=n.getNodeValue();
                                  /*if you are sure that string contains
                                   * valid xml tags. You can parse
                                   * the tags.  replace invalid characters
                                   * before parsing
                                  for(j=0;j<charSet.length;++j)
                                       s=s.replaceAll(charSet[j], replaceSet[j]);
                                  org.xml.sax.InputSource inStream = new org.xml.sax.InputSource();
                                 inStream.setCharacterStream(new java.io.StringReader(s));
                                  DocumentBuilder b=factory.newDocumentBuilder();
                                  Document cdataSection=b.parse(inStream);
                                  child1=(Element) docOut.importNode(cdataSection.getDocumentElement(),true);
                                  child.appendChild(child1);
                        root.appendChild(child);
                   docOut.appendChild(root);
                   transform.transform(new DOMSource(docOut), new StreamResult(out));
              catch(Exception e)
                   e.printStackTrace();
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
    Hope this solves your problem.
    regards
    Anupam

  • JAVA mapping using SAX parser adds extra tags

    Hi,
      We are using  java mapping using a SAX parser.It works well in standalone application ie it parses correctly and gets our desired xml structure and the xml is well formed too but when we import it in XI as a jar file it does not throw any errors but adds extra start tags, as a result the output xml is not well formed.XI is adding extra start tags.
    If any one else has faced a similar situation please help.
    Regards,
    Anirban.

    Hi Roberto,
    Thank you for the response.
    As I said, it doesnt throw any error. It is working perfectly in standalone application. But when we deploy it to XI Server, it is not forming the well formed XML. We too are puzzled by this situation.
    Okay, i will explain my scenario here.
    The following is my input XML to the java pgm..
    <Header>
    </Header>
    <Body>
    </Body>
    <SubBody1>
    </SubBody1>
    <SubBody2>
    </SubBody2>
    <SubBody3>
    </SubBody3>
    <SubBody4>
    </SubBody4>
    <Trail>
    </Trail>
    The desired output is
    <Header>
      <Body>
         <NameChanged1>
            <NameChanged2>
    <SubBody3>
    <SubBody4>
    </SubBody4>
    </SubBody3>
    </NameChanged2>
    </NameChanged1>
    <Trail>
    </Trail>
    Just look at the SubBody2 and SubBody1 node, its tag name has been changed in the output XML. Thats y i have decided to use java mapping instead of message mapping.
    I have developed the code for everything, i.e for changing the tag name and for forming the nested xml and it is working fine as a standalone application. But while deploying it to XI, the output is not well formed. I dont know the reason for it. Even I have checked the cardinality of the output Data types, that I have created. Its perfectly okay with all.
    Any Ideas???
    Regards,
    Anirban

  • XSLT-transformation in Java-Mapping with javax.xml

    Hi,
    we wanna use javax.xml for transformations in Java-Mapping.
    Inside the Java-mapping we read in XSL-files to transform a XML-stream. With XSLT 1.0 everything works fine - but with XSLT 2.0 we are getting runtime errors.
    Is it possible that javax.xml only supports XSLT 1.0?
    Regards
    Wolfgang

    Hi ,
    Jaxp 1.3 is available in this link -
    http://java.sun.com/webservices/jaxp/
    Use these jar files to process XSLT 2.0.
    Nanda

  • Java Mapping with an xml array as input

    Hi Gurus,
    I have to perform a java mapping to map some input xml contained in an array with a target message type. I have found a good java mapping example here:
    Re: Please provide Java Mapping example
    but my mapping input is not a single XML, but an XML array, thus I have a doubt...
    How can I map multiple XML contained in an array with a target XML? I have to solve this problem into a Java mapping prospective.
    Thanks to all!
    Message was edited by:
            Gabriele Morgante

    Hey Stefan, I think he is refering to a n:1 multimapping.
    If that is indeed the case, Gabriele, you will have to consider the initial tags inserted by mapping runtime to treat multimappings.
    Suppose your XML message is like
    <myMT xmlns="urn:mynamespace">
      <value>xpto</value>
    </myMT>
    Then, if your source message interface occurrence is defined as unbounded in your interface mapping, your mapping program (message mapping, xslt, java mapping, whatever) will receive, from mapping runtime, a message like this:
    <Messages xmlns="http://sap.com/xi/XI/SplitAndMerge">
      <Message1>
        <myMT xmlns="urn:mynamespace">
          <value>xpto1</value>
        </myMT>
        <myMT xmlns="urn:mynamespace">
          <value>xpto2</value>
        </myMT>
        <myMT xmlns="urn:mynamespace">
          <value>xpto3</value>
        </myMT>
      </Message1>
    </Messages>
    Also, if you have more than 1 message type as source of your interface mapping, your mapping program will receive the other message types in <Message2>, <Message3>... tags.
    The <Messages> and <MessageX> tags will always be automatically generated by mapping runtime when dealing with multimappings, which are mappings from m XML messages to n XML messages, with either m, n or both different of 1 (note that this definition includes mappings from 1 type to 1 type, when either source, target or both message types have max occurrence = ubounded).
    Finally, remember that the output that your mapping program generates will also have to include these <Messages> and <MessageX> tags (with proper namespace), since mapping runtime will be expecting them. Message mappings treat those by default, but your xslt and java multimappings will have to explicitely include these tags in the output.
    Regards,
    Henrique.

  • XI java mapping using SAX

    Hi,
    im using java mapping for complex IDOC structure. If I run program localy, it works great, but when XI runs mapping, I have problems with xml file, some elements are not there ?! I don't know why it happens.....i said that i'm using complex logic, and therefore I'm using complex IF statments to produce segment in IDOC. I have noticed that there is a problem, because when I switch off IF, everything is fine???? any idea??
    thx mario

    Hi,
    Do you have nested 'if' statements?  Is it possible you could be experiencing a "dangling else" problem?
    http://www.dai-arc.polito.it/dai-arc/manual/tools/jcat/main/node101.html

  • UME java mapping with ABAP

    Hi Experts
    I need to keep the users of my AS Java syncronized with some user in ERP.
    Thats means, when some user change some information in ABAP, i need to get this information and change in AS Java too, like email or password...
    I can't use CUA, and i can't use that function that syncronized ABAP user in AS Java automatically. There is another way to do it?
    Could somene help me?
    Best Regards
    Marcos Brandã

    Hi Martin
    Thanks for your response,
    When i was talking about the function that syncronized the user in abap and java, i was talking exactly about use ABAP user store as a source for UME. This solution doesn't wirk because the customer do not when activate this. He is worried about the performance and the information of the user in 2 diferent location, there is a lot of users in ABAP user store and he don't want this solution.
    I need to get just specific user to reply in Java stack user store. I kown how can i do it without get user password, but this do not resolve to me. I need the same user credencials in both systems.
    I will see th SPML / Idm and what kind of problems this solution brings to me, if this solve my problem, i will try to use it.
    There is another way, instead this two way? maybe get the encripted password, decript it and save in java user store with encription mecanism of ume?
    Best Regards
    Marcos Brandao

  • Java Mapping with a huge file

    Hi to all,
    I have a strange problem in my integration process.
    there are two java mappings in order to create bapi input:
    -the first mapping keeps a file of 5Mb and transforms it in a file of 50MB (and it works!)
    -the second mapping keeps the file above and has to create another file of 50Mb.
    And this second mapping doesn't work on the customer system, while everything is ok on my developing system.
    On customer system I don't have any error message: SXMB_MONI gives me a "clock" and the message says: mapping in process..... It remains in this status "forever"!!!
    Why does it work on my system with same code and same file and it doesn't on customer's?
    There is any system parameter that I can check to see if there is some difference in system configuration?
    Thank for the help!
    bye,
    Antonio

    Hi Antonio,
    ...seems to be a hardware problem (sizing).
    I would write some logging in my java to see how far it comes.
    Regards Mario

  • Getting Error in java mapping: Parsing empty source. Root element expected!

    Hi Experts,
       I am using java mapping for schema validation of input message. I have followed all the standard procedures and implemented the java class in the interface mapping.
    My interface mapping is like this:
    OrderData --->Java Class ---SchemaValidate
                         Mesg Map ---OrderData_to_BAP --->BAPI Msg
    So first I want to validate the schema of the input message. If the input message is invalid then XI should throw an exception. Then I use the actual message mapping to map the input order data to the BAPI input parameters.
    In the java code I am using xerces parser.
    The java code works fine when I run it as a standalone application.
    The interface mapping also works fine if I don't include the java mapping. Ofcourse schema validation does not happen.
    But when I test the interface mapping by including the java mapping then I am getting the error:
    Call method execute of the application Java mapping SchemaValidate
    Java mapping SchemaValidate completed. (execute() of SchemaValidate
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected!
    What am I doing wrong? Why it is not getting the root element?
    My Java code is as follows:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.helpers.*;
    import org.xml.sax.*;
    import org.apache.xerces.jaxp.*;
    Sample mapper for SAP-XI
    @author Gopal
    public class SchemaValidate implements StreamTransformation {
        //Constants when using XML Schema for SAX parsing.
         static final String JAXP_SCHEMA_LANGUAGE =
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         static final String W3C_XML_SCHEMA =
         "http://www.w3.org/2001/XMLSchema";
         static final String JAXP_SCHEMA_SOURCE =
         "http://java.sun.com/xml/jaxp/properties/schemaSource";
    Injection of mapping parameters
    from integration engine
    @param map Map with configuration data
        public void setParameter(Map map) {
    Mapping implementation
    @param inputStream Input data from integration engine
    @param outputStream Output data to integration engine
        public void execute(InputStream inputStream,
                            OutputStream outputStream)
          throws StreamTransformationException {
            try {
                  // obtain an object of class javax.xml.parsers.SAXParser,
                  SAXParserFactory spf = SAXParserFactoryImpl.newInstance();
                  spf.setNamespaceAware(true);
                  spf.setValidating(true);
                  SAXParser sp = spf.newSAXParser();
                  // setup the schema file
                  sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                  sp.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                  //parse the input xml using the given schema
                  sp.parse(inputStream, new ParseErrorHandler());
            catch(SAXException se) {
              se.printStackTrace();
            catch ( Exception e ) {
              throw new StreamTransformationException( e.getMessage() );
    My input message is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OrderCreate_request xmlns:ns0="mynamespace">
       <ORDER>HTEST1234567</ORDER>
       <ORDER_TYPE>z001</ORDER_TYPE>
       <ORDER_NAME>Test Order</ORDER_NAME>
       <CO_AREA>INTC</CO_AREA>
       <CCTR_POSTED>1234567890888888888</CCTR_POSTED>
       <CURRENCY>USD</CURRENCY>
       <PERSON_RESP>12345679</PERSON_RESP>
    </ns0:OrderCreate_request>
    Kindly help! please this is urgent!!!!!!
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Feb 28, 2008 9:34 AM

    Hi Stefan,
       I did the code changes to return output stream and the java code works perfectly in standalone mode in my PC.
       But when I use the same in the Java mapping with XI then It throws an error "Getting Error in java mapping: Parsing empty source. Root element expected!".
    My XI J2EE server has JDK1.4.3.11.
    Is there any limitation of using SAX parser in XI? If Yes, then which parser should be used for schema validation in XI?
    I have included the XSD file for schema validation along with class files in the .jar file. This jar file is then imported in XI repository. Is the XI engine not able to read the XSD file?
    Do I have to handle reading XSD file differently? Any suggession how?
    Is this parser error due to some security access?
    Kindly help me! I have been struggling with this problem since 2 weeks. I will be greatfull to you if you can help me.
    Thanks
    Gopal

  • "Message Illegal character used in property name" C4043 what is illegal?

    hi *,
    does anyone know what are legal chacters for JMS properties for SJSMQ?
    according to http://docs.sun.com/app/docs/doc/819-4469/aeqgo?a=view
    which mentions:
    C4043
    Message Illegal character used in property name - {0}
    {0} is replaced with the illegal character used.
    Cause An attempt was made to use a property name containing an illegal character. See JMS Message API Javadoc for valid property names.we are sometimes hitting this problem.
    e.g. '1' is not valid or strings with '-' but what else what else?
    i am migrating a huge application from STCMS (which allowed such property names) to SJSMQ and i would like to know exactly what is legal and not legal. does anyone know?
    regards chris

    Also ... look @ the description for what is a valid property in the JMS javadocs for Message:
    http://java.sun.com/javaee/5/docs/api/
    The key section is the fact that it must confirm to a selector identifier (covered later in the page). Here is part of an except that may help
    An identifier is an unlimited-length sequence of letters and digits, the first of which must be a letter. A letter is any character for which the method Character.isJavaLetter returns true. This includes '_' and '$'. A letter or digit is any character for which the method Character.isJavaLetterOrDigit returns true. the JMS specification ...

  • Creation of additional attachment in Java Mapping

    Hello all,
    I want to use a Java Mapping with the functionality to create a second /attachment which I can send over email out?
    I don’t want to pick this file somewhere from the server, instead I want to fill the content of the additional attachment directly in the java mapping.
    I hope somebody knows the answer of my question.
    If its possible is there any kind of example??
    Many thanks for your help
    ilka

    hi Stefan,
    http://scn.sap.com/thread/1874962
    Regarding the comment in this thread, can you please tell me if you have faced any issue with creating output attachments. Right now, i have a message mapping in which i have written a udf to create attachments
    this message mapping is a multi mapping and the source is 0-unb. I have used a return as xml on the root message and pointed it to the udf after split by value.
    There are three root nodes in one of my cases, and when this goes through this mapping, there is 1 attachemnt each created with three main documents and submain documents. However, all the attachments contain details of the first root node itself where in actually it should be each main and submain document having a different attachment. Please find my udf below. Please let me know if you think it is wrong somewhere.
    udf :-
    GlobalContainer globalContainer = container.getGlobalContainer();
    OutputAttachments outputAttachments = globalContainer.getOutputAttachments() ;
    int flag =0;
    AbstractTrace trace = container.getTrace();
    String attachmentName = "";
    //for(int i=0;i<var1.length;i++){
    try
    var1=var1.replaceAll("><",">\n<");
    attachmentName = "attachment"+cnt;
    Attachment newopAttachment = outputAttachments.create((attachmentName), var1.getBytes("UTF-8"));
    outputAttachments.setAttachment(newopAttachment);
    trace.addInfo("newopAttachment"+newopAttachment);
    cnt=cnt+1;
    attachmentName ="";
    newopAttachment = null;
    var1="";
    catch (Exception e)
    trace.addInfo("ever reaching trace");
          e.printStackTrace(); 
    //result.addValue("1");  
    //result.addValue("1");  
    return "1";
    Input :-
    Messages
    Message1
    SBDH
    SBDH
    SBDH
    Each of the above SBDH, i have returned as xml and pointed to the udf after split by value
    Your help is highly appreciated.
    Regards,
    Ninu

  • Java Mapping, XSLT Mapping, ABAP Mapping

    Hi Experts,
                     Could any one explain what is the main features of the following Mapping. How to pick the mapping?
    Java Mapping - When to use and what is the advantage.
    ABAP Mapping - When to use and what is the advantage.
    XSLT Mapping - When to use and what is the advantage.
    Graphical Mapping - When to use and what is the advantage.
    cheers,
    Sunee

    There are 4 types of mapping in XI
    1. Graphical Mapping
    2. XSLT Mapping
    3. JAVA Mapping
    4. ABAP Mapping
    When to use Message mapping
    1 When the logic for your mapping is simple and straight forward, you can use
    Advantages of message mapping
    1)Easy to use.
    2) has GUI drag and drop.
    3) used for simple mapping cases
    4) it does not involve any complex logic
    Disadvantages of message mapping
    1)has limitation in terms of complex hierarchy
    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.
    Disadvantages of Java mapping
    1)SAX parser is not easy to develop
    2)DOM parser is intensive
    3) Java knowledge is required
    4) bit complexer
    XSLT Mapping - When to use
    1)When the required output is other than XML like Text, Html or XHTML (html displayed as XML )
    2)When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
    3)When data is to be filtered based on certain fields (considering File as source)
    4)When data is to be sorted based on certain field (considering File as source)
    5)When data is to be grouped based on certain field (considering File as source)
    Advantages of using XSLT mapping
    1)XSLT program itself defines its own target structure.
    2)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.
    3)XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
    4)File content conversion at receiver side can be avoided in case of text or html output.
    5)Multiple occurrences of node within tree (source XML) can be handled easily.
    6)XSLT can be used in combination with graphical mapping.
    7)Multi-mapping is also possible using xslt.
    8)XSLT can be used with ABAP and JAVA Extensions
    Disadvantages of using XSLT mapping
    1)Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    2)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.
    3)XSLT mapping requires more memory than mapping classes generated in Java.
    4)XSLT program become lengthier as source structure fields grows in numbers.
    5)XSLT program sometimes become complex to meet desired functionality.
    6)Some XSL functions are dependent on version of browser.
    Advantages of Abap Mapping
    1) A person comfortable with OOABAP can go for ABAP mapping instead.
    Disadvantages of Abap Mapping
    1) Abap knowledge is required
    2) bit compexer
    For further info on each of the mapping, refer to these links,
    Graphical Mapping,
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    XSLT Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    http://www.w3.org/TR/xslt20/
    Java Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    Check this blog on Mapping:
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    Also, check this thread for more info,
    Different types of Mapping in XI

  • RFCLookup in Java Mapping

    Hello Gurus,
    I'm performing a RFCLookUp in Java Mapping with PI 7.1 (I can't use a Message Mapping), the XML I use to do the request is:
    <n:ZHRBAPINOMINA xmlns:n="urn:sap-com:document:sap:rfc:functions">
                <PERNR>30</PERNR>
    </n:ZHRBAPINOMINA>
    The error i'm getting is:
    error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException:
    error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: could not get functionname from XML requst:
    com.sap.aii.adapter.rfc.RfcAdapterException: failed to read funtionname from XML document:
    missing namespace declaration(2)
    What could cause this error?
    Thanks in advance.
    Xavi.

    Hello Raj,
    we are using a java mapping because we have to encript a pdf file with a password.
    We are calling the adapter in the java mapping, see wha we are doing:
    public static String RFCLookup( String sTabla , String sValue , String sName )
             String sAux1;
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder;
            factory.setNamespaceAware( false );
            factory.setValidating( false );
            XmlUtil xuUtil = new XmlUtil();
           try
                builder = factory.newDocumentBuilder();
            catch( Exception e )
                return "1";
            Document docReq;
            try
                // Building up RFC Request Document
                docReq = builder.newDocument();
                //Element eOutputRoot = xuUtil.createNode( docReq, "ZHRBAPINOMINA" );
                Node eOutputRoot = docReq.createElementNS("urn:sap-com:document:sap:rfc:functions", "ns:ZHRBAPINOMINA");
                //eOutputRoot.setAttribute( "xmlns:ns1" , "urn:sap-com:document:sap:rfc:functions" );
                eOutputRoot.appendChild( xuUtil.createNode( docReq , sValue , sName  ) );
                //eOutputRoot.appendChild( xuUtil.createNode( docReq , "TABLE_NAME" , sTabla ) );
                docReq.appendChild( eOutputRoot );
            catch( Exception e )
                return "2";
            // Lookup the
            Payload result;
            try
                InputStream is = new ByteArrayInputStream( docReq.toString().getBytes() );
                XmlPayload payload = LookupService.getXmlPayload( is );
                trace.addWarning("traza 1 ");
                result = accessor.call( payload );
                trace.addWarning("traza 2 ");
                if (result == null)
                     trace.addWarning("result of RFC call is null");
                     return "2.5";              
            catch( LookupException e )
                //Close accessor
                if( accessor != null )
                    try
                        accessor.close();
                    catch( LookupException ex )
                         trace.addWarning("Error during lookup1 - " + e);
                        return "3";
                trace.addWarning("Error during lookup2 - " + e);
                return "4";
            // Parsing RFC Response Document
            Document docRsp;
            try
                docRsp = builder.parse( result.getContent() );
            catch( Exception e )
                return "5";
            return "6";
            //return docRsp;
    In the execute method we are claling the RFC adapter:
    Channel channel = LookupService.getChannel( service, channelName );
    accessor = LookupService.getRfcAccessor( channel );
    We don't know why we have these errors, with old versions like XI 3.0 we didn't have errors.
    Do you know what could be?
    Many thanks.
    Xavi.

Maybe you are looking for

  • Access 2013 and SharePoint Foundation/Server 2010

    I have a real simple scenario that keeps happening. I simple click external data -> More -> SharePoint List from Access 2013 and point it to a SharePonint 2010 list ... then link the list.  It will link and show the data.  Once...  After closing the

  • Quicktime 7.1.5 Doesn't Install Movie To Apple TV in Final Cut Pro 3

    Quicktime 7.1.5 Doesn't Install Movie To Apple TV in Final Cut Pro 3. A bug? Or on purpose on the part of Apple?!

  • Black and White Screen

    My Iphone 4 has been shutting down to a black dos like screen with White letters. Debugger messag: panic\ OS Version: not yet set Kernel Version: Darwin Kernel Version 13.0 Sunday August 19 I b boot version: i Bott-1537.4.18 panic: we are hanging her

  • IP2700 won't print

    iP2700 on Win 7 won't print: - documents to be printed appear in print cue - top item in print cue shows "printing" - green lite on printer is blinking -"re-starting" document in printer cue produces no results. - computer is on a home network - will

  • TO ANN154 can't reply to discussion

    I posted in regards to Smartphones and 80.00 plan.   Cannot reply to posts (so answering here). Ann154;  yes, I am looking for Smartphones that are compatible with the 80.00 plan.  <Duplicate post.  Please see Smartphones and $80 plan for any replies