SAX mapping

Hi,
I have Java SAX mapping for IDOC-to-JDBC scenario. Sometimes it happens that, XI starts to create first XML SQL message, then in one moment stops(this XML hasn't right structure) and starts with second. With second, XI ends OK, but this has, XML syntactically, OK structure, and it can not be parsed to SQL. JDBC says:
Error while parsing or executing XML-SQL document: ERROR occured parsing request:com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:2, col:6)(:main:, row=2, col=6) -> com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:2, col:6)
This is some mix of two messages that should be mapped separatly. has anybody any idea?
thx
mario

Hi Mario,
This SAX Parser exception generally occurs when some condition is not being satisfied by the message payload when it is being parsed through the SAX Parser..for eg. if some tag in your message has data of greater legth than is specified in the condition in IR it throws a saxparser exception.
A mapping error is a non-fatal error that occurs during the mapping process.
The fatal errors are errors such as IOException that interrupt the mapping process and the exception is thrown by the mapping utility.
For more sax parser exception please refer:
http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/helpers/DefaultHandler.html
Hope this will be of help for you.
Regards,
Shibani
*Reward with points if helpful*

Similar Messages

  • JAVA Sax mapping replaces &_amp; with & causing mapping to fail

    Hi all,
    I have the following mapping scenario:
    Source XML -> Java Sax Mapping -> Graphical Mapping -> Target structure
    The source XML is valid and caters for special characters like & which appear as &_amp; in the XML (ignore the underscore _ without it the editor strips the amp;, isn't that ironic!).
    The second step of the interface mapping, which is the graphical map, is failing. It seems that the Java Sax mapping is replacing &_amp; with & in the XML, which is then causing the graphical map to fail as it cannot handle the special character &.
    Is there anyway I can prevent the Java Sax mapping from changing & to &
    Or is the only solution for me to write extra code in the Java map to convert & back to &_amp; before passing to the second mapping step????
    Any help appreciated.
    Che
    Edited by: Che Eky on Feb 18, 2009 11:05 PM

    Hi..
    Use this in your source xml file for '&' ->"&_amp;" remove the underscore
    Regards..
    Krishna..
    Edited by: PrasannaKrishna Mynam on Feb 19, 2009 2:20 PM
    Edited by: PrasannaKrishna Mynam on Feb 19, 2009 2:20 PM

  • Java SAX mapping "&" problem

    Hi, I'm using SAX mapping, but in case that some field has "&" as content, for example company name,
         public void characters(char buf[], int offset, int len)
              throws SAXException {
              String s = new String(buf, offset, len);
    for string "name m&s" returns only "s". It loops(splits this string into 3) trough:
    1. "name m"
    2. "&"
    3. "s"
    and in this case, I get only "s" what is completely wrong. How to avoid that?
    br
    mario

    Hi
      Can you convert the character & to   "& a m p ;" whithout white spaces?
      "& a m p ;" is the correct value for some XML parsers, or try to use other character set.
    Regards
    Ivá

  • Problems with a Java Mapping

    Hi Experts,
    as part of my diploma-thesis I have to write a java SAX-Mapping, which mapps the following incoming message:
    mt_MappingOUT
                 set
                     set_Element_01
                     set_Element_02
                     set_Element_03
                     set_Element_10
    to the following outgoinig message:
    mt_MappingIN
                  TABLE
                        item
                            item_FIELD_01
                            item_FIELD_10
    I develped the following code, which unfortunately results in "XML is not well defined" while testing. Unfortunately I cannot find the problem. So I hope someone of you can have a look an will have an idea.
    Created on 20.12.2007
    @author Sebastian Geissler
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import com.sap.aii.mapping.api.*;
    import java.io.*;
    import java.util.Map; import javax.xml.parsers.*;
    import org.xml.sax.; import org.xml.sax.helpers.;
    public class SETtoITEMjavaSAX extends DefaultHandler implements StreamTransformation
         private Map map;
         private OutputStream out;
         public void setParameter (Map param)
              map = param;
         public void execute (InputStream in, OutputStream out)
         throws com.sap.aii.mapping.api.StreamTransformationException
              DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              try
                   SAXParser saxParser = factory.newSAXParser();
                   this.out = out; saxParser.parse(in, handler);
              catch (Throwable t)
                   t.printStackTrace();
         private void write (String s) throws SAXException
              try
                   out.write(s.getBytes()); out.flush();
              catch (IOException e)
                   throw new SAXException("I/O error", e);
         public void startDocument () throws SAXException
              write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
              write("<ns0:mt_MappingIn xmlns:ns0=\"urn:agrp:xi:geissseb\"><TABLE>");
         public void endDocument () throws SAXException
              write("</TABLE></ns0:mt_MappingIn>");
              try { out.flush();
              catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startElement (String namespaceURI, String sName, String qName, Attributes attrs)
         throws SAXException
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if(eName.equals("set"))
                   write("<item>");
              if(eName.substring(0,6).equals("set_E"))
                   write("<item_FIELD"eName.substring(10,13)">");
         public void endElement (String namespaceURI, String sName, String qName) throws SAXException
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if(eName.equals("set"))
                   write("</item>");
              if(eName.substring(0,6).equals("set_E"))
                   write("</item_FIELD"eName.substring(10,13)">");
         public void characters (char buf[], int offset, int len)
         throws SAXException {
              String s = new String(buf, offset, len);
              write (s);
    Thank you,
    Sebastian

    Hi  Ravi, hi Raman,
    thanks so far... I did some changes in my code, but I am still having the same problem... down there you will find my new code and the source message.
    there is my new code:
    private Map map;
         private OutputStream out;
         public void setParameter (Map param)
                   map = param;
         public void execute (InputStream in, OutputStream out)
         throws com.sap.aii.mapping.api.StreamTransformationException
              DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              try
                   SAXParser saxParser = factory.newSAXParser();
                   this.out = out; saxParser.parse(in, handler);
              catch (Throwable t)
                   t.printStackTrace();
         private void write (String s) throws SAXException{
              try{
                   out.write(s.getBytes()); out.flush();
              catch (IOException e){
                   throw new SAXException("I/O error", e);
         public void startDocument () throws SAXException{
              write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
              write("<ns0:mt_mappingOUT xmlns:ns0=\"urn:agrp:xi:geissseb\"><TABLE>");
         public void endDocument () throws SAXException {
              write("</TABLE></ns0:mt_mappingOUT>");
              try { out.flush();
              catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startElement (String namespaceURI, String sName, String qName, Attributes attrs)
         throws SAXException {
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if(eName.equals("mtset"))
                   write("<item>");
              if(eName.substring(0,2).equals("se"))
                   write("<Item_FIELD_"eName.substring(13,14)">");
         public void endElement (String namespaceURI, String sName, String qName) throws SAXException {
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if(eName.equals("mtset"))
                   write("</item>");
              if(eName.substring(0,2).equals("se"))
                   write("</item_FIELD_"eName.substring(13,14)">");
         public void characters (char buf[], int offset, int len)
         throws SAXException {
              String s = new String(buf, offset, len);
              write (s);
    and there is the source message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:agrp:xi:geissseb" targetNamespace="urn:agrp:xi:geissseb">
         <xsd:element name="mt_MappingOut" type="dt_MappingOut" />
         <xsd:complexType name="dt_MappingOut">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   4c79fbb0bde711dcae43001a4b0af224
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="set">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             0b366510aeda11dcb3bb00174205b856
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="set_ELEMENT_01" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366511aeda11dcaf2600174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_02" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366512aeda11dc84d400174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_03" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366513aeda11dcbcab00174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_04" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366514aeda11dc96a300174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_05" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366515aeda11dca77700174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_06" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366516aeda11dc8f7d00174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_07" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366517aeda11dcc24b00174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_08" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366518aeda11dc92cd00174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_09" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b366519aeda11dcc9b100174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="set_ELEMENT_10" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            0b36651aaeda11dcc5a700174205b856
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    I really hope you can help me there..
    Thanks in advance..
    Sebastian

  • Problems with Java DOM Mapping

    Hi Experts,
    as part of my diploma-thesis I have to write a java DOM-Mapping, which mapps the following incoming message:
    <mt_MappingOUT>
    <set>
    <set_Element_01>...</set_Element_01>
    <set_Element_02>... </set_Element_02>
    <set_Element_03>... </set_Element_02>
    <set_Element_10>  </set_Element_10>
    </set>
    </mt_MappingOUT>
    to the following outgoinig message:
    <mt_MappingIN>
    <TABLE>
    <item>
    <item_FIELD_01>  </item_FIELD_01>
    <item_FIELD_10>  <item_FIELD_10>
    <i/tem>
    </TABLE>
    </mt_MappingIN>
    I am not a very experienced Java-Developer. You can see my code down there, which I tried to implement according to some bloggs; unfortunately the result is not what I want to have
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.SAXException;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class DOMMAPPING implements StreamTransformation{
         public static void main(String[] args) throws Exception
              try
                   FileInputStream fin =
                        new FileInputStream("C:/mt_MappingOut.xml");
                   FileOutputStream fout =
                        new FileOutputStream("C:/target.xml");
                   DOMMAPPING mapping = new DOMMAPPING();
                   mapping.execute(fin, fout);
              catch (Exception e)          {
                   e.printStackTrace();
    public void setParameter (Map param) {}
    public void execute (InputStream in, OutputStream out)
         throws com.sap.aii.mapping.api.StreamTransformationException {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              Document documentIn = null;
              DocumentBuilder builder = null;
              try {
                        builder = factory.newDocumentBuilder();
                   } catch (ParserConfigurationException e1) {
                        e1.printStackTrace();
              try {
                   Element itemNode = null;
                   NodeList[] list_f=new NodeList[10];
                   Element[] field=new Element[10];
                   documentIn = builder.parse(in);
                   Document documentOut = builder.newDocument();
                   Element rootNode = documentOut.createElementNS("urn:agrp:xi:geissseb","ns0:mt_MappingIn");
                   documentOut.appendChild(rootNode);
                   Element tableNode = documentOut.createElement("TABLE");
                   rootNode.appendChild(tableNode);
                   NodeList list_Set=documentIn.getElementsByTagName("set");
                   System.out.println(list_Set.getLength());
                   for(int j=1;j<10;j++){
                        list_f[j-1]=documentIn.getElementsByTagName("set_ELEMENT_01"+j);
                list_f[9]=documentIn.getElementsByTagName("set_ELEMENT_10");
                   //NodeList list_f01=documentIn.getElementsByTagName("f01");
                   for (int i=0;i<list_Set.getLength();i++)
                        itemNode=documentOut.createElement("item");
                        tableNode.appendChild(itemNode);
                        for(int k=0; k<10;k++){
                             Node f=list_f[k].item(i);
                             f=f.getFirstChild();
                             String str_f=f.getNodeValue();
                             Text text_f=documentOut.createTextNode(str_f);
                             field[k]=documentOut.createElement("item_FIELD_"(k1));
                             field[k].appendChild(text_f);
                             itemNode.appendChild(field[k]);
                   TransformerFactory tf = TransformerFactory.newInstance();
                   Transformer transform = tf.newTransformer();
                   transform.transform(new DOMSource(documentOut), new StreamResult(out));
                   } catch (SAXException e2) {
                        e2.printStackTrace();
                   } catch (IOException e2) {
                        e2.printStackTrace();
                   }catch (Throwable t) { throw new StreamTransformationException("error", t); }
    Unfortunately there seems to be at least one error in there because the result I get is just the following:
      <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    - <ns0:mt_MappingIn xmlns:ns0="urn:agrp:xi:geissseb">
      <TABLE />
      </ns0:mt_MappingIn>
    Below you will find my source message:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <xsd:schema targetNamespace="urn:agrp:xi:geissseb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:agrp:xi:geissseb">
      <xsd:element name="mt_MappingOut" type="dt_MappingOut" />
    - <xsd:complexType name="dt_MappingOut">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">a7a28830bebf11dc81aa001a4b0af224</xsd:appinfo>
      </xsd:annotation>
    - <xsd:sequence>
    - <xsd:element name="Set">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366510aeda11dcb3bb00174205b856</xsd:appinfo>
      </xsd:annotation>
    - <xsd:complexType>
    - <xsd:sequence>
    - <xsd:element name="f01" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366511aeda11dcaf2600174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_02" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366512aeda11dc84d400174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_03" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366513aeda11dcbcab00174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_04" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366514aeda11dc96a300174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_05" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366515aeda11dca77700174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_06" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366516aeda11dc8f7d00174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_07" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366517aeda11dcc24b00174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_08" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366518aeda11dc92cd00174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_09" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b366519aeda11dcc9b100174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
    - <xsd:element name="set_ELEMENT_10" type="xsd:string">
    - <xsd:annotation>
      <xsd:appinfo source="http://sap.com/xi/TextID">0b36651aaeda11dcc5a700174205b856</xsd:appinfo>
      </xsd:annotation>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
    When I had problems withe Java SAX Mapping, I got great hints in the forum. So I hope you can help me out again...
    Cheers Sebastian

    Here you go.
    Code
    package com.sap.test;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.apache.crimson.tree.TextNode;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.SAXException;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class DomTest {
         Document documentOut = null;
         public static void main(String[] args) throws Exception
         try
         FileInputStream fin =      new FileInputStream("test.xml");
         FileOutputStream fout = new FileOutputStream("test_out.xml");
         DomTest mapping = new DomTest();
         mapping.execute(fin, fout);
         catch (Exception e) {
         e.printStackTrace();
         public void setParameter (Map param) {}
         public void execute (InputStream in, OutputStream out)
         throws com.sap.aii.mapping.api.StreamTransformationException {
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         Document documentIn = null;
         DocumentBuilder builder = null;
         try {
         builder = factory.newDocumentBuilder();
         } catch (ParserConfigurationException e1) {
         e1.printStackTrace();
         try {
         Element itemNode = null;
         //NodeList[] list_f=new NodeList10;
         //Element[] field=new Element10;
         documentIn = builder.parse(in);
         documentOut = builder.newDocument();
         Element rootNode = documentOut.createElementNS("urn:agrp:xi:geissseb","ns0:mt_MappingIn");
         rootNode.setAttribute("xmlns:ns0", "urn:agrp:xi:geissseb");
         documentOut.appendChild(rootNode);
         Element tableNode = documentOut.createElement("TABLE");
         rootNode.appendChild(tableNode);
         NodeList list_Set = documentIn.getElementsByTagName("set");
         System.out.println(list_Set.getLength());
         for(int j = 0 ; j < list_Set.getLength() ;j++){
              Element setNode = (Element)list_Set.item(j);
              NodeList children = setNode.getChildNodes();
              for(int index = 0; index < children.getLength(); index++)
                   Node child = children.item(index);
                   if (child instanceof Element) {
                        Element element = (Element) child;
                        if(element.getNodeName().startsWith("set_ELEMENT"))
                             createItemFeildNode(tableNode,element);
         //list_f[9]=documentIn.getElementsByTagName("set_ELEMENT_10");
    //     NodeList list_f01=documentIn.getElementsByTagName("f01");
         /*for (int i=0;i<list_Set.getLength();i++)
         itemNode=documentOut.createElement("item");
         tableNode.appendChild(itemNode);
         for(int k=0; k<10;k++){
         Node f=list_f[k].item(i);
         f=f.getFirstChild();
         String str_f=f.getNodeValue();
         Text text_f=documentOut.createTextNode(str_f);
         field[k]=documentOut.createElement("item_FIELD_"(k1));
         field[k].appendChild(text_f);
         itemNode.appendChild(field[k]);
         TransformerFactory tf = TransformerFactory.newInstance();
         Transformer transform = tf.newTransformer();
         transform.transform(new DOMSource(documentOut), new StreamResult(out));
         transform.transform(new DOMSource(documentOut), new StreamResult(System.out));
         } catch (SAXException e2) {
         e2.printStackTrace();
         } catch (IOException e2) {
         e2.printStackTrace();
         }catch (Throwable t) { throw new StreamTransformationException("error", t); }
         private void createItemFeildNode(Element root, Element element) {
              String inName = element.getNodeName();
              int temp = inName.lastIndexOf('_');
              if (temp == -1)
                   return;
              String index = inName.substring(temp+1);
              String nodeName = "Item_FIELD_" + index;
              String nodeVal = element.getFirstChild().getNodeValue();
              Element newElement = documentOut.createElement(nodeName);
              Text txtNode = documentOut.createTextNode(nodeVal);
              newElement.appendChild(txtNode);
              root.appendChild(newElement);          
    Input
    <?xml version="1.0" encoding="UTF-8" ?>
    <mt_MappingOut xmlns="urn:agrp:xi:geissseb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:agrp:xi:geissseb file:/D:/Eclipse/workspace/SDN/test.xsd">
    <set xmlns="">
      <set_ELEMENT_01>E1</set_ELEMENT_01>
      <set_ELEMENT_02>E2</set_ELEMENT_02>
      <set_ELEMENT_03>E3</set_ELEMENT_03>
      <set_ELEMENT_04>E4</set_ELEMENT_04>
      <set_ELEMENT_05>E5</set_ELEMENT_05>
      <set_ELEMENT_06>E6</set_ELEMENT_06>
      <set_ELEMENT_07>E7</set_ELEMENT_07>
      <set_ELEMENT_08>E8</set_ELEMENT_08>
      <set_ELEMENT_09>E9</set_ELEMENT_09>
      <set_ELEMENT_10>E10</set_ELEMENT_10>
      </set>
      </mt_MappingOut>
    Output
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:mt_MappingIn xmlns:ns0="urn:agrp:xi:geissseb">
    <TABLE>
      <Item_FIELD_01>E1</Item_FIELD_01>
      <Item_FIELD_02>E2</Item_FIELD_02>
      <Item_FIELD_03>E3</Item_FIELD_03>
      <Item_FIELD_04>E4</Item_FIELD_04>
      <Item_FIELD_05>E5</Item_FIELD_05>
      <Item_FIELD_06>E6</Item_FIELD_06>
      <Item_FIELD_07>E7</Item_FIELD_07>
      <Item_FIELD_08>E8</Item_FIELD_08>
      <Item_FIELD_09>E9</Item_FIELD_09>
      <Item_FIELD_10>E10</Item_FIELD_10>
      </TABLE>
      </ns0:mt_MappingIn>

  • Schema validation problems

    Dear all,
    I am developing a EJB as the adapter module for the data validaion of the sender message on XI.
    Because of the limit of accessing external website I can't implement the validation by parsing the payload
    against the external XSD.
    Therefore I am trying to implement the validation by parsing the payload against the internal DTD instead of the external XSD or the external DTD.
    Please advise me how to convert the external XSD as the internal DTD into the payload before the
    payload is parsed.
    Thanks & Regards,
    Red

    Also you can find sample code on the site below.
    Please eliminate unused code and then use it.
    Also do the required System property setting which is already there in the code.
    (And do clear it after setting & using the system property)
    http://knowhowsapxi.synthasite.com/modules-in-sap-xi.php
    PS: The code is using SAX mapping to create the required source structure in message mapping of XI
    Edited by: Progirl Progirl on Nov 26, 2008 4:43 PM

  • Problem in SAX Java mapping

    Hi,
    I'm using SAX Java mapping in one scenario. Problem is when I get some Croatina characters, like Đ or u0160,
    output XML is not valid. XML Spy complains, IE complains and so on. Customer is sure  that data ( XML in CLOB field in Oracle DB) is UTF-8? What could be a problem?
    What I'm doing is reading entire XML into string with help of BufferedReader, then do some manipulation and write String into byte array with:
                   byte[] bytes = file.toString().getBytes("UTF-8");
                   saxParser.parse(new ByteArrayInputStream(bytes), handler);
    and then of course parse XML. readLine method reads data and problematic is "Ä�" - ￯0 - 0xC490.
    For this character XML Spy doesn't complain, IE also. After conversion, this character looks like "Ä?" - 0xC43F, and this is not good any more. Why?

    Hi Stefan,
    I've finally done it. Code as foollws:
         public void execute(InputStream in, OutputStream out)
                   throws com.sap.aii.mapping.api.StreamTransformationException {
              DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              try {
                   SAXParser saxParser = factory.newSAXParser();
                   fStreamOut = new BufferedWriter(new OutputStreamWriter(out, "UTF-8"));
                   encoding = "UTF-8";
                   if (map != null) {
                        mappingTrace = (MappingTrace) map
                                  .get(StreamTransformationConstants.MAPPING_TRACE);
                   InputStreamReader is = new InputStreamReader(in, "UTF8");
                   BufferedReader reader = new BufferedReader(is);
                   StringBuffer file = new StringBuffer();
                   String line = new String();
                   try {
                        while ((line = reader.readLine()) != null) {
                             file.append(line);
                   } catch (IOException e) {
                        e.printStackTrace();
                   } finally {
                        try {
                             in.close();
                        } catch (IOException e) {
                             e.printStackTrace();
                   Date d4 = new Date();
                   file = replaceREGEX(
                             "<\\?xml version=\"1\\.0\" encoding=\"UTF-8\"\\?>", "",
                             file);
                   char[] cArray = file.toString().toCharArray();
                   Date filedat = new Date();;
                   SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS");
                   String fName = df.format(filedat) + "_El_Invoice.xml";
                   Writer out1 = new BufferedWriter(new OutputStreamWriter(
                             new FileOutputStream(fName), "UTF8"));
                   try {
                        out1.write(file.toString().toCharArray());
                        out1.close();
                   } catch (UnsupportedEncodingException e) {
                   } catch (IOException e) {
                   saxParser.parse(fName, handler);
                   File outFile = new File(fName);
                   outFile.delete();
              } catch (Throwable t) {
                   if (mappingTrace != null) {
                        mappingTrace.addInfo(t.toString());
                   t.printStackTrace();
    problem was also in method for writing in output stream, so I've changed it:
         private void printOutPut(String sOP) {
              try {
                      //    fStreamOut.write(sOP.getBytes());
                   fStreamOut.write(sOP);
              } catch (IOException e) {
                   e.notify();

  • Issue with mapping XML to Java using SAX API

    I am using SAX API to Map XML Documents To Java. Is it possible to differentiate the elements based on the attribute rather than localname or element name in SAX API? because I am having the below xml structure. In SAX API we are processing the element values based on start/End Element name.
    <?xml version="1.0" encoding="UTF-8"?>
    <response>
    <result name="response">
    <doc>
    <str name="art_id">192201910</str>
    <str name="title">test</str>
    <arr name="author">
    <str>Darrell Dunn</str>
    <str>William </str>
    </arr>
    <arr name="tax">
    <str>113243335</str>
    <str>233454666</str>
    </arr>
    </doc>
    <doc>
    <str name="art_id">192201911</str>
    <str name="title">test2</str>
    <arr name="author">
    <str>Darrell Dunn1</str>
    <str>William 1</str>
    </arr>
    </doc>
    </result>
    </response>
    I want to map the elements based on attributes such as
    classobj.art_id, classobj.title, classobj.tax[]. I have wriiten code below, but I am not getting the proper result.
    import org.xml.sax.;
    import org.xml.sax.helpers.;
    import java.io.;
    import java.util.;
    import common.;
    public class XmltoObjectHandler extends DefaultHandler{
    /* Creates a new instance of XmltoObjectHandler */
    public XmltoObjectHandler() {
    // Local SolrDocument object to collect
    // document XML data.
    private XmlDocument doc = new XmlDocument();
    // Local list of solr documents items...
    private Vector xmlDocuments = new Vector();
    // Local current solr document reference...
    private XmlDocument currentSolrDoc;
    // Buffer for collecting data from
    // the "characters" SAX event.
    private CharArrayWriter contents = new CharArrayWriter();
    // Override methods of the DefaultHandler class
    // to gain notification of SAX Events.
    // See org.xml.sax.ContentHandler for all available events.
    public void startElement( String namespaceURI,
    String localName,
    String qName,
    Attributes attr ) throws SAXException {
    if ( localName.equals( "doc" ) ) {
    currentXmlDoc = new XmlDocument();
    solrDocuments.addElement( currentSolrDoc );
    if( localName.equals("str"){
    for ( int i = 0; i < attr.getLength(); i++ ){
    if("art_id".equals(attr.getValue(i))){
    currentSolrDoc.art_id = contents.toString();
    if("title".equals(attr.getValue(i))){
    currentSolrDoc.title = contents.toString();
    public void endElement( String namespaceURI,
    String localName,
    String qName ) throws SAXException {
    public void characters( char[] ch, int start, int length )
    throws SAXException {
    contents.write( ch, start, length );
    public Vector getxmlDocuments() {
    return solrDocuments;
    public static void main( String[] argv ){
    System.out.println( "Example4:" );
    try {
    // Create SAX 2 parser...
    XMLReader xr = XMLReaderFactory.createXMLReader();
    // Set the ContentHandler...
    XmltoObjectHandler ex4 = new XmltoObjectHandler();
    xr.setContentHandler( ex4 );
    // Parse the file...
    xr.parse( new InputSource(new FileReader( "xmlfile.xml" )));
    // Display all documents items...
    XmlDocument i;
    Vector items = ex4.getxmlDocument();
    Enumeration e = items.elements();
    while( e.hasMoreElements()){
    i = (XmlDocument) e.nextElement();
    System.out.println(i.art_id+"\n");
    System.out.println(i.title+"\n");
    }catch ( Exception e ) {
    e.printStackTrace();
    Can anybody help me how to process this type of xml. Is there any other way we can do this? I am trying for two days. It is a big deadlock for me. any help greatly appriciated. Thanks in advance.

    I added my code inside code tags...
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import java.io.*;
    import java.util.*;
    import common.*;
    public class XmltoObjectHandler extends DefaultHandler{
        /** Creates a new instance of XmltoObjectHandler */
        public XmltoObjectHandler() {
        // Local SolrDocument object to collect
        // document XML data.
        private XmlDocument doc = new XmlDocument();
        // Local list of solr documents items...
        private Vector xmlDocuments = new Vector();
        // Local current solr document reference...
        private XmlDocument currentSolrDoc;
        // Buffer for collecting data from
        // the "characters" SAX event.
        private CharArrayWriter contents = new CharArrayWriter();  
        // Override methods of the DefaultHandler class
        // to gain notification of SAX Events.
        // See org.xml.sax.ContentHandler for all available events.
        public void startElement( String namespaceURI,
                String localName,
                String qName,
                Attributes attr ) throws SAXException {
              if ( localName.equals( "doc" ) ) {
                currentXmlDoc = new XmlDocument();
                solrDocuments.addElement( currentSolrDoc );
              if( localName.equals("str"){
                   for ( int i = 0; i < attr.getLength(); i++ ){               
                    if("art_id".equals(attr.getValue(i))){
                             currentSolrDoc.art_id = contents.toString();
                        if("title".equals(attr.getValue(i))){
                             currentSolrDoc.title = contents.toString();
        public void endElement( String namespaceURI,
                String localName,
                String qName ) throws SAXException {      
        public void characters( char[] ch, int start, int length )
        throws SAXException {       
            contents.write( ch, start, length );       
        public Vector getxmlDocuments() {
            return solrDocuments;
        public static void main( String[] argv ){       
            System.out.println( "Example4:" );
            try {          
                // Create SAX 2 parser...
                XMLReader xr = XMLReaderFactory.createXMLReader();           
                // Set the ContentHandler...
                XmltoObjectHandler ex4 = new XmltoObjectHandler();
                xr.setContentHandler( ex4 );           
                // Parse the file...
                xr.parse( new InputSource(new FileReader( "xmlfile.xml" )));          
                // Display all documents items...
                XmlDocument i;
                Vector items = ex4.getxmlDocument();
                Enumeration e = items.elements();
                while( e.hasMoreElements()){
                    i = (XmlDocument) e.nextElement();
                    System.out.println(i.art_id+"\n");
                        System.out.println(i.title+"\n");
            }catch ( Exception e ) {
                e.printStackTrace();
    }

  • Getting org.xml.sax.SAXNotRecognizedException in Java mapping. Help!

    Hi Experts
       I have written a java code for schema validating XI message.
    my java code:
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import com.sap.aii.mapping.api.StreamTransformation;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class P2PValidation extends DefaultHandler implements StreamTransformation{
         private Map map;
         private OutputStream out;
         //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";
         public void setParameter (Map param){
              map = param;
         public void execute (InputStream in, OutputStream out)
         throws com.sap.aii.mapping.api.StreamTransformationException {
            DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              // Obtain an object of class javax.xml.parsers.SAXParser,
             factory.setNamespaceAware(true);
             factory.setValidating(true);
              try {
                   SAXParser saxParser = factory.newSAXParser();
                   // Setup the schema file
                   //saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                   //saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                   saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
                   saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", new File("IOReqMsgSchema.xsd"));
                  //System.out.println("Parsing");
                  this.out = out;
                   saxParser.parse(in, handler);
              catch (Exception t){
                   t.printStackTrace();
         private void write (String s) throws SAXException{
              try{
                   out.write(s.getBytes()); out.flush();
              catch (IOException e){
                   throw new SAXException("I/O error", e);
         public void startDocument () throws SAXException{
              write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
              write("<ns0:ValidInternalOrder xmlns:ns0=\"http://www.xyz.com/Gopal\">");
         public void endDocument () throws SAXException {
              write("</ns0:ValidInternalOrder>");
              try { out.flush();
              catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startElement (String namespaceURI, String sName, String qName, Attributes attrs)
         throws SAXException {
            System.out.println("sName="sName" qName="+sName);
                if(sName.equals(qName))
                   write("<"sName">");
         public void endElement (String namespaceURI, String sName, String qName) throws SAXException {
              if(sName.equals(qName))
                   write("</"sName">");
         public void characters (char buf[], int offset, int len)
         throws SAXException {
              String s = new String(buf, offset, len);
              write (s);
         public void error(SAXParseException se) throws SAXException {
              throw se;
    But when I run the code in my local machine or in Xi i am getting the error:
    org.xml.sax.SAXNotRecognizedException:
            at com.inqmy.lib.xml.parser.SAXParser.setProperty(SAXParser.java:111)
            at com.inqmy.lib.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:51
            at P2PValidation.execute(P2PValidation.java:38)
    What is wrong with the properties I have set for schema validatation?
    //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";
    Kindly help me understand how to correct this error. What are the correct values for properties?
    Please help! URGENT!!!
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Mar 4, 2008 12:45 PM

    Hi Gabriel,
       I have already seen that link but did not get any solution yet.
      Please help me!
    -Gopal

  • 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
    &amp;
    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

  • In Java Mapping Whether to SAX or DOM ?

    While implementing Java Mapping which of the following SAX , DOM parsers  is the most efficient way to implement it.
    I mean considering the voulume of data in the XML format is large which  usage will give me most  optimal performance .
    It would be nice if someone could give a sample most  optimal java code using JAXP where  input stream is read  and after  processing written to  output stream.
    regards
    Nilesh Taunk.

    Hi Nilesh,
    >>>While implementing Java Mapping which of the following SAX , DOM parsers is the most efficient way to implement it.
    there's no one good answer fot this question
    except: it depends:)
    SAX and DOM are a little different parsers
    so it depends what will your java mapping
    have to do: if it will change the
    structure or maybe it will only change a few tags,
    or maybe it will do something else
    have a look at the page below to read a simple
    comparision between SAX and DOM
    http://www.scit.wlv.ac.uk/~jphb/cp2101/week4/XML_Parsing.html
    or this thread:
    http://www.biglist.com/lists/xsl-list/archives/200301/msg01318.html
    they will give you some idea which one to choose
    depending on your requirements
    BTW
    remember use java mappings only
    if you cannot use graphical mapping (very easy debugging)
    and if your document cannot be parsed (maybe huge documents)
    with XSLT which is supported by many graphilal tools
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • 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

  • SAX-parser and mapping on the XI

    Helllo everybody,
    I'm trying to map an xml-document using the SAX-parser.
    I'm reading the data using an impustream. the problem is, while testing on the XI, the following message comes :
    Creating Java mapping xmlDataExchangeSAPSample/XMLValidation
    Loaded class xmlDataExchangeSAPSample.XMLValidation
    Loaded class xmlDataExchangeSAPSample.myErrorHandler
    Call method execute of the application Java mapping xmlDataExchangeSAPSample.XMLValidation
    START APPLICATION TRACE ***
    xxx implementierende Klasse Parserscom.sap.engine.lib.jaxp.SAXParserFactoryImpl
    erstelltes Dokument aus in EDIFACTINTERCHANGE
    Beginn Parsenjava.io.ByteArrayInputStream@1aa342a3
    SAXException when parsing Generic Exception:
    com.sap.engine.lib.xml.util.NestedException -> com.sap.engine.lib.xml.parser.ParserException -> java.io.IOException: Parsing an empty source. Root element expected!
    END APPLICATION TRACE ***
    Java mapping xmlDataExchangeSAPSample/XMLValidation completed. (execute() of xmlDataExchangeSAPSample.XMLValidation
    Ausführung war erfolgreich.
    10:18:14 Testende
    the the Document ist generated :
    "...erstelltes Dokument aus in EDIFACTINTERCHANGE.."
    but the parser find an empty source.
    do you have an idea what could be happening here?
    Kind regards

    Hi,
      <<
    xxx implementierende Klasse Parserscom.sap.engine.lib.jaxp.SAXParserFactoryImpl
    erstelltes Dokument aus in EDIFACTINTERCHANGE
    Beginn Parsenjava.io.ByteArrayInputStream@1aa342a3
    SAXException when parsing Generic Exception:
    com.sap.engine.lib.xml.util.NestedException -> com.sap.engine.lib.xml.parser.ParserException -> java.io.IOException: Parsing an empty source. Root element expected!
    >>
    This seems that u r trying parse a file rather than valid XML document..
    Usually you will notice this problem when u r trying to parse a payload which is in txt format usually when u r using File Adapter message protocol as "FILE" instead of "FCC".
    Usually SAX is an API Desinged to parse Valid XML Documents only.
    If you want to do manipulations on NON XML data better to use Java.io.InputStream & OutputStream.
    Regards,
    Rao.Mallikarjuna

  • 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

  • ** How to use TO_DATE function in Stored Proc. for JDBC in ABAP-XSL mapping

    Hi friends,
    I use ABAP-XSL mapping to insert records in Oracle table. My Sender is File and receiver is JDBC. We use Oracle 10g database. All fields in table are VARCHAR2 except one field; this is having type 'DATE'.
    I use Stored procedure to update the records in table. I have converted my string into date using the Oracle TO_DATE function. But, when I use this format, it throws an error in the Receiver CC. (But, the message is processed successfully in SXMB_MONI).
    The input format I formed like below:
    <X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">
    Value in Payload is like below.
    <X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">TO_DATE('18-11-1991','DD-MM-YYYY')</X_EMP_START_DT>
    Error in CC comes as below:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_EMP_DETAILS' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('18"
    Friends, I have tried, but unable to find the correct solution to insert.
    Kindly help me to solve this issue.
    Kind Regards,
    Jegathees P.
    (But, the same is working fine if we use direct method in ABAP-XSL ie. not thru Stored Procedure)

    Hi Sinha,
    Thanks for your reply.
    I used the syntax
    <xsl:call-template name="date:format-date">
       <xsl:with-param name="date-time" select="string" />
       <xsl:with-param name="pattern" select="string" />
    </xsl:call-template>
    in my Abap XSL.  But, its not working correctly. The problem is 'href' function to import "date.xsl" in my XSLT is not able to do that. The system throws an error. Moreover, it is not able to write the command 'extension-element-prefixes' in my <xsl:stylesheet namespace>
    May be I am not able to understand how to use this.
    Anyway, I solved this problem by handling date conversion inside Oracle Stored Procedure. Now, its working fine.
    Thank you.

Maybe you are looking for

  • Java on Jaguar problems

    I've got a 3d modelling program that is written in java and seems to have problems under the JVM on Jaguar (10.2.8 with all updates applied). When opening a new window with controls it sometimes gives me the beachball cursor and never comes back. It

  • @uncle_bear - You are still not posting any message. Help !!!

    My adobe cloud download messed up my trial premier pro and now nothing loads or works. I have windows7 64-bit and the pro was running fine untill I payed the $29.00 and everything went bad??? Help

  • Office 2007 Plugin

    Since installing the Office 2007 plugin for Livecycle Rights Management we have been experinecing a few issues. Users who when using EXCEL 2007 and scrolling with their mouse it crashes, closes and recovers document. . Also users trying to save word

  • I cannot open my facebook account on firefox, but i can open it on safari.

    Why I cannot open my facebook account on firefox? This just happens to me to day and before there are no problem logging in to my facebook account. facebook website will appear but when i attempt to open my account it won't allow me. Please help.

  • Support Services

    Hello, I had a problem in my LabVIEW application (mainly regarding is it possible to achieve the goals using the implemented approach). I emailed the project code and query using "My Support Services -> Email an Engineer -> Request Support". The appl