How do I remove xml encoding?

Hi,
Is it possible to remove xml encoding?
From
<?xml version="1.0" encoding="UTF-8"?>
To
<?xml version="1.0"?>

Hi Sander,
Try this java mapping it shoudl work
PS: I am hoping that you are in PI7.1 .. you need to import com.sap.xpi.ib.mapping.lib.jar file
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
* @author srsuraj
public class GetContent extends AbstractTransformation {
     public void execute(InputStream in, OutputStream out)
             throws StreamTransformationException {
            // Add your code here
            String inData = convertStreamToString(in);
             String outData = inData.replaceFirst("encoding=\"UTF-8\"","");
            try
            //The JAVA mapping output payload is returned using the TransformationOutput class
            // arg1.getOutputPayload().getOutputStream()
                 out.write(outData.getBytes("UTF-8"));
            catch(Exception exception1) { }
      //Un comment to test the mapping as a standalone code
     /*public static void main(String[] args) {
        try {
           //InputStream in = new FileInputStream(new File("C:\\Suraj\\eclipse-jee-ganymede-SR2-win32\\Workspace\\JavaMapping\\in.txt"));
          InputStream in = new FileInputStream(new File("C:\\Suraj\\eclipse-jee-ganymede-SR2-win32\\Workspace\\JavaMapping\\test.xml"));
           OutputStream out = new FileOutputStream(new File("out.xml"));
          GetContent myMapping = new GetContent();
           myMapping.execute(in, out);
        } catch (Exception e) {
           e.printStackTrace();
      public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException {
     getTrace().addInfo("JAVA Mapping Called");
     this.execute(arg0.getInputPayload().getInputStream(),
                          arg1.getOutputPayload().getOutputStream());     
      public String convertStreamToString(InputStream in){
     StringBuffer sb = new StringBuffer();
     try
     InputStreamReader isr = new InputStreamReader(in);
     Reader reader =
     new BufferedReader(isr);
     int ch;
     while((ch = in.read()) > -1) {
          sb.append((char)ch);}
          reader.close();
     catch(Exception exception) { }
     return sb.toString();
Regards
Suraj

Similar Messages

  • How to set the Xml Encoding ISO-8859-1 to Transformer or DOMSource

    I have a xml string and it already contains an xml declaration with encoding="ISO-8859-1". (In my real product, since some of the element/attribute value contains a Spanish character, I need to use this encoding instead of UTF-8.) Also, in my program, I need to add more attributes or manipulate the xml string dynamically, so I create a DOM Document object for that. And, then, I use Transformer to convert this Document to a stream.
    My problme is: Firstly, once converted through the Transformer, the xml encoding changed to default UTF-8, Secondly, I wanted to check whether the DOM Document created with the xml string maintains the Xml Encoding of ISO-8859-1 or not. So, I called Document.getXmlEncoding(), but it is throwing a runtime error - unknown method.
    Is there any way I can maintain the original Xml Encoding of ISO-8859-1 when I use either the DOMSource or Transformer? I am using JDK1.5.0-12.
    Following is my sample program you can use.
    I would appreciate any help, because so far, I cannot find any answer to this using the JDK documentation at all.
    Thanks,
    Jin Kim
    import java.io.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Attr;
    import org.xml.sax.InputSource;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Templates;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    public class XmlEncodingTest
        StringBuffer xmlStrBuf = new StringBuffer();
        TransformerFactory tFactory = null;
        Transformer transformer = null;
        Document document = null;
        public void performTest()
            xmlStrBuf.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n")
                     .append("<TESTXML>\n")
                     .append("<ELEM ATT1=\"Yes\" />\n")
                     .append("</TESTXML>\n");
            // the encoding is set to iso-8859-1 in the xml declaration.
            System.out.println("initial xml = \n" + xmlStrBuf.toString());
            try
                //Test1: Use the transformer to ouput the xmlStrBuf.
                // This shows the xml encoding result from the transformer which will change to UTF-8
                tFactory = TransformerFactory.newInstance();
                transformer = tFactory.newTransformer();
                StreamSource ss = new StreamSource( new StringBufferInputStream( xmlStrBuf.toString()));
                System.out.println("Test1 result = ");
                transformer.transform( ss, new StreamResult(System.out));
                //Test2: Create a DOM document object for xmlStrBuf and manipulate it by adding an attribute ATT2="No"
                DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = dfactory.newDocumentBuilder();
                document = builder.parse( new StringBufferInputStream( xmlStrBuf.toString()));
                // skip adding attribute since it does not affect the test result
                // Use a Transformer to output the DOM document. the encoding becomes UTF-8
                DOMSource source = new DOMSource(document);
                StreamResult result = new StreamResult(System.out);
                System.out.println("\n\nTest2 result = ");
                transformer.transform(source, result);
            catch (Exception e)
                System.out.println("<performTest> Exception caught. " + e.toString());
        public static void main( String arg[])
            XmlEncodingTest xmlTest = new XmlEncodingTest();
            xmlTest.performTest();
    }

    Thanks DrClap for your answer. With your information, I rewrote the sample program as in the following, and it works well now as I intended! About the UTF-8 and Spanish charaters, I think you are right. It looks like there can be many factors involved on this subject though - for example, the real character sets used to create an xml document, and the xml encoding information declared will matter. The special character I had a trouble was u00F3, and somehow, I found out that Sax Parser or even Document Builder parser does not like this character when encoding is set to "UTF-8" in the Xml document. My sample program below may not be a perfect example, but if you replaces ISO-8859-1 with UTF-8, and not setting the encoding property to the transfermer, you may notice that the special character in my example is broken in Test1 and Test2. In my sample, I decided to use ByteArrayInputStream instead of StringBufferInpuptStream because the documentation says StringBufferInputStream may have a problem with converting characters into bytes.
    Thanks again for your help!
    Jin Kim
    import java.io.*;
    import java.util.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Attr;
    import org.xml.sax.InputSource;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Templates;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    * XML encoding test for Transformer
    public class XmlEncodingTest2
        StringBuffer xmlStrBuf = new StringBuffer();
        TransformerFactory tFactory = null;
        Document document = null;
        public void performTest()
            xmlStrBuf.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n")
                     .append("<TESTXML>\n")
                     .append("<ELEM ATT1=\"Resoluci�n\">\n")
                     .append("Special charatered attribute test")
                     .append("\n</ELEM>")
                     .append("\n</TESTXML>\n");
            // the encoding is set to iso-8859-1 in the xml declaration.
            System.out.println("**** Initial xml = \n" + xmlStrBuf.toString());
            try
                //TransformerFactoryImpl transformerFactory = new TransformerFactoryImpl();
                //Test1: Use the transformer to ouput the xmlStrBuf.
                tFactory = TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer();
                byte xmlbytes[] = xmlStrBuf.toString().getBytes("ISO-8859-1");
                StreamSource streamSource = new StreamSource( new ByteArrayInputStream( xmlbytes ));
                ByteArrayOutputStream xmlBaos = new ByteArrayOutputStream();
                Properties transProperties = transformer.getOutputProperties();
                transProperties.list( System.out); // prints out current transformer properties
                System.out.println("**** setting the transformer's encoding property to ISO-8859-1.");
                transformer.setOutputProperty("encoding", "ISO-8859-1");
                transformer.transform( streamSource, new StreamResult( xmlBaos));
                System.out.println("**** Test1 result = ");
                System.out.println(xmlBaos.toString("ISO-8859-1"));
                //Test2: Create a DOM document object for xmlStrBuf to add a new attribute ATT2="No"
                DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = dfactory.newDocumentBuilder();
                document = builder.parse( new ByteArrayInputStream( xmlbytes));
                // skip adding attribute since it does not affect the test result
                // Use a Transformer to output the DOM document.
                DOMSource source = new DOMSource(document);
                xmlBaos.reset();
                transformer.transform( source, new StreamResult( xmlBaos));
                System.out.println("\n\n****Test2 result = ");
                System.out.println(xmlBaos.toString("ISO-8859-1"));
                //xmlBaos.flush();
                //xmlBaos.close();
            catch (Exception e)
                System.out.println("<performTest> Exception caught. " + e.toString());
            finally
        public static void main( String arg[])
            XmlEncodingTest2 xmlTest = new XmlEncodingTest2();
            xmlTest.performTest();
    }

  • How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?

    How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
    Hi,
    I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
    but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
    ( f.ex. cannot verifying it correct in xmlspy )
    my dbms is
    NLS_CHARACTERSET          = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET     = AL16UTF16
    NLS_RDBMS_VERSION     = 10.2.0.1.0
    I do generate it in this matter :
    declare
    xmldoc CLOB;
    ctx number ;
    utl_file.file_type;
    begin
    -- generate fom xml-view :
    ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
    DBMS_XMLGEN.setRowSetTag(ctx, null);
    DBMS_XMLGEN.setRowTag(ctx, null );
    DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
    -- create xml-file:
    xmldoc := DBMS_XMLGEN.getXML(ctx);
    -- put data to host-file:
    vblob_len := DBMS_LOB.getlength(xmldoc);
    DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
    bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
    UTL_FILE.put_line(bHandle, vbuffer, FALSE);
    UTL_FILE.fclose(bHandle);
    end ;
    maybe while work UTL_FILE there is a change the encoding ?
    How can this solved ?
    Thank you
    Norbert
    Edited by: astramare on Feb 11, 2009 12:39 PM with database charsets

    Marco,
    I tryed to work with dbms_xslprocessor.clob2file,
    that works good,
    but what is in this matter with encoding UTF-8 ?
    in my understandig, the xmltyp created should be UTF8 (16),
    but when open the xml-file in xmlSpy as UTF-8,
    it is not well ( german caracter like Ä, Ö .. ):
    my dbms is
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    NLS_RDBMS_VERSION = 10.2.0.1.0
    -- test:
    create table nh_test ( s0 number, s1 varchar2(20) ) ;
    insert into nh_test (select 1,'hallo' from dual );
    insert into nh_test (select 2,'straße' from dual );
    insert into nh_test (select 3,'mäckie' from dual );
    insert into nh_test (select 4,'euro_€' from dual );
    commit;
    select * from nh_test ;
    S0     S1
    1     hallo
    1     hallo
    2     straße
    3     mäckie
    4     euro_€
    declare
    rc sys_refcursor;
    begin
    open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
    dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
    end;
    ( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
    open in xmlSpy is:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <S0>1</S0>
    <S1>hallo</S1>
    </ROW>
    <ROW>
    <S0>2</S0>
    <S1>straޥ</S1>
    </ROW>
    <ROW>
    <S0>3</S0>
    <S1>m㢫ie</S1>
    </ROW>
    <ROW>
    <S0>4</S0>
    <S1>euro_€</S1>
    </ROW>
    </ROWSET>
    regards
    Norbert

  • Can we option or property to remove xml prolog ?xml version="1.0" encoding="UTF-8"? )  in atg server

    Hi
    i have a doubt if any one knows please let me know.
    in atg rest service(POST Request) i am sending request as xml and also i am expecting response as xml
    i have configured to get response as xml,but i want to delete xml prolog<?xml version="1.0" encoding="UTF-8"?>)  from my response can we have property to remove  xml prolog by using  atg server.
    thanks in advance
    bala

    Hello Soumya,
    Good to know it worked, I have got some doubts of using XPATH have U ever worked on that, let me know.
    Bye,
    Sam Mathew

  • How do I Remove Duplicate Presets from Media Encoder?

    I accidentally imported multiple presets for Apple ProRes. Now I have duplicate versions of each version of ProRes in Media Encoder.  How do I remove them?  The 'delete' button (the minus sign) won't even activate (it remains greyed out).

    Manually delete them from the AME Presets folder.
    Which version of AME and operating system?
    where Adobe Media Encoder CS4 presets are saved? : Adobe After Effects

  • Remove XML Declaration

    Hi,
    I am transforming some XML using Transformer class. I get the following output:
    XML Document transformed to:
    <?xml version="1.0" encoding="UTF-8"?>
    <VOTBEndpoint schemaVersion="1.00"><a n="id" v="jobmanager.fork" /><a n="Username" v="UserX" /><a n="spool.directory" v="/tmp" /></VOTBEndpoint>I don't want the first tag the, <?xml?>, does it have to stay in this document as I want very lightweight output, every byte counts.
    I thought the statements:
    Transformer transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(xsltView));
                 transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes")
    // Run the transformation
    JDOMSource source = new JDOMSource(doc);
    JDOMResult result = new JDOMResult();
    transformer.transform(source, result);
    //Return transformed document
    return result.getDocument();I thought this code would have produced the output I wanted. If the XML tag must stay do you know how I can remove the carriage return the docuement places after this statement as I later convert the JDOM document to a string using XMLOutputter - it is really this stary \n that is cauing major issues - I could live with th e<xml> tag.
    Cheers -

    Hi Thanks for your response,
    Sorry I couldn't reply earlier I now have:
    Transformer transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(xsltView));
    transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
    transformer.setOutputProperty(OutputKeys.STANDALONE, "yes");With both these declarations is still get the following output:
    <?xml version="1.0" encoding="UTF-8"?>
    <VOTBEndpoint schemaVersion="1.00"><a n="id" v="jobmanager.fork" /><a n="Username" v="UserX" /><a n="spool.directory" v="/tmp" /></VOTBEndpoint>I'll explain why this is annoying - this XML gets turned into a string using XMLOutputter then transported over the network using a messaging system (capable of transporting string values). Once this message gets to it's destination it needs to be reconverted to XML.
    This <XML> tag the transformer inserts has carriage returns after it which is casuing a problem so I figure I have two options:
    * Stop the <XML> tag from being outputted and then reconvert with SAX Builder
    * Once XML converted to a String remove the carriage returns manually using String.replace (NOTE: tried this method and transports fine but wont reconvert to XML using SAXBuilder. Exception occurs with message XML Construction Failed)
    If you can help with either - stop XML tag appearing or explain why the SAX Builder at the destination cannot convert back to XML i'd be most grateful!
    XML SAX cannot convert below (after option 1: manually removed carriage returns, all one line):
    <?xml version="1.0" encoding="UTF-8"?>
    <VOTBEndpoint schemaVersion="1.00"><a n="id" v="jobmanager.fork" /><a n="Username" v="UserX" /><a n="spool.directory" v="/tmp" /></VOTBEndpoint>And here is the code I'm using to convert:
    public String getMessageXMLAttributeValue(String attributeName) throws Exception{
              SAXBuilder builder = new SAXBuilder();
              XMLOutputter out = new XMLOutputter();
             try {
                  Document doc = builder.build(getMessageXMLPayload()); //here is where error is occurring!! method returns string value to build
                  out.outputString(doc);//debug
                  String val = (String) XPath.selectSingleNode(doc, "//a[@n='id']/@v");//this would be the attributreName field but just testing
              System.out.println(attributeName + " Attribute xpath'd as " + val);
                  return val;
              } catch (JDOMException ex) {
                   ex.printStackTrace();
                   return null;
              } catch (Exception ex){
                   ex.printStackTrace();
                   throw new Exception("Unspecfied Exception occurred: getSchemaAttribute " + attributeName);
         }

  • How can I remove *standalone="yes"*  and include xmlns:xsd and xsi in root

    Using JAXB 2.1 for the first time. Was wondering how I would remove standalone="yes" from <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> And also how can I add xmlns:xsd="http://www.w3.org/2001/XMLSchema" and to the root element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    JAXBContext jaxbContext = JAXBContext.newInstance( "com.a.b" );
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setSchema(schema);
    ObjectFactory factory = new ObjectFactory();
    A a = factory.createA();
    JAXBElement<A> root = factory.createRoot(a);

  • How to avoid priniting xml version... tag in output

    hi,
    I'm transforming an xml using xsl using output method="text". Not it is giving the something like the following tag in the top of output file.
    <?xml version='1' encoding='UTF 8'?>
    How can i remove this tag from not being printed.
    A solutionasap will help us to proceed without hitches in our project.
    thanx
    Arun
    null

    Hi !
    I've got the same problem, I'm using Jdeveloper build 915. My xml is like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <SERVICE DISPLAYNAME="Aktiekurser" LONG_DESCRIPTION="Aktiekurser med slutkurser">
    <PARAMETERS>
    <STOCK NAME="STOCKTICKER" DISPLAYNAME="Aktie kod" DISPLAYTYPE="TEXT">
    <UPPERLIMIT NAME="MAX" DISPLAYNAME="Max " DISPLAYTYPE="TEXT"/>
    <LOWERLIMIT NAME="MIN" DISPLAYNAME="Min" DISPLAYTYPE="TEXT"/>
    <CLOSE NAME="CLOSE" DISPLAYNAME="Stangningskurs" DISPLAYTYPE="CHECKBOX"/>
    </STOCK>
    </PARAMETERS>
    </SERVICE>
    and my xsl
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
    <xsl:template match="SERVICE">
    <xsl:value-of select="@LONG_DESCRIPTION"/>
    <xsl:element name="TABLE">
    <xsl:apply-templates/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="PARAMETERS/*">
    <xsl:element name="TR">
    <xsl:element name="TD">
    <xsl:value-of select="@DISPLAYNAME"/>
    <INPUT TYPE="{@DISPLAYTYPE}" NAME="{@NAME}" />
    </xsl:element>
    </xsl:element>
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="/SERVICE/PARAMETERS/*/*">
    <xsl:element name="TD">
    <xsl:value-of select="@DISPLAYNAME"/>
    <INPUT TYPE="{@DISPLAYTYPE}" NAME="{@NAME}" />
    </xsl:element>
    </xsl:template>
    </xsl:stylesheet>
    I get
    <?xml version = '1.0' encoding = 'UTF-8'?>
    as the first row from the xsl-transform.
    null

  • HOW DO I REMOVE AN APPLICATION IN WLS6?

    Hi everybody,
    I compiled an ejb into a jar file and ADDED it to the list of already
    added applications through the WLS6 console (I have WLS6 installed on my Windows
    2000 machine).
    In the WLS6 console I clicked Deployments->EJB->Install a new EJB->Upload
    (to add a new ejb jar file).
    Now I wish to REMOVE (uninstall) this ejb from the list of added
    (installed) EJBs.
    I tried to delete the jar file from the WebLogic folder where this
    jar file was stored, but when I restarted WLS6 it displayed a panic that it was
    unable to find the EJB component. So I had to undelete the jar file from the Recycle
    Bin to the same WebLogic folder.
    What I conclude is that although the ejb component got removed it
    did not get UNINSTALLED .i.e some references to the jar file stayed on somewhere.
    How do I remove and UNINSTALL my ejb?
    Thanks in advance. As usual I am posting this everywhere to get attention.
    As usual sorry for the multiple postings.
    snodx

    Hello,
    To remove it for good, you have to make sure you remove the .jar/.war/.ear
    from the applications directory, and then modify the config.xml file.
    To modify the config.xml file, make sure the admin server is not running,
    and remove the <application> section that refers to the .jar/.war/.ear file
    you no longer want to show up. When you restart the server, that
    application will no longer show up in the console.
    Of course, I must warn about modifying the config.xml file by hand. It's
    not a recommended practice, but in this case, it's the only way to
    accomplish this.
    Regards,
    dennis
    "snodx" <[email protected]> wrote in message
    news:3b5be01d$[email protected]..
    >
    Hi everybody,
    I compiled an ejb into a jar file and ADDED it to the list ofalready
    added applications through the WLS6 console (I have WLS6 installed on myWindows
    2000 machine).
    In the WLS6 console I clicked Deployments->EJB->Install a newEJB->Upload
    (to add a new ejb jar file).
    Now I wish to REMOVE (uninstall) this ejb from the list ofadded
    (installed) EJBs.
    I tried to delete the jar file from the WebLogic folder wherethis
    jar file was stored, but when I restarted WLS6 it displayed a panic thatit was
    unable to find the EJB component. So I had to undelete the jar file fromthe Recycle
    Bin to the same WebLogic folder.
    What I conclude is that although the ejb component gotremoved it
    did not get UNINSTALLED .i.e some references to the jar file stayed onsomewhere.
    >
    How do I remove and UNINSTALL my ejb?
    Thanks in advance. As usual I am posting this everywhere toget attention.
    As usual sorry for the multiple postings.
    snodx

  • HOW DO I REMOVE APPLICATIONS FROM WLS6 CONSOLE?

    Hi everybody,
    I compiled an ejb into a jar file and ADDED it to the list of already
    added applications through the WLS6 console (I have WLS6 installed on my Windows
    2000 machine).
    In the WLS6 console I clicked Deployments->EJB->Install a new EJB->Upload
    (to add a new ejb jar file).
    Now I wish to REMOVE (uninstall) this ejb from the list of added
    (installed) EJBs.
    I tried to delete the jar file from the WebLogic folder where this
    jar file was stored, but when I restarted WLS6 it displayed a panic that it was
    unable to find the EJB component. So I had to undelete the jar file from the Recycle
    Bin to the same WebLogic folder.
    What I conclude is that although the ejb component got removed it
    did not get UNINSTALLED .i.e some references to the jar file stayed on somewhere.
    How do I remove and UNINSTALL my ejb?
    Thanks in advance. As usual I am posting this everywhere to get attention.
    As usual sorry for the multiple postings.
    snodx

    Manual method:
    Stop the server. Back up anything important.
    There is a config.xml file that has an entry that points to your JAR. Delete
    this entry.
    There is your JAR file. Delete this JAR.
    There is data from/about your JAR in "do not delete" directory. Delete the
    directory that says "do not delete".
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "snodx" <[email protected]> wrote in message
    news:3b5bdc84$[email protected]..
    >
    Hi everybody,
    I compiled an ejb into a jar file and ADDED it to the list ofalready
    added applications through the WLS6 console (I have WLS6 installed on myWindows
    2000 machine).
    In the WLS6 console I clicked Deployments->EJB->Install a newEJB->Upload
    (to add a new ejb jar file).
    Now I wish to REMOVE (uninstall) this ejb from the list ofadded
    (installed) EJBs.
    I tried to delete the jar file from the WebLogic folder wherethis
    jar file was stored, but when I restarted WLS6 it displayed a panic thatit was
    unable to find the EJB component. So I had to undelete the jar file fromthe Recycle
    Bin to the same WebLogic folder.
    What I conclude is that although the ejb component gotremoved it
    did not get UNINSTALLED .i.e some references to the jar file stayed onsomewhere.
    >
    How do I remove and UNINSTALL my ejb?
    Thanks in advance. As usual I am posting this everywhere toget attention.
    As usual sorry for the multiple postings.
    snodx

  • How can I add XML metadata to simulate my application?

    I have a client application I support and I'm trying to use Dreamweaver as a tool to customize pages within the application. Each page, or report, consists of a HTM file with supporting CSS and Jscript used to render a view of data from the server that comes in the form of an XML file.  The HTM file is viewed file with the CSS / Jscript working as is, but i'm trying to determine how to get the XML payload from the server to populate the elements in the HTM file.  below is a sample of the supporting files, the first shot is the XML payload the server sends, the second shot is the client files used to create the report.  All i need to do is 'attach' the XML to the htm file in dreamweaver so i can apply changes and see how effects of my work in the design view.  Is this possible?  All these files will be client side...

    The solution from dvohra09 will output a file outXml that uses the format rules from stylesheet.
    But how can I write out the following 2 lines to outXml? contextHandler.startDocument() will only write out the first line, but not the second line...
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="mytest.xsl"?>
    Thanks for all pointers!
    Philip

  • HOw Can I remove faces from the URL

    I know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp
    Thanks in advance

    I know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp
    Thanks in advance

  • How can i remove moved and deleted old libraries?

    I've moved a bunch of my libraries around, removed some, and have installed iphoto9 on a new mac. I love that in iphoto9 I can now create new libraries or decide which library to open. But, all of my older libraries are showing up in the list when I open with "option". Plus there are duplicates of the older libraries. I'm assuming there is a db or data text file somewhere that is populating this list. Does anyone know how I can remove old defunct libraries from showing up in the list?
    Thanks,
    Bob

    Thanks Terrence. I didn't even realize all these old files still had album xml files. I appreciate your help.
    Thanks,
    Bob

  • XML encoding to UTF-8 charset - Oracle 9i

    Hi Masters
    Database Version : 9i
    Can you please help me here.. I am in a process of writing an Inventory Adjustment tool that will generate the XML and encode it to utf-8 charset…
    I have successfully written the code to generate the XML in this format
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <InvAdjustDesc>
    <dc_dest_id>323</dc_dest_id>
    <InvAdjustDtl>
    <item_id>12345678</item_id>
    <adjustment_reason_code>383</adjustment_reason_code>
    <unit_qty>4</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition/>
    <user_id>e7062159</user_id>
    <create_date>
    <year>2012</year>
    <month>10</month>
    <day>29</day>
    <hour>14</hour>
    <minute>59</minute>
    <second>25</second>
    </create_date>
    <ww_liability_code>353</ww_liability_code>
    <ww_ref_1/>
    <ww_ref_2/>
    <ww_tran_id>25863399875</ww_tran_id>
    <ww_alloc_no/>
    <ww_final_store>353</ww_final_store>
    </InvAdjustDtl>
    </InvAdjustDesc>
    And now as part of the AIT requirement this XML needs to be encoded to utf-8 and look like this
    <?xml version="1.0" encoding="UTF-8"?><RibMessages><ribMessage><family>InvAdjust</family><type>INVADJUSTCRE</type><id>54601557</id><ribmessageID>3</ribmessageID><publishTime>2012-10-29 15:03:12.000 SAST</publishTime><messageData>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;&lt;InvAdjustDesc&gt;&lt;dc_dest_id&gt;323&lt;/dc_dest_id&gt;&lt;InvAdjustDtl&gt;&lt;item_id&gt;12345678&lt;/item_id&gt;&lt;adjustment_reason_code&gt;383&lt;/adjustment_reason_code&gt;&lt;unit_qty&gt;4&lt;/unit_qty&gt;&lt;from_disposition&gt;ATS&lt;/from_disposition&gt;&lt;to_disposition/&gt;&lt;user_id&gt;e7062159&lt;/user_id&gt;&lt;create_date&gt;&lt;year&gt;2012&lt;/year&gt;&lt;month&gt;10&lt;/month&gt;&lt;day&gt;29&lt;/day&gt;&lt;hour&gt;14&lt;/hour&gt;&lt;minute&gt;59&lt;/minute&gt;&lt;second&gt;25&lt;/second&gt;&lt;/create_date&gt;&lt;ww_liability_code&gt;353&lt;/ww_liability_code&gt;&lt;ww_ref_1/&gt;&lt;ww_ref_2/&gt;&lt;ww_tran_id&gt;25863399875&lt;/ww_tran_id&gt;&lt;ww_alloc_no/&gt;&lt;ww_final_store&gt;353&lt;/ww_final_store&gt;&lt;/InvAdjustDtl&gt;&lt;/InvAdjustDesc&gt;</messageData><customFlag>F</customFlag></ribMessage></RibMessages>
    I am not quite familiar with xml encoding do you have any suggestion on how i can accomplish this?
    Thanks

    Hi Odie
    I found a way of writing the encoded xml thanks for your help my man, much appreciated...
    But now can you help me here this xml I am generating needs to be like the one at the bottom...
    Here is my SQL I am using....
    SELECT XMLELEMENT
    ("InvAdjustDesc"
    ,XMLFOREST
    (inv.dc_dest_id AS "dc_dest_id"
    ,XMLFOREST
    (NVL(inv.item_id, ' ') AS "item_id"
    ,NVL(inv.adjustment_reason_code, ' ') AS "adjustment_reason_code"
    ,NVL(inv.unit_qty, 0) AS "unit_qty"
    ,NVL(inv.from_disposition, ' ') AS "from_disposition"
    ,NVL(inv.to_disposition, ' ') AS "to_disposition"
    ,NVL(inv.user_id, ' ') AS "user_id"
    ,XMLFOREST(TO_CHAR(SYSDATE, 'yyyy') AS "year"
    ,TO_CHAR(SYSDATE, 'mm') AS "month"
    ,TO_CHAR(SYSDATE, 'dd') AS "day"
    ,TO_CHAR(SYSDATE, 'hh') AS "hour"
    ,TO_CHAR(SYSDATE, 'mi') AS "minute"
    ,TO_CHAR(SYSDATE, 'ss') AS "second"
    ) AS create_date
    ,NVL(inv.ww_liability_code, ' ') AS "ww_liability_code"
    ,NVL(inv.ww_ref_1, ' ') AS "ww_ref_1"
    ,NVL(inv.ww_ref_2, ' ') AS "ww_ref_2"
    ,NVL(inv.ww_tran_id, ' ') AS "ww_tran_id"
    ,NVL(inv.ww_alloc_no, ' ') AS "ww_alloc_no"
    ,NVL(inv.ww_final_store, ' ') AS "ww_final_store"
    ) AS InvAdjustDtl)) AS InvAdjustDesc
    FROM invadjust inv
    WHERE inv.dc_dest_id = 342
    and rownum <= 3;
    I need to have a leading <InvAdjustDesc> with a node <dc_dest_id> with repeating <InvAdjustDtl>
    I did try to put XMLAGG to group all of my <InvAdjustDtl> nodes but the output I get is two entries of <InvAdjustDtl> as follows
    <InvAdjustDesc>
    <dc_dest_id>323</dc_dest_id>
    <INVADJUSTDTL>
    <InvAdjustDtl>
    <item_id>20144791</item_id>
    <adjustment_reason_code>6</adjustment_reason_code>
    <unit_qty>-4</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition />
    <user_id>r7052891</user_id>
    <CREATE_DATE>
    <year>2012</year>
    <month>10</month>
    <day>31</day>
    <hour>10</hour>
    <minute>15</minute>
    <second>44</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751178</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </InvAdjustDtl>
    <InvAdjustDtl>
    <item_id>6009173222220</item_id>
    <adjustment_reason_code>6</adjustment_reason_code>
    <unit_qty>-1</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition />
    <user_id>r7052891</user_id>
    <CREATE_DATE>
    <year>2012</year>
    <month>10</month>
    <day>31</day>
    <hour>10</hour>
    <minute>15</minute>
    <second>44</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751179</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </InvAdjustDtl>
    <InvAdjustDtl>
    <item_id>2034180000008</item_id>
    <adjustment_reason_code>6</adjustment_reason_code>
    <unit_qty>-1</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition />
    <user_id>r7052891</user_id>
    <CREATE_DATE>
    <year>2012</year>
    <month>10</month>
    <day>31</day>
    <hour>10</hour>
    <minute>15</minute>
    <second>44</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751180</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </InvAdjustDtl>
    </INVADJUSTDTL>
    </InvAdjustDesc>cond>11</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751180</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </INVADJUSTDTL>
    </InvAdjustDesc>cond>11</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751180</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </INVADJUSTDTL>
    </InvAdjustDesc>
    --------------------------------------Desired Output___________________
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <InvAdjustDesc>
         <dc_dest_id>852</dc_dest_id>
         <InvAdjustDtl>
              <item_id>12345</item_id>
              <adjustment_reason_code>989</adjustment_reason_code>
              <unit_qty>4</unit_qty>
              <from_disposition>ats</from_disposition>
              <to_disposition>tst</to_disposition>
              <user_id>w759862</user_id>
              <create_date>
                   <year>2012</year>
                   <month>10</month>
                   <day>31</day>
                   <hour>09</hour>
                   <minute>14</minute>
                   <second>23</second>
              </create_date>
              <ww_liability_code>852</ww_liability_code>
              <ww_ref_1/>
              <ww_ref_2/>
              <ww_tran_id>12358965</ww_tran_id>
              <ww_alloc_no/>
              <ww_final_store>323</ww_final_store>
         </InvAdjustDtl>
         <InvAdjustDtl>
              <item_id>78952675</item_id>
              <adjustment_reason_code>987</adjustment_reason_code>
              <unit_qty>5</unit_qty>
              <from_disposition>ats</from_disposition>
              <to_disposition>asr</to_disposition>
              <user_id>w7889526</user_id>
              <create_date>
                   <year>2012</year>
                   <month>10</month>
                   <day>31</day>
                   <hour>09</hour>
                   <minute>15</minute>
                   <second>02</second>
              </create_date>
              <ww_liability_code>456</ww_liability_code>
              <ww_ref_1/>
              <ww_ref_2/>
              <ww_tran_id>482665226</ww_tran_id>
              <ww_alloc_no/>
              <ww_final_store>456</ww_final_store>
         </InvAdjustDtl>
    </InvAdjustDesc>

  • How to create an XML document from a String.

    Can anyone help,
         In the Microsoft XML Document DOM there is a load function load(string) which will create an XML document, but now we are switching to Java and I do not know how to create and XML document from a string, this string �xml document� is passed to my program from a webservice and I need to read several xml elements form it in a web server.
    This string is a well formatted XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <Countries NumberOfRecords="1" LanguageID="en-us">
         <Country>
              <CountryCode>AU</CountryCode>
              <CountryName>AUSTRALIA</CountryName>
         </Country>
    </Countries>

    Thanks PC!
    I made it work using:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    factory.setIgnoringComments(true); // We want to ignore comments
    // Now use the factory to create a DOM parser
    DocumentBuilder parser = factory.newDocumentBuilder();
    //TransformThisStringBuffer is a string buffer wich contain the 'XML document (String)'
    InputStream in = new ByteArrayInputStream(TransformThisStringBuffer.toString().getBytes());
    // Parse the InputStream and build the document
    Document document = parser.parse(in);
    But which one is faster InputSource or InputStream, were would you put the "new InputSource(new StringReader(yourString))" in the above code?

Maybe you are looking for

  • LiveCycle Data Services for Java EE 4.6 now available

    I'm pleased to announce the general availability of LiveCycle Data Services version 4.6. It is the latest update to the JEE or LiveCycle version of Data Services and it is a feature-rich major release, including expanded support for mobile applicatio

  • Safari does not display updated webpages

    All webpages that I have been to have not been updated since Monday, September 12th. I.e. when I go to startribune.com it shows the same content that has been there since Monday, and the history in Safari only shows the pages I have been to previous

  • Can you please help with yet "another" Sync problem?

    I have recently changed from windows xp. I have a new computer with windows 7 and I loaded Itunes 10. There have been nothing but problems with my 5th gen nano since I have changed to my new computer. I am unable to sync new songs; In the device sect

  • Automaticly exit fullscreen in browser

    Right now I have a swf that has a FLVPlayBack with full screen in a web page. Everything works great with it except that when the flv is finished playing, the player remains in full screen mode instead of automatically exiting. Is there any methods o

  • Help with archive & install

    Aloha! I hope someone can help me since I've been searching and reading these discussions all day and haven't found the answer to my problem. I updated my OS to Leopard 10.5 and began experiencing problems. I did a archive and install back to Tiger 1