Error when parsing the XML document

hi all.
i have the next problem.
the sender sistem send to XI an XML. some tags send a '#' caracter.
Sender Service send:
Torre B1 - B#Unimev
when Im traying to test XML inbound, XI show the next error:
Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x14(:main:, row:1, col:992))
XML:
  <?xml version="1.0" encoding="UTF-8" ?>
- <ZDEBMAS6>
-   <IDOC BEGIN="1">
-      <EDI_DC40 SEGMENT="1">
         <TABNAM>EDI_DC40</TABNAM>
         <MANDT>300</MANDT>
         <DOCNUM>0000000000339708</DOCNUM>
         <DOCREL>640</DOCREL>
         <STATUS>30</STATUS>
         <DIRECT>1</DIRECT>
         <OUTMOD>2</OUTMOD>
       </EDI_DC40>
-      <E1KNA1M SEGMENT="1">
          <MSGFN>009</MSGFN>
          <REGIO>07</REGIO>
          <STCD1>20147972750</STCD1>
          <FITYP>01</FITYP>
          <STCDT>80</STCDT>
          <STCD3>0</STCD3>
-         <Z1KNA1M SEGMENT="1">
             <MSGFN>009</MSGFN>
              <KUNNR>0001000563</KUNNR>
              <ZZSOCRCV>3100</ZZSOCRCV>
              <ZZGBDAT>00000000</ZZGBDAT>
          <b> <ZZAD_STREET_CO>Torre B1 - B Unimev</ZZAD_STREET_CO></b>
              <ZZAD_ROOMNUM_CO>PB</ZZAD_ROOMNUM_CO>
              <ZZAD_FLOOR_CO>E</ZZAD_FLOOR_CO>
              <ZZAD_PSTCD1_CO>M5521AAR</ZZAD_PSTCD1_CO>
              <ZZAD_CITY1_CO>Mendoza</ZZAD_CITY1_CO>
              <ZZAD_REGIO_CO>07</ZZAD_REGIO_CO>
           </Z1KNA1M>
           <Z1ADRCM SEGMENT="1">
              <MSGFN>009</MSGFN>
              <KUNNR>0001000563</KUNNR>
           <b><STREET>Torre B1 - B Unimev</STREET></b>
              <FLOOR>PB</FLOOR>
              <HOUSE_NUM2>E</HOUSE_NUM2>
              <CITY1>Mendoza</CITY1>
              <POST_CODE1>5521</POST_CODE1>
              <COUNTRY>AR</COUNTRY>
              <REGION>07</REGION>
              <LANGU>S</LANGU>
          </Z1ADRCM>
      </E1KNA1M>
    </IDOC>
</ZDEBMAS6>
Message was edited by: Rodrigo Pertierra
Message was edited by: Rodrigo Pertierra

Hi Rodrigo,
Do you use a specific "encoding" like UTF-8 or ISO-8859-1 in your Sender CC.
Try changing the Transfer mode to Binary instead of Text.
Also go through these links:-
http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
Invalid char in XML from inbound IDoc
Hope this provides a solution.
Regards.
Praveen

Similar Messages

  • Unable to display tree view; Error when parsing an XML document (Premature end of file.)

    Hi folks,
    I am using a cascaded mapping in my OM. I have a graphical mapping followed by the Java mapping. It is a flat file to IDOC mapping. Everything works fine in Dev but when I transport the same objects to QA, the Operation mapping though it doesn't fail in ESR testing tool, gives the following message and there is no output generated for the same payload which is successfully tested in DEV. Please advise on what could be the possible reasons.
    Unable to display tree view; Error when parsing an XML document (Premature end of file.)

    kalyan,
    There seems to be an invalid xml payload which causes this error in ESR not generating the tree view. Please find the similar error screenshot and rectify the payload.
    Mutti

  • [IWAF JCA PeopleSoft] **** Error in parsing the input document.

    Hi,
    I configured Peoplesoft Adapter 10.1.3.1 with Oracle BPEL 10.1.3.1, I am able to invoke BPEL from Peoplesoft using JCA configurtaion. But I am not able to invoke Peoplesoft component interface from BPEL PM, Invoke call fails with following error. Did any one know solution to this issue.
    Thanks,
    Manish
    Tue, 6 Nov 2007 16:40:20.0954 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [info ] [IWAF JCA PeopleSoft] IWAFManagedConnection for PeopleSoft:Peoplesoft has listener registered: com.evermind.server.connector.ConnectionContext@b78555
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [info ] [IWAF JCA PeopleSoft] Local transaction not supported by underlying adapter.
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [info ] [IWAF JCA PeopleSoft] IWAFManagedConnection for PeopleSoft:Peoplesoft dispatch event 2
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [error] [IWAF JCA PeopleSoft] **** Error in parsing the input document.
    oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
         at com.iwaysoftware.idom.XmlDocument.parse(XmlDocument.java:120)
         at com.iwaysoftware.idom.XmlDocument.setRootXML(XmlDocument.java:77)
         at com.ibi.afjca.cci.IWAFInteraction.execProcess(IWAFInteraction.java:195)
         at com.ibi.afjca.cci.IWAFInteraction.exec(IWAFInteraction.java:136)
         at com.ibi.afjca.cci.IWAFInteraction.execute(IWAFInteraction.java:93)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:470)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:431)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:416)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:222)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:736)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:371)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3271)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1697)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5244)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1083)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:132)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:161)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:620)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiresNewInterceptor.invoke(TxRequiresNewInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeEngineBean_LocalProxy_4bin6i8.syncCreateAndInvoke(Unknown Source)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:499)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:451)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:125)
         at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:95)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:620)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at DeliveryBean_RemoteProxy_4bin6i8.request(Unknown Source)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processNormalOperation(SOAPRequestProvider.java:455)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processBPELMessage(SOAPRequestProvider.java:278)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processMessage(SOAPRequestProvider.java:129)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:869)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:460)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [error] [IWAF JCA PeopleSoft] SOS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [error] [IWAF JCA PeopleSoft] oracle.xml.parser.v2.XMLElement@1f73ac7
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [error] [IWAF JCA PeopleSoft] EOS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Tue, 6 Nov 2007 16:40:21.0204 IST - Thread[AJPRequestHandler-HTTPThreadGroup-56,5,HTTPThreadGroup] [info ] [IWAF JCA PeopleSoft] IWAFManagedConnection for PeopleSoft:Peoplesoft dispatch event 4

    Kris,
    I tried your suggestion, but it didn't help. I think the Ci jar file is getting loaded, because when I try to call any other interface whos class files are not included in CI jar file, it gives different error like "Not Authorized (90,6)Failed to execute PSSession request Cannot find Component Interface {LACATION_TABLE} (91,2)".
    We verified all the configuration on Adapter and Peoplesoft aerver, every thing seems to be absolutely fine, even I turned on debug log level for adapter but that is not of any use.
    I tried searching on the google, it seems many people who used Component Interface Java Classes faced such type of problem, they recommended some peoplesoft configuration, I tried their suggestions as well, but that also didn't work out.
    Even though we are using Peoplesoft 8.4 Adapter asks for pstools.properties file whenever the BPEL Process is invoked, this file is there in the adapters lib directory, and jca-app-adapter directory, see below the log.
    <2007-11-26 18:33:17,656> <INFO> <collaxa> <ServerManager::loadProcesses> Done loading processes for all domains
    <2007-11-26 18:35:13,296> <INFO> <default.collaxa.cube.ws> <AdapterFramework::Outbound> http://192.168.133.164:8888/orainfra/wsil/adapters/applications/CI_PERSONAL_DATA_invoke.wsdl?wsdl [ CI_PERSONAL_DATAPortType::CI_PERSONAL_DATA(input_CI_PERSONAL_DATA,output_CI_PERSONAL_DATA) ] - Using JCA Connection Pool - max size = <unbounded>
    <2007-11-26 18:35:13,312> <WARN> <default.collaxa.cube.ws> <AdapterFramework::Outbound> http://192.168.133.164:8888/orainfra/wsil/adapters/applications/CI_PERSONAL_DATA_invoke.wsdl?wsdl [ CI_PERSONAL_DATAPortType::CI_PERSONAL_DATA(input_CI_PERSONAL_DATA,output_CI_PERSONAL_DATA) ] - Unable to provide Log4j handle to com.ibi.afjca.cci.IWAFConnectionFactory via <public void setLog4jLogger(org.apache.log4j.Logger logger)> due to: com.ibi.afjca.cci.IWAFConnectionFactory.setLog4jLogger(org.apache.log4j.Logger)
    Mon, 26 Nov 2007 18:35:13.0312 IST - Thread[HTTPThreadGroup-59,5,HTTPThreadGroup] [debug] [IWAF JCA] IWAFConnectionFactory:getConnection called with ConnectionSpec:
    User :null
    Password :null
    AdapterName :PeopleSoft
    Config :PSOFT9
    Mon, 26 Nov 2007 18:35:13.0312 IST - Thread[HTTPThreadGroup-59,5,HTTPThreadGroup] [debug] [IWAF JCA] IWAFConnectionFactory:getConnection called with ConnectionSpec:
    User :null
    Password :null
    AdapterName :PeopleSoft
    Config :PSOFT9
    Mon, 26 Nov 2007 18:35:13.0312 IST - Thread[HTTPThreadGroup-59,5,HTTPThreadGroup] [debug] [IWAF JCA] IWAFManagedConnectionFactory:createManagedConnection() entered.
    Mon, 26 Nov 2007 18:35:13.0312 IST - Thread[HTTPThreadGroup-59,5,HTTPThreadGroup] [debug] [IWAF JCA] setLogWriter() gets called.
    07/11/26 18:35:14 PSProperties not loaded from file. Couldn't find file: pstools.properties
    07/11/26 18:35:18 PSProperties not loaded from file. Couldn't find file: pstools.properties
    07/11/26 18:39:12 PSProperties not loaded from file. Couldn't find file: pstools.properties
    07/11/26 18:51:38 PSProperties not loaded from file. Couldn't find file: pstools.properties
    Thanks,
    manish
    Message was edited by:
    user604262

  • Error in parsing the input document

    Dear All
    When I am trying to fetch data from SAP thro OracleAS with BPEL , I am getting this error. I dont know whee i did worng, Pl. clarify me if any body know this....
    <summary>
    http://127.0.0.1:8888/orainfra/wsil/adapters/applications/GetDetail_invoke.wsdl?wsdl [ GetDetailPortType::GetDetail(input_GetDetail,output_GetDetail) ] - WSIF JCA Execute of operation 'GetDetail' failed due to: Error in parsing the input document.; nested exception is:
         javax.resource.ResourceException: Error in parsing the input document.
    </summary>

    Sir,
    From the JCA Log I got the below message
    Tue, 1 Jul 2008 18:30:43.0220 IST - Thread[HTTPThreadGroup-56,5,HTTPThreadGroup] [error] [IWAF JCA SAP] Error in processing the input document.
    getMessage(): java.lang.Exception: Function module inputVariable does NOT exist.
    int getError(): Server
    getAdapterCode(): null
    getVendorThrowable(): null
    Also i am not giving my input in xml format. when i am running the bpel console its asking for input in html format , there im giving my input, after urs question only im doubting on my input. how can i give my input in which format, how to defin that format. pl. give me yours views and also i will try myself.

  • Getting Adobe Lifecycle Error when opening the pdf document to provide comments

    Hi All,
    I am getting AdobeLifeCycle Error message when I am trying to give comments in the pdf document.
    I have a workaround in place for the same but I want a permanent fix.
    PFB the workaround for the same:
    1.Delete the Adobe folder from the users local profile, under the following folders:
    C:\Users\”login”\AppData\local
    C:\Users\”login”\AppData\locallow
    C:\Users\”login”\AppData\Roaming
    2.Delete the contents of the temp file on the C Drive
    Please let me know if some one has faced this issue and have been successful in finding a permanent fix.
    Thanks & Regards,
    Aniket Deshmukh

    PFB the error message:
    Adobe LiveCycle Review Connector - File Not Found’

  • Error when reversing the Billing document,

    Hi,
          I cancelled a billing document but it was never passed to accouting because the period is closed as the original billing document period is closed.Can i change the billing document that got cancelled for todays date so it can post to the accouting.Please let me know the options.I know i can reverse the transaction in AR but do i have options doing it from SD
    Thanks.
    Sri

    Hi
    We have a option to change the billing documnet date under header details.
    1) Go  to VF02
    2) Enter billing document date
    3) Go to header deatils and change the billing date to current billing date
    4) save the document.
    Pts if ur problem gets solved
    RGDS
    B.JAGANATH

  • Servlets and XML - How to Parse the XML Document?

    I would like to create a servlet, which when accessed, will retrieve an
    XML file remotely over the Internet, and parse it to the browser's
    screen.
    Can anyone point to example code that will help me along?
    Thanks.

    Cross post:
    http://forum.java.sun.com/thread.jspa?threadID=5114779&messageID=9391940#9391940

  • JavaMapping in PI 7.1 Error:Unable to display tree view; Error when parsing

    hi,
    i get by testing in PI 7.1 (operation mapping) this ERROR:
    "Unable to display tree view; Error when parsing an XML document (Content is not allowed in prolog.)"
    this is my java-programm-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.*;
    /*IMPORT statement imports the specified classes and its methods into the program */
    /Every Java mapping program must implement the interface StreamTransformation and its methods execute() and setParameter() and extend the class DefaultHandler./
    public class Mapping extends DefaultHandler implements StreamTransformation {
    Below is the declaration for all the variables we are going to use in the
    subsequent methods.
         private Map map;
         private OutputStream out;
         private boolean input1 = false;
         private boolean input2 = false;
         private int number1;
         private int number2;
         private int addvalue;
         private int mulvalue;
         private int subvalue;
         String lineEnd = System.getProperty("line.separator");
    setParamater() method is used to store the mapping object in the variable
    "map"
         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();
    As seen above execute() method has two parameters "in" of type
    InputStream and "out" of type OutputStream. First we get a new instance
    of SAXParserFactory and from this one we create a new Instance of
    SAXParser. To the Parse Method of SaxParser, we pass two parameters,
    inputstream "in" and the class variable "handler".
    Method "write" is a user defined method, which is used to write the
    string "s" to the outpurstream "out".
         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("");
              write(lineEnd);
              write("");
              write(lineEnd);
         public void endDocument() throws SAXException {
              write("");
              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("NUMBER1"))
                   input1 = true;
              if (eName.equals("NUMBER2"))
                   input2 = true;
         public void endElement(String namespaceURI, String sName, String qName)
                   throws SAXException {
              String eName = sName;
              if ("".equals(eName))
                   eName = qName;
              if (eName.equals("NUMBER1"))
                   input1 = false;
              if (eName.equals("NUMBER2"))
                   input2 = false;
         public void characters(char[] chars, int startIndex, int endIndex)
                   throws SAXException {
              String dataString = new String(chars, startIndex, endIndex).trim();
              if (input1) {
                   try {
                        number1 = Integer.parseInt(dataString);
                   } catch (NumberFormatException nfe) {
              if (input2) {
                   number2 = Integer.parseInt(dataString);
              if (input2 == true) {
                   addvalue = number1 + number2;
                   mulvalue = number1 * number2;
                   subvalue = number1 - number2;
                   write("" + addvalue + "");
                   write(lineEnd);
                   write("" + mulvalue + "");
                   write(lineEnd);
                   write("" + subvalue + "");
                   write(lineEnd);
    in developer studio 7.1 i dont get error.
    this happens by testing the mapping-programm in ESR.
    can somebody help me please?

    Make sure that the xml created out after the java mapping is a valid xml with only one root node.
    Regards,
    Prateek

  • Issue with parsing an xml document and namespaces

    I am having an issue when parsing an xml document that includes a namespace.
    Here is my xml:
    <?xml version="1.0" encoding="utf-8"?>
    <StatusFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TxCnt="247" TxTotal="5756845.31" SourceId="3" xmlns="http://www.test.com/cig/payments/optimizer/status/2004/10/">
    <Tx PmtId="350031" Amt="16739" TxSts="09" CustSts="04" ChkNum="10605770" />
    <Tx PmtId="350990" Amt="31698.66" TxSts="09" CustSts="04" ChkNum="10605821" />
    <Tx PmtId="354992" Amt="201320.08" TxSts="09" CustSts="04" />
    <Tx PmtId="349277" Amt="6675.17" TxSts="09" CustSts="04" ChkNum="10605822" />
    <Tx PmtId="354979" Amt="66949.75" TxSts="09" CustSts="04" ChkNum="10605823" />
    <Tx PmtId="349341" Amt="63258.49" TxSts="09" CustSts="04" ChkNum="10605824" />
    <Tx PmtId="350025" Amt="5866.04" TxSts="09" CustSts="04" ChkNum="10605830" />
    <Tx PmtId="350024" Amt="15671.8" TxSts="09" CustSts="04" ChkNum="10605831" />
    <Tx PmtId="346822" Amt="9880.64" TxSts="09" CustSts="04" />
    <Tx PmtId="350023" Amt="1360" TxSts="09" CustSts="04" />
    <Tx PmtId="349802" Amt="131267" TxSts="09" CustSts="04" ChkNum="10605832" />
    <Tx PmtId="343573" Amt="14532.76" TxSts="09" CustSts="04" ChkNum="10605833" />
    <Tx PmtId="352675" Amt="4436" TxSts="09" CustSts="04" />
    <Tx PmtId="350022" Amt="1260" TxSts="09" CustSts="04" ChkNum="10605834" />
    <Tx PmtId="349714" Amt="80778" TxSts="09" CustSts="04" ChkNum="10605835" />
    <Tx PmtId="352676" Amt="10136" TxSts="09" CustSts="04" ChkNum="10605836" />
    <Tx PmtId="352679" Amt="25511.69" TxSts="09" CustSts="04" ChkNum="10605837" />
    <Tx PmtId="346502" Amt="12842.69" TxSts="10" CustSts="05" />
    <Tx PmtId="346503" Amt="4232.61" TxSts="09" CustSts="04" ChkNum="10605838" />
    </StatusFile>
    Here is my current code base:
    CREATE OR REPLACE PROCEDURE ParseXML(xml VARCHAR2) IS
    myParser xmlparser.parser := xmlparser.newparser;
    myDoc xmldom.DOMNode;
    myNodes xmldom.DOMNodeList;
    myElement xmldom.DOMElement;
    trec NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
    BEGIN
    xmlparser.parseBuffer(myParser,xml);
    myDoc := xmldom.makeNode(xmlparser.getDocument(myParser));
    myNodes := xslprocessor.selectNodes(myDoc,'//Tx');
    FOR i IN 0..xmldom.getLength(myNodes)-1 LOOP
    myElement := xmldom.makeElement(xmldom.item(buyOrders,i));
    trec.pmt_id := xmldom.getAttribute(curBuy,'PmtId');
    INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(PMT_ID) VALUES (trec.pmt_id);
    END LOOP;
    COMMIT;
    END ParseXML;
    If I remove the namespace, everything works just fine. The issue is that I cannot remove the namespace.
    Anyone have any suggestions on how I can get the xslprocessor.selectNodes to recognize my namespace?
    Thanks,
    Mark Moran

    Everyone,
    Well after lots of hours spent reading web pages and blogs, etc... I was able to re-write my procedure and get it to work with different calls.
    Here is my updated code.
    PROCEDURE PARSE_STATUS_XML(P_FILE_NAME IN VARCHAR2, P_XML_FILE IN CLOB) IS
    V_PARSER XMLPARSER.PARSER := XMLPARSER.NEWPARSER;
    V_DOCUMENT XMLDOM.DOMDOCUMENT;
    V_NODES XMLDOM.DOMNODELIST;
    V_ELEMENT XMLDOM.DOMELEMENT;
    V_TBL_RECORD NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
    BEGIN
    XMLPARSER.PARSECLOB(V_PARSER, P_XML_FILE);
    V_DOCUMENT := XMLPARSER.GETDOCUMENT(V_PARSER);
    V_ELEMENT := XMLDOM.GETDOCUMENTELEMENT(V_DOCUMENT);
    V_NODES := XMLDOM.GETELEMENTSBYTAGNAME(V_ELEMENT,'Tx','http://www.test.com/cig/payments/optimizer/status/2004/10/');
    FOR I IN 0..XMLDOM.GETLENGTH(V_NODES)-1 LOOP
    V_ELEMENT := XMLDOM.MAKEELEMENT(XMLDOM.ITEM(V_NODES,I));
    V_TBL_RECORD.PMT_ID := XMLDOM.GETATTRIBUTE(V_ELEMENT,'PmtId');
    V_TBL_RECORD.PMT_AMT := XMLDOM.GETATTRIBUTE(V_ELEMENT,'Amt');
    V_TBL_RECORD.E_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'TxSts');
    V_TBL_RECORD.E_REASON_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'StsRsn');
    V_TBL_RECORD.E_CUSTOMER_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'CustSts');
    V_TBL_RECORD.UPS_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'UpsTrcNum');
    V_TBL_RECORD.FED_REFERENCE_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FedRefNum');
    V_TBL_RECORD.FIDB_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FIDbtTrcNum');
    V_TBL_RECORD.CHECK_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'ChkNum');
    INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(
    CREATE_DATE,
    XML_FILE_NAME,     
    PMT_ID,
    PMT_AMT,
    E_STATUS_CODE,
    E_REASON_CODE,
    E_CUSTOMER_STATUS_CODE,
    UPS_TRACKING_NBR,
    FED_REFERENCE_NBR,
    FIDB_TRACKING_NBR,
    CHECK_NBR
         VALUES (
    SYSDATE,
    P_FILE_NAME,
    V_TBL_RECORD.PMT_ID,
    V_TBL_RECORD.PMT_AMT,
    V_TBL_RECORD.E_STATUS_CODE,
    V_TBL_RECORD.E_REASON_CODE,
    V_TBL_RECORD.E_CUSTOMER_STATUS_CODE,
    V_TBL_RECORD.UPS_TRACKING_NBR,
    V_TBL_RECORD.FED_REFERENCE_NBR,
    V_TBL_RECORD.FIDB_TRACKING_NBR,
    V_TBL_RECORD.CHECK_NBR
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
         RAISE;
    END PARSE_STATUS_XML;
    Mark

  • UTFDataFormatException when parsing incoming XML

    Hi,
    I am constantly seeing this message bellow when upgrade OCEP from 11.1.1.2 to 11.1.1.3 when parsing the XML from inbound JMSAdapter . Anyone knows the problem and how to fix it?
    patcherException: java.rmi.UnmarshalException: failed to unmarshal response; nested exception is:
    java.io.UTFDataFormatException
    weblogic.jms.common.JMSException: weblogic.messaging.dispatcher.DispatcherException: java.rmi.UnmarshalException: failed
    to unmarshal response; nested exception is:
    java.io.UTFDataFormatException
    at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:116)
    at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)
    at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:894)
    at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:647)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessag
    eListenerContainer.java:405)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingM
    essageListenerContainer.java:309)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMes
    sageListenerContainer.java:261)
    at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerCont
    ainer.java:59)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(D
    efaultMessageListenerContainer.java:983)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLo
    op(DefaultMessageListenerContainer.java:974)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessa
    geListenerContainer.java:876)
    at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:39)
    at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Thanks,
    Brandon

    I also got the same exception:
    I am trying to access the JMS queue from CEP application and the JMS queue are configured and populated by the OBS server.
    OSB server Version : 11g R1
    Weblogic version : 10.3.3
    CEP server Version : 11.1.1.3
    Also I disable the DMS option in both CEP and OSB server.
    In CEP Server:
    I disable DMS option in ‘startwlevs.cmd’ file in CEP domain folder as shown below.
    "%JAVA_HOME%\bin\java" %JVM_ARGS% %DGC% %DEBUG% -Doracle.dms.context=OFF
    -Dwlevs.home="%USER_INSTALL_DIR%" -Dbea.home="%BEA_HOME%" -jar
    "%USER_INSTALL_DIR%\bin\wlevs.jar" %1 %2 %3 %4 %5 %6
    :finish
    In OSB Server:
    OSB11g WLS Path : C:\Oracle11g\user_projects\domains\base_domain\bin
    File Name : startWebLogic.cmd
    if "%WLS_REDIRECT_LOG%"=="" (
    echo Starting WLS with line:
    echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Doracle.dms.context=OFF -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
    ) else (
    echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
    %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Doracle.dms.context=OFF -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS% >"%WLS_REDIRECT_LOG%" 2>&1
    Please share your suggestion

  • Getting the following error while parsing the values usng xml parser

    Hi
    I am getting the following error while parsing the values using the code in r12 instance on linux
    declare
    XML_PARSER XMLPARSER.PARSER;
    DOC XMLDOM.DOMDOCUMENT;
    DOCELEMENT DBMS_XMLDOM.DOMELEMENT;
    BEGIN
    -- NEW PARSER
    XML_PARSER := XMLPARSER.NEWPARSER;
    -- SET SOME CHARACTERISTICS
    XMLPARSER.SETVALIDATIONMODE(XML_PARSER, FALSE);
         IF P_DIR IS NOT NULL AND P_FILENAME IS NOT NULL
         THEN
         FND_FILE.PUT_LINE(FND_FILE.LOG,'DIRECTORY FOUND'||'-'||P_DIR);
         XMLPARSER.SETBASEDIR(XML_PARSER, P_DIR);     
         -- PARSE INPUT FILE
         FND_FILE.PUT_LINE(FND_FILE.LOG,'FILE FOUND'||'-'||P_FILENAME);
         XMLPARSER.PARSE(XML_PARSER, P_DIR || '/' || P_FILENAME);     
         -- GET DOCUMENT
         DOC := XMLPARSER.GETDOCUMENT(XML_PARSER);
         LOAD_SUPP(doc);
         ELSE
         DBMS_OUTPUT.PUT_LINE('DIRACTORY/FILENAME CANNOT BE NULL');
         END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('DATA NOTINSERTED'||sqlerrm);
         ROLLBACK;
    END
    I am getting the following error
    DIRACTORYL-/home/appldevORA-0000: normal, successful completion
    FILE NAME-suppliersample_data.xmlORA-0000: normal, successful completion
    DATA NOTINSERTEDORA-31001: Invalid resource handle or path name "/home/appldev/suppliersample_data.xml"
    ORA-06512: at "SYS.XDBURITYPE", line 11
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 142
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    It could be great if some one could give a suggestion/solution.
    Thanks
    Ajesh

    Besides this is not the correct forum try to google the error message first before posting:
    http://ora-29280.ora-code.com/
    cheers

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

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

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

  • JAVAMAP-Sax Parser ...............Linkage error when loading the class.

    Dear all,
    Do we have any extra things to execute the Java mapping using the Sax Parser?
    When I am executing the interface mapping ,I am getting the" Linkage error when loading the class" error.
    Kindly let me know your personnel maildId so that I can mail you the screen shots.
    Thanks,
    Srinivasa

    Dear sunil,
    Find the File.
    Source:
    <MTO_FTP_MAT_DETAILS>
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    TARGET
    MTI_FTP_MAT_DETAILS
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    Source:
    <MTO_FTP_MAT_DETAILS>
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    TARGET
    MTI_FTP_MAT_DETAILS
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import com.sap.aii.mapping.api.StreamTransformation;
    class Echo {
    public static OutputStream out;
    public class myEcho extends DefaultHandler implements StreamTransformation {
    private Map map;
    public void setParameter(Map param) {
    map = param;
    public void execute(InputStream in, OutputStream out) {
    DefaultHandler handler = this;
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    SAXParser saxParser = factory.newSAXParser();
    Echo.out = out;
    saxParser.parse(in, handler);
    } catch (Throwable t) {
    t.printStackTrace();
    public void startDocument() throws SAXException {
    try {
    Echo.out.write("<?xml version='1.0' encoding='UTF-8'?>".getBytes());
    } catch (IOException e) {
    e.notify();
    public void endDocument() throws SAXException {
    try {
    Echo.out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    public void startElement(String namespaceURI, String sName, // simple name
    String qName, // qualified name
    Attributes attrs) throws SAXException {
    String eName = sName; // element name
    if ("".equals(eName))
    eName = qName; // not namespace-aware
    if ("ns0:MTO_SAP_MAT_DETAILS".equals(qName)) {
    try {
    Echo.out.write(("<MTI_FTP_MAT_DETAILS>").getBytes());
    } catch (Exception e) {
    e.printStackTrace();
    } else {
    try {
    Echo.out.write(("<" + qName + ">").getBytes());
    } catch (Exception e) {
    e.printStackTrace();
    public void endElement(String namespaceURI, String sName, // simple name
    String qName // qualified name
    ) throws SAXException {
    String eName = sName; // element name
    if ("".equals(eName))
    eName = qName; // not namespace-aware
    if ("ns0:MTO_SAP_MAT_DETAILS".equals(qName)) {
    try {
    Echo.out.write(("</MTI_FTP_MAT_DETAILS>").getBytes());
    } catch (Exception e) {
    e.printStackTrace();
    } else {
    try {
    Echo.out.write(("</" + qName + ">").getBytes());
    } catch (Exception e) {
    e.printStackTrace();
    public void characters(char buf[], int offset, int len)
    throws SAXException {
    String s = new String(buf, offset, len);
    try {
    Echo.out.write(s.getBytes());
    } catch (Exception e) {
    e.printStackTrace();

  • The XML document builds on itself when called twice. Help!!!

    When I run the Sample program for the Oracle classgen for Java
    the XML document node repeats itself when called the second
    time. This is what I mean:
    import oracle.xml.classgen.*;
    import oracle.xml.parser.*;
    public class TestWidl
    static WIDL w1 = new WIDL();
    public static void main (String args[])
    test();
    test();
    static void test ()
    try
    DTD dtd = w1.getDTDNode();
    w1.setNAME("WIDL1");
    w1.setVERSION(WIDL.VERSION_1_0);
    SERVICE s1 = new SERVICE("Service1", "Service_URL");
    s1.setINPUT("File");
    s1.setOUTPUT("File");
    BINDING b1 = new BINDING("Binding1");
    b1.setTYPE(BINDING.TYPE_INPUT);
    BINDING b2 = new BINDING("Binding2");
    b2.setTYPE(BINDING.TYPE_OUTPUT);
    VARIABLE v1 = new VARIABLE("Variable1",
    VARIABLE.NULLOK_FALSE);
    v1.setTYPE(VARIABLE.TYPE_STRING);
    v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
    v1.setVALUE("value");
    VARIABLE v2 = new VARIABLE("Variable2",
    VARIABLE.NULLOK_TRUE);
    v2.setTYPE(VARIABLE.TYPE_STRING1);
    v2.setUSAGE(VARIABLE.USAGE_HEADER);
    VARIABLE v3 = new VARIABLE("Variable3",
    VARIABLE.NULLOK_FALSE);
    v3.setTYPE(VARIABLE.TYPE_STRING2);
    v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
    v3.setMASK("mask");
    CONDITION c1 = new CONDITION("CRef1", "CMatch1");
    c1.setSERVICE("Service1");
    c1.setTYPE(CONDITION.TYPE_SUCCESS);
    CONDITION c2 = new CONDITION("CRef2", "CMatch2");
    c2.setTYPE(CONDITION.TYPE_RETRY);
    CONDITION c3 = new CONDITION("CRef3", "CMatch3");
    c3.setSERVICE("Service3");
    c3.setTYPE(CONDITION.TYPE_FAILURE);
    REGION r1 = new REGION("Region1", "Start", "End");
    b1.addNode(r1);
    b1.addNode(v1);
    b1.addNode(c1);
    b1.addNode(v2);
    b2.addNode(c2);
    b2.addNode(v3);
    w1.addNode(s1);
    w1.addNode(b1);
    w1.addNode(b2);
    w1.validateContent();
    w1.print(System.out);
    catch (Exception e)
    System.out.println(e.toString());
    e.printStackTrace();
    The XML output looks like this:
    First Call to test():
    <?xml version = '1.0' encoding = 'ASCII'?>
    <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    <WIDL NAME="WIDL1" VERSION="1.0">
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" END="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Service1"
    TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BINDING>
    </WIDL>
    Second Call to test:
    Please note how service1 repeats itself. I would expect that
    the XML string would look like the first output:
    How can I fix this??
    <?xml version = '1.0' encoding = 'ASCII'?>
    <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    <WIDL NAME="WIDL1" VERSION="1.0">
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" END="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Service1"
    TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BINDING>
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" END="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Service1"
    TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BINDING>
    </WIDL>
    Any Help is appreciated.
    Hector.
    null

    Hector Miranda (guest) wrote:
    : When I run the Sample program for the Oracle classgen for Java
    : the XML document node repeats itself when called the second
    : time. This is what I mean:
    : import oracle.xml.classgen.*;
    : import oracle.xml.parser.*;
    : public class TestWidl
    : static WIDL w1 = new WIDL();
    : public static void main (String args[])
    : test();
    : test();
    : static void test ()
    : try
    : DTD dtd = w1.getDTDNode();
    : w1.setNAME("WIDL1");
    : w1.setVERSION(WIDL.VERSION_1_0);
    : SERVICE s1 = new SERVICE("Service1", "Service_URL");
    : s1.setINPUT("File");
    : s1.setOUTPUT("File");
    : BINDING b1 = new BINDING("Binding1");
    : b1.setTYPE(BINDING.TYPE_INPUT);
    : BINDING b2 = new BINDING("Binding2");
    : b2.setTYPE(BINDING.TYPE_OUTPUT);
    : VARIABLE v1 = new VARIABLE("Variable1",
    : VARIABLE.NULLOK_FALSE);
    : v1.setTYPE(VARIABLE.TYPE_STRING);
    : v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
    : v1.setVALUE("value");
    : VARIABLE v2 = new VARIABLE("Variable2",
    : VARIABLE.NULLOK_TRUE);
    : v2.setTYPE(VARIABLE.TYPE_STRING1);
    : v2.setUSAGE(VARIABLE.USAGE_HEADER);
    : VARIABLE v3 = new VARIABLE("Variable3",
    : VARIABLE.NULLOK_FALSE);
    : v3.setTYPE(VARIABLE.TYPE_STRING2);
    : v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
    : v3.setMASK("mask");
    : CONDITION c1 = new CONDITION("CRef1", "CMatch1");
    : c1.setSERVICE("Service1");
    : c1.setTYPE(CONDITION.TYPE_SUCCESS);
    : CONDITION c2 = new CONDITION("CRef2", "CMatch2");
    : c2.setTYPE(CONDITION.TYPE_RETRY);
    : CONDITION c3 = new CONDITION("CRef3", "CMatch3");
    : c3.setSERVICE("Service3");
    : c3.setTYPE(CONDITION.TYPE_FAILURE);
    : REGION r1 = new REGION("Region1", "Start", "End");
    : b1.addNode(r1);
    : b1.addNode(v1);
    : b1.addNode(c1);
    : b1.addNode(v2);
    : b2.addNode(c2);
    : b2.addNode(v3);
    : w1.addNode(s1);
    : w1.addNode(b1);
    : w1.addNode(b2);
    : w1.validateContent();
    : w1.print(System.out);
    : catch (Exception e)
    : System.out.println(e.toString());
    : e.printStackTrace();
    : The XML output looks like this:
    : First Call to test():
    : <?xml version = '1.0' encoding = 'ASCII'?>
    : <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    : <WIDL NAME="WIDL1" VERSION="1.0">
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" END="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1"
    SERVICE="Service1"
    : TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BINDING>
    : </WIDL>
    : Second Call to test:
    : Please note how service1 repeats itself. I would expect that
    : the XML string would look like the first output:
    : How can I fix this??
    : <?xml version = '1.0' encoding = 'ASCII'?>
    : <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    : <WIDL NAME="WIDL1" VERSION="1.0">
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" END="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1"
    SERVICE="Service1"
    : TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BINDING>
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" END="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1"
    SERVICE="Service1"
    : TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BINDING>
    : </WIDL>
    : Any Help is appreciated.
    : Hector.
    Move
    WIDL w1 = new WIDL();
    out of test() and modify it as
    public class TestWidl
    static WIDL w1 = new WIDL(); ...
    and this will work.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Opatch error 'Unable to parse the xml file'

    Hi there,
    I am new to installing patches on Oarcle and I need to install patch 12375678 on my windows system, Oracle 11.2.0.2.
    I have followed the instructions in the readme.txt file, but got this error and I have not come across anywhere on the web that explain how I could fix it.
    Could you please advise?
    Thanks
    C:\>set oracle_home=C:\oracle\product\11.2.0\dbhome_1
    C:\>echo %oracle_home%
    C:\oracle\product\11.2.0\dbhome_1
    C:\>cd C:\oracle\product\11.2.0\dbhome_1\inventory\oneoffs\12375678
    C:\oracle\product\11.2.0\dbhome_1\inventory\oneoffs\12375678>opatch apply
    Invoking OPatch 11.2.0.1.1
    Oracle Interim Patch Installer version 11.2.0.1.1
    Copyright (c) 2009, Oracle Corporation. All rights reserved.
    Oracle Home : C:\oracle\product\11.2.0\dbhome_1
    Central Inventory : C:\Program Files\Oracle\Inventory
    from : n/a
    OPatch version : 11.2.0.1.1
    OUI version : 11.2.0.2.0
    OUI location : C:\oracle\product\11.2.0\dbhome_1\oui
    Log file location : C:\oracle\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2
    012-05-21_15-28-52PM.log
    Patch history file: C:\oracle\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch_
    history.txt
    ApplySession applying interim patch '12375678' to OH 'C:\oracle\product\11.2.0\d
    bhome_1'
    Running prerequisite checks...
    OPatch detected non-cluster Oracle Home from the inventory and will patch the lo
    cal system only.
    Backing up files and inventory (not for auto-rollback) for the Oracle Home
    Backing up files affected by the patch '12375678' for restore. This might take a
    while...
    Backing up files affected by the patch '12375678' for rollback. This might take
    a while...
    Patching component oracle.rdbms, 11.2.0.2.0...
    Copying file to "C:\oracle\product\11.2.0\dbhome_1\rdbms\xml\xsl\kuexttbl.xsl"
    Patching component oracle.rdbms.dbscripts, 11.2.0.2.0...
    Copying file to "C:\oracle\product\11.2.0\dbhome_1\rdbms\admin\prvtbpd.plb"
    Copying file to "C:\oracle\product\11.2.0\dbhome_1\rdbms\admin\prvtbpw.plb"
    ApplySession adding interim patch '12375678' to inventory
    Interim Patch metadata parsing failure... 'Unable to parse the xml file.'
    ApplySession failed: ApplySession failed in system modification phase... 'Unable
    to create patchObject'
    OPatch will attempt to restore the system...
    Restoring the Oracle Home...
    OPatch was able to restore your system. Look at log file and timestamp of each f
    ile to make sure your system is in the state prior to applying the patch.
    OPatch failed with error code = 73

    your actions.xml must not be able to be read.
    open it in notepad yourself to see does it open, if so its not corrupt, if doesnt open download patch again.
    More then likely will be fine so try locate the patch in a shorter home path, like c:\patches\12375678 and see does it install from there.
    Only other thing I can think of is the main inventory.xml, usually c:\program files\oracle\inventory\inventory.xml
    try notepad with that too.

Maybe you are looking for

  • Spry collapsible panel fix for IE

    hey anyone out there knows how to fix the spry collapsible panels to work properly on IE ? Firefox is perfect  but  they appear and stay open even when clicked how could i make them appear closed and open only if clicked, close again when clicked to

  • Can't access EJB deployed on remote OC4J - what am I doing wrong?

    I'm unable to access an EJB deployed on a remote OC4J instance (ie, part of a 9iAS installation on another machine vs local in JDeveloper). I've reverted to a stupid-simple EJB in hopes of getting it going prior to trying my actual code. The EJB work

  • Dialtone when trying to turn my Sennheiser headset on. Also doesn't let me switch back to telephone

    I have a Sennheiser OfficeRunner headset using the HeadSetup software and the automatic handset lifter. For the past 6 months it's worked FLAWLESSLY: When I would remove the headset from the base, the headset would be in PC Audio mode. When not on th

  • How does relative RPATH work ?

    Hi, I'm using ld 5.8-1.294 on solaris 8. I have a shared object with the following traits: - run location: /net/A/B/C/D/E/libx.so - install location: /net/a/b/c/libx.so - dynamically depends on: /net/a/x/y/liby.so If I need the runtime loader to find

  • Weather in the IOS 7 Notification Center

    Am I missing something, why isn't weather showing up in the notification Center of IOS7?