Xjc throwing exception that "document not well formed"

I have the following DTD file given in the sample code saved as item.dtd
<?xml version='1.0' encoding='utf-8'?>
<!-- Simple DTD -->
<!ELEMENT item_list (item_info*)>
<!ELEMENT item_info (name, price)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT price (#PCDATA)>
and the following xjs file as given in the sample code
saved as item.xjs
<xml-java-binding-schema>
<element name="item_list" type="class" root="true"/>
<element name="item_info" type="class"/>
</xml-java-binding-schema>
now from command prompt when I run the following command, it throws the following error.
c:\Some-folder\ xjc item.dtd item.xjs
the EXCEPTION thrown is :
The markup in the document preceding the root element must be well-formed. line 4 of item.dtd
The FULL TRACE is(if anybody is interested to see).. PLEASE HELP ME OUT.
Thanks
Gagan
TRACE STARTS HERE:
parsing a schema...
The markup in the document preceding the root element must be well-formed.
line 4 of item.dtd
Exception in thread "main" ::file:///C:/RBML/xml-java/item.dtd:file:///C:/RBML/x
ml-java/item.dtd:file:///C:/RBML/xml-java/item.dtd:4:3:The markup in the document preceding the root element must be well-formed.

NO i dont think so..
as you could see the code pasted in the first instance. the only diffrence is that you are using double quotes.(I tried that as well)
I hope you are referring to item.dtd file not item.xjs file
Thanks
Gagan

Similar Messages

  • DPM 2012 R2 install fail - Reporting services "definition contains XML that is not well-formed or the XML is not valid"

    Hi Everyone,
    I've been battling with this for a while and I'm getting nowhere. I'm attempting to install DPM 2012R2 onto a fresh VM with a local SQL installation. The setup is as follows:
    Server OS: 2008R2 SP1
    SQL: 2008 R2 standard with SP3(tried SP2 before this)
    Collation: SQL_Latin1_General_CP1_CI_AS
    Reporting services installed: Yes(ticked do not configure during the installation)
    Enabled reporting servics on port 80 with the default URL
    DPM Installation does not throw any errors during the preinstall stage(The server passes all the checks)
    Basically, when Installing. I get this error(extract):
     at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.DeployFileInServer(Boolean recreate, ReportDBInfo rptInfo)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.DeployReports(String sourceFolderPath, Boolean recreate, Boolean calledFromSetup)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.InstallReports(Boolean calledFromSetup, String sourceFolderPath, String sqlServerName, String sqlInstanceName, String dbConnectionString)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.ReportingConfiguration.DeployReports(Boolean isRemoteReporting, String sqlMachineName, String sqlInstanceName, String rsMachineName, String rsInstanceName, String installerPath)
    [10/12/2014 2:35:25 p.m.] * Exception :  => Report configuration failed.Verify that SQL Server Reporting Services is installed properly and that it is running.Microsoft.Internal.EnterpriseStorage.Dls.Setup.Exceptions.BackEndErrorException: exception
    ---> Microsoft.Internal.EnterpriseStorage.Dls.Setup.Exceptions.ReportDeploymentException: exception ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.ReportingException:
    exception ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The report definition is not valid or supported by this version of Reporting Services. This could be the result of publishing a report definition of
    a later version of Reporting Services, or that the report definition contains XML that is not well-formed or the XML is not valid based on the Report Definition schema. Details: Root element is missing.
       at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
       at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Reporting.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CreateReport(String pathOfReport, ReportDBInfo rptInfo)
       --- End of inner exception stack trace ---
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CreateReport(String pathOfReport, ReportDBInfo rptInfo)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.DeployFileInServer(Boolean recreate, ReportDBInfo rptInfo)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.DeployReports(String sourceFolderPath, Boolean recreate, Boolean calledFromSetup)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.InstallReports(Boolean calledFromSetup, String sourceFolderPath, String sqlServerName, String sqlInstanceName, String dbConnectionString)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.ReportingConfiguration.DeployReports(Boolean isRemoteReporting, String sqlMachineName, String sqlInstanceName, String rsMachineName, String rsInstanceName, String installerPath)
       --- End of inner exception stack trace ---
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.ReportingConfiguration.DeployReports(Boolean isRemoteReporting, String sqlMachineName, String sqlInstanceName, String rsMachineName, String rsInstanceName, String installerPath)
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.BackEnd.DeployReports(String reportserverConfigFilePath, Boolean isOemSetup, String sqlMachineName, String sqlInstanceName, Boolean isRemoteReporting, String reportingServerMachineName, String
    reportingInstanceName)
       --- End of inner exception stack trace ---
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.BackEnd.DeployReports(String reportserverConfigFilePath, Boolean isOemSetup, String sqlMachineName, String sqlInstanceName, Boolean isRemoteReporting, String reportingServerMachineName, String
    reportingInstanceName)
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.DpmInstaller.DeployReports(Boolean isRemoteReporting, Boolean isUpgrade)
       at Microsoft.Internal.EnterpriseStorage.Dls.Setup.Wizard.ProgressPage.InstallerThreadEntry()
    *** Mojito error was: ReportDeploymentFailed; 0; None
    [10/12/2014 2:35:25 p.m.] *** Error : Report configuration failed.
    Verify that SQL Server Reporting Services is installed properly and that it is running.
    ID: 812
    [10/12/2014 2:35:25 p.m.] Information : Data Protection Manager installation has failed. All the items that were copied during the installation process have been removed.
    For details, click the Error tab.
    Any ideas?
    I've managed to get it to this stage. Originally I didn't have encryption keys or a listening port(which I fixed).

    Can you try following steps:
    If there are SSL certificates on your computer, by default SQL 2008
    installation configures HTTPS for reporting websites. When DPM tries to
    deploy reports on these websites it may fail if the reporting websites
    are not accessible (might be due to invalid/expired certificates). To
    workaround this, provided you do not require HTTPS for reporting websites do
    the following:
    1. Edit C:\Program Files\Microsoft DPM\SQL\MSRS10.MSDPMV3BETA1EVAL\Reporting
    Services\ReportServer\rsreportserver.config
    2. Set the SecureConnectionLevel to 0 if the current value is 2 (A value to
    2 means secure connection is required)
    3. Connect to SQL reporting service configuration manager and connect to the
    instance MSDPMV3BETA1EVAL
    4. Click on Web Service URL, click advanced and remove SSL identities
    5. Repeat the above for Report Manager URL
    6. Make sure report manager URL and web service URL are accessible with out
    any errors.
    6. Restart report server
    If that doesn't solve the problem, please try following steps:
    1. Open Start-> All programs->SQL server 2008->Configuration Tools->Report
    Server Configuration Manager
    2. Connect to the instance which the DPM is using to install.
    3. Browse Report Manager URL and web service url
    4. If report manager URL or web service url throws any error say 500 or 404
    fix the error. (Try also replacing machine name with localhost in url)
    5. Otherwise delete DPMReports folder (if present) using below instructions
    6. Restart reporting services
    7. Try DPM setup again.
    Deleting DPM reports:
    1. Open report manager URL in IE
    2. Click show details on right hand side
    3. Put a tick against DPMReports folder
    4. Click Delete button.
    Regards, Trinadh [MSFT] This posting is provided AS IS with no warranties, and confers no rights. If you found the reply helpful, please MARK IT AS ANSWER. Looking for source of information for DPM? http://blogs.technet.com/b/dpm/ http://technet.microsoft.com/en-in/library/hh758173.aspx

  • Document not well formed

    Hi-
    one of the things i liked about java is it had a stack trace
    that went to the moon and it helped
    you find where your error is.
    if i run my code in PHP IDE it is well formed enough and
    spits out the right result.
    If i upload it to my webhost set to shared environment it
    keeps coming up document not well formed.
    I dont really understand what code causes this message as
    there is no line number.
    I tried to make sure my xml started with the xml tag and had
    a root and closing tags.
    Does flex 3 offer any more insight with diagnostic messages
    as to where the problems may
    surface from? the message seems to indicate "url loader on
    complete" .
    where would you look if you got a url loader on complete?
    i am really stuck. it is frustrating to see it work in php
    and then not on the web host :-)
    (error msg. below)
    thanks for any assistance,
    jim
    [RPC Fault faultString="Error #1088: The markup in the
    document following the root element must be well-formed."
    faultCode="Client.CouldNotDecode" faultDetail="null"]
    at mx.rpc.http::HTTPService/
    http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\dev\enterprise_bali\framewo rks\mx\rpc\http\HTTPService.as:856
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\dev\enterprise_bali\framewo rks\mx\rpc\AbstractInvoker.as:165
    at
    mx.rpc::Responder/result()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:48]
    at
    mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest. as:82]
    at
    DirectHTTPChannel.as$139::DirectHTTPMessageResponder/completeHandler()[C:\dev\enterprise_ bali\frameworks\mx\messaging\channels\DirectHTTPChannel.as:359]
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    Hi-
    i think i found out why i couldnt get my code to work. the
    local machine had different things enabled that werent
    enabled on the web host for PHP. i asked the admin to enable
    PHP 5 includes the XSL extension by default and can be
    enabled by adding the argument --with-xsl[=DIR].
    it looks suspicious.
    thanks,
    jim

  • Xjc ,dtd, xjs giving problem "document not well formed"

    I have started the thread again.
    Anyway.
    I have an item.dtd file (same as in sample tutorial).. I have reduced some components to simplify..when it was not working
    item.dtd file:
    <!ELEMENT ITEM (NAME)>
    <!ELEMENT NAME (#PCDATA)>
    item.xjs file:
    <xml-java-binding-schema>
    <element name="ITEM" type="class" root="true"/>
    </xml-java-binding-schema>
    when i run from command prompt:
    C:\RBML\xjc item.dtd item.xjs
    It throws up an error
    The markup in the document preceding the root element must be well-formed. line 1 of item.dtd
    I am not able to understand the error..how it can be rectified.
    PLEASE HELP..!
    I have tried adding the following line to item.dtd but doesnot work
    <?xml version="1.0" encoding ="utf-8"?>
    I had also tried removing redundant spaces and blank lines.
    PLEASE HELP
    Thanks
    Gagan

    I'm have done the same for schemas.But giving the error as
    "[ERROR] Unexpected <xml-java-binding-schema> appears at line 1 column 26
    line 1 of item.xjs"
    my xjs file is
    "<xml-java-binding-schema>
    <element name="item_list" type="class" root="true"/>
    <element name="item_info" type="class"/>
    </xml-java-binding-schema>"
    andmy schema is
    "<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="item_list">
    <xsd:complexType>
         <xsd:sequence>
              <xsd:element name="item_info" maxOccurs="unbounded">
                   <xsd:complexType>
                        <xsd:sequence>
                             <xsd:element name="name" type="xsd:string"/>
                             <xsd:element name="price" type="xsd:decimal"/>
                        </xsd:sequence>
                   </xsd:complexType>
         </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>".
    Pls help me

  • How best to manipulate a log file that is not well-formed

    I have a text file that look something like this:
    [21/06/07] System DEBUG * BA_LOG_OUTPUT
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text <?xml version=�1.0� encoding=�UFT-8�?>
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    [21/06/07] System DEBUG * BA_LOG_OUTPUT
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text <?xml version=�1.0� encoding=�UFT-8�?>
    <note>
    <to>Tony</to>
    <from>James</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    [21/06/07] System DEBUG * BA_LOG_OUTPUT
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text <?xml version=�1.0� encoding=�UFT-8�?>
    <note>
    <to>Amy</to>
    <from>Tobi</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>I am trying to read the file so that it picks the welled formed XML and put it through a SAX parser. For example, it should pick out the following before putting into a SAX parser: <?xml version=�1.0� encoding=�UFT-8�?>
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    <?xml version=�1.0� encoding=�UFT-8�?>
    <note>
    <to>Tony</to>
    <from>James</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    <?xml version="1.0" encoding="UTF-8"?>
    <note>
    <to>Amy</to>
    <from>Tobi</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>There is a pattern in the file, the line
    <?xml version=�1.0� encoding=�UFT-8�?>Always start on the 4th line after BA_LOG_OUTPUT line
         public void readFile(){
              String line = null;
              Pattern p = Pattern.compile( "BA_LOG_OUTPUT" );
              Pattern p1 = Pattern.compile( "[" );
              try{
                   while( ( line = br.readLine() ) != null ){
                        Matcher m = p.matcher(line);
                        while( m.find() ){
                             for(int i = 0; i < 5; i++ ){
                                  line = br.readLine();
                             System.out.println(line);     
              }catch( Exception e ){
                   System.err.println( e.getMessage() );
         }In the code above, I can find where I want to read from, but how do I make the code so that it read the rest of the xml save them in stack (which would eventually be passed to SAX parser) and stop when it find the pattern [.
    Find the next pattern in the file (BA_LOG_OUTPUT), read the whole xml which start 4 line after the pattern, save it on the stack, stop reading when it find the pattern [.  and so on.
    It should continue to do the same throughout the file.

    The solution may work but the problem is a bit more complicated than that. The example I gave above is just an example. In the real log file, the tags are never the same, so you may have something that look like this:
    [21/06/07] System DEBUG * BA_LOG_OUTPUT
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text <?xml version=�1.0� encoding=�UFT-8�?>
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    [21/06/07] System DEBUG * BA_LOG_OUTPUT
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text <?xml version=�1.0� encoding=�UFT-8�?>
    <partone>
    <todiff>Tony</todiff>
    <from>James</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </partone>
    [21/06/07] System DEBUG * BA_LOG_OUTPUT
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text
    System DEBUG Random text  Random text <?xml version=�1.0� encoding=�UFT-8�?>
    <anothertag>
    <anothername>Amy</anothername>
    <from>Tobi</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </anothertag >In this case, I cannot use the loop
                while(!(line = in.readLine()).equals("</note>")) {
                    System.out.println(line);
                }How can i make this work?

  • When i try to use firefox it says that install.rdf is not well formed or doesn't exist. what can i do?

    i click the firefox button on my desktop and a window pops up saying what i wrote in my question. i turn the window off and firefox opens normally. it says exactly this:
    Firefox could not install this item because "install.rdf" (provided by the item) is not well formed or does not exist. Please inform the authors about this problem.

    This error can be caused by an extension that tries to install a plugin in a way that is not compatible with current Firefox versions.
    Do you see any disabled extensions in Tools > Add-ons > Extensions ?
    See:
    *[[Troubleshooting extensions and themes]]
    *[[Troubleshooting plugins]]

  • XML not well formed - Java Mapping, Webservice to RFC Scenario

    Hello All Experts,
    I have facing a strange type of error. I have written a Java Mapping which implements a DOM parser to take a request from a Webservice and validate it on the basis of some prerequisites. i.e. If data in the incoming request is valid, it creates a message of the same structure type as the input. If the incoming data is incorrect or incomplete; It generates an Error response structure.
    When I run and test the same mapping program using Editplus Java editor for the error scenario; it executes perfectly and creates the correct error XML structure. (I checked it by importing the structure in the XI Message mapping test tab). But when I create jar of my java mapping program and test it in my interface mapping, it gives me "XML not well formed error" (Problem while building the tree).
    Any idea as to why is it behaving in such a way? There are 2 reasons which come to my mind as of now:
    1. The initilization of my input and output streams in the public static void main:
                InputStream in = new FileInputStream(new File("Input.xml"));
               OutputStream out = new FileOutputStream(new File("Output.xml"));
               validateXML myMapping = new ValidateXML();
                myMapping.execute(in, out);
    The Output.xml has the xml structure for the correct case, do I have to initialize my outputstream for the error file? say error.xml
    2. My Webservice interface is a sychronous interface (Request / Response) and output of the Java mapping program are two asynchronous interface. (I'll use a synch-asynch bridge when this works) - Is that causing a problem?
    Please help.
    Best regards,
    Varun

    Hello Varun,
    it gives me "XML not well formed error" (Problem while building the tree).
    I have come across the same error message while testing in interface mapping. My problem was when an exception occured in java mapping, the execution terminates with the messages XML not well formed error". In order to solve this issue what i did was catch the exception type TransformerException and in that catch block throw StreamTransformationException exception in main methos of mapping program i.e execute().
    eg:-                                                                               
    catch (TransformerException e) {
                   throw new StreamTransformationException("Can not write XML.", e);
    By doing this you will see the exception raised , because some times when you execute your mapping with mail() method, though it create the file, when you try to open it will give error if any exceptions occured in mapping. By using the above notation you can handle those in java mapping.
    Hope you have gone through this blog.
    [Handling and Tracing Exceptions in java mapping|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID1055371050DB01666765031379427182End?blog=/pub/wlg/15061]
    Regards,
    Prasanna

  • XML Not well formed, Mapping error

    Hi All,
    I'm trying a simple file to file scenario..
    Following is the structure of source and target file..
    Source structure
    ===============
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:SourceMT xmlns:ns="urn:tmp:workshop:file2file">
      <Src1>1</Src1>
      <Src2>2</Src2>
    </ns:SourceMT>
    Target Structure
    ===============
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:TargetMT xmlns:ns="urn:tmp:workshop:file2file">
      <Tgt1>1</Tgt1>
      <Tgt2>2</Tgt2>
    </ns:TargetMT>
    I did a one to one mapping for the two fields and tested the same using the test tool in IR and it works fine..
    However when I put the same source xml structure in the Input file it gives me the below error..
    Also when I copy the payload from the sxmb_moni and paste the same in the test tool in IR it throws an error saying
    "XML not well-formed"
    Error
    =====
    <SAP:Stack>During the application mapping com/sap/xi/tf/_FileMM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Payload
    =======
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:SourceMT xmlns:ns="urn:tmp:workshop:file2file">
      <Src1>1</Src1>
      <Src2>2</Src2>
      </ns:SourceMT>
    Any inputs are greatly appreciated..
    Thanks and Regards,
    Nazim

    Hi ,
    <i>During the application mapping com/sap/xi/tf/_FileMM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</i>
    It is clearly saying that exception in mapping....Check your mapping correcly with one to one mapping.Dont do any mapping to the root node and check it...
    And also check this...
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    Sekhar

  • Got "Reponse is not well-formed XML" error when calling FormDataIntegration web service

    Hi,
    I'm using Windows Server 2008 + LiveCycle Server ES2 (Reader Extensions) + ASP.NET
    This problem only happened when I run the ASP.NET program with the licensed version of the server, (which i installed form the CD provided)
    However, there is no problem in my development environment with the trial version downloaded from Adobe website, the import data was successful and a correct PDF form can be returned.
    My question is that whether there is a problem within the LiveCycle services? or there is missing component that needs to be installed?? Thanks
    After call the importData of FormDataIntegration, I got below error
    Response is not well-formed XML.
    System.InvalidOperationException: Response is not well-formed XML. ---> System.Xml.XmlException: Root element is missing.
    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at System.Xml.XmlReader.MoveToContent()
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    --- End of inner exception stack trace ---
    I checked in LiveCycle's jboss log, I found below errors:
    2011-02-17 14:16:37,086 ERROR [org.apache.axis.encoding.ser.BeanSerializer] Exception:
    java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.ArraySerializer.serialize(ArraySerializer.j ava:76)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:707)
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.AdobeAxisBeanSerializer.serialize(AdobeAxis BeanSerializer.java:281)
    at java.lang.Thread.run(Thread.java:619)
    2011-02-17 14:16:37,087 ERROR [org.apache.axis.encoding.ser.BeanSerializer] Exception:
    java.io.IOException: java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.AdobeAxisBeanSerializer.serialize(AdobeAxis BeanSerializer.java:326)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    : at java.lang.Thread.run(Thread.java:619)
    2011-02-17 14:16:37,088 ERROR [org.apache.axis.SOAPPart] Exception:
    java.io.IOException: java.io.IOException: java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.AdobeAxisBeanSerializer.serialize(AdobeAxis BeanSerializer.java:326)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at java.lang.Thread.run(Thread.java:619)
    2011-02-17 14:16:37,088 WARN  [org.apache.axis.attachments.AttachmentsImpl] Exception:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}hostname: XXXX
    ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    ... 33 more
    Caused by: java.lang.NoClassDefFoundError: com/adobe/formServer/utils/LogUtils
    at com.adobe.formServer.utils.CommonGibsonUtils.PDFDocumentFromDocument(CommonGibsonUtils.ja va:122)
    at com.adobe.livecycle.formdataintegration.server.FormData.importData(FormData.java:64)
    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:597)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    ... 74 more
    2011-02-17 14:16:37,090 ERROR [org.apache.axis.encoding.ser.BeanSerializer] Exception:
    java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.ArraySerializer.serialize(ArraySerializer.j ava:76)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:707)

    it's base64, here's the codes i called, any hints?
                FormDataIntegration.FormDataIntegrationService dataIntClient = new FormDataIntegration.FormDataIntegrationService();
                dataIntClient.Url += "?blob=base64";
                dataIntClient.Credentials = new System.Net.NetworkCredential(account, password);
                FormDataIntegration.BLOB inXMLData = new FormDataIntegration.BLOB();
                inXMLData.binaryData = xmlData;
                FormDataIntegration.BLOB inPDFForm = new FormDataIntegration.BLOB();
                string pathPDF = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin\\ReplySlipByEmail.pdf");
                FileStream fsPDF = new FileStream(pathPDF, FileMode.Open);
                int lenPDF = (int)fsPDF.Length;
                byte[] bytePDF = new byte[lenPDF];
                fsPDF.Read(bytePDF, 0, lenPDF);
                inPDFForm.binaryData = bytePDF;
                FormDataIntegration.BLOB result = dataIntClient.importData(inPDFForm, inXMLData);
                return ApplyUsageRightsToPDF(result.binaryData, account, password, LCCertName);

  • Help! Flash error: 1088 (Markup in doucment not well-formed)

    I'm trying to use ASP.NET to retrieve data from the sql server, place in inside an xml and sends the xml to flash to display the data.
    However, I'm getting
    TypeError: Error #1088: The markup in the document following the root element must be well-formed.
    at news_fla::mainTimeline/loaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    This is my code:
    ASP.NET
    =======
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim adapter As SqlDataAdapter
            Dim ds As New DataSet
            Dim sql As String
            Dim con As New SqlConnection("data source = GN80000798-0\SQLEXPRESS2008; initial catalog = EL; integrated security = true")
            sql = "select * from news"
            Try
                con.Open()
                adapter = New SqlDataAdapter(sql, con)
                adapter.Fill(ds, "data")
                con.Close()
                Response.ContentType = "text/XML"
                Response.HeaderEncoding = Encoding.UTF8
                ds.WriteXml(Response.OutputStream, XmlWriteMode.WriteSchema)
                MsgBox("Done")
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try
        End Sub
    Flash
    ====
    import flash.xml.*;
    var newsrequest:URLRequest = new URLRequest("http://localhost:1179/DB/DB.aspx"); //ASP.NET development server
    var newsloader:URLLoader = new URLLoader();
    var newsxml:XML;
    var dvar:URLVariables = new URLVariables();
    dvar.dummy = "dummy";
    newsrequest.data = dvar;
    newsrequest.method = URLRequestMethod.POST;
    newsloader.load(newsrequest);
    newsloader.addEventListener(Event.COMPLETE, loaded);
    titlenews.autoSize = TextFieldAutoSize.LEFT;
    bodynews.autoSize = TextFieldAutoSize.LEFT;
    function loaded(event:Event){
    newsxml = new XML(event.target.data);
    newsxml.ignoreWhitespace = true;
    trace(newsxml);
    HOWEVER, if i replace the
    "ds.WriteXml(Response.OutputStream, XmlWriteMode.WriteSchema)"
    with
    "ds.WriteXml("C:\new.xml")
    it works. But i dont wan a .xml file residing in the server. so i hope that the .xml file would be cleared off as soon as the request is done.
    Did i do something wrong?
    PS: I don't know if i post this in the correct section but since it's related to AS3, thats why i post it here. sorry if i made a mistake.

    Please paste the following line as first statement in loaded function, also compare the output of the following line with expected output from ASP page.
    trace(event.target.data);
    The error is causing due to the fact that XML received is not well formed.
    I guess the problem is with write XML you are getting some additional tag elements and these are not wellformed. so flash is giving error.

  • Not well-formed request to ALSB

    I want to send not well-formed request to AquaLogic Service Bus and to get user-friendly error message. When I send request where one namespace is not defined, for example:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <m:GetMessage xmlns:m="http://local.com/schemas/msg" >
    <m0:InputData>
    <m0:FirstName>Nicole</m0:FirstName>
    <m0:LastName>Richie</m0:LastName>
    </m0:InputData>
    </m:GetMessage>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    ALSB throws fault message with:
    - errorCode: BEA-382513 and
    - reason: ALSB Replace action failed updating variable "body": javax.xml.stream.XMLStreamException: Prefix m0 used without binding it to a namespace URI
    I managed to get user-friendly error message with two proxy service where:
    - Proxy service “A” calls the proxy service “B”. In Route Error Handler of proxy service “A” checks if proxy service “B” throws the BEA’s error message and changes it in to error message that I want. Service Type of proxy service “A” is WSDL Web Service.
    - Proxy service “B” have some logics and calls the real business service. Service type of proxy service “B” is any SOAP Service
    Is this good solution in terms of the overall load on the system?
    Also, is there any other solution to get user-friendly error message from ALSB proxy service? Is it possible to make this with only one proxy service?

    I would do it like this:
    At the start of your proxy service add a "Validate" action. In the action's properties you can choose what to do when an error occurs (you can either save the error message to a variable or raise the error). Leave the default option "raise error". Add an exception handler to your proxy service and add the desired logic to change the error message into something else.
    Hope that helps.

  • XML Parsing Error: not well-formed (C# Visual Studio 2013)

    I am working on a project in visual studio that imports a csv, and exports an xml file. I'd like to be able to get the code to work as xml and html, and view it in a browser. I am getting this error when I load the xml file into a browser:
    Firefox
    XML Parsing Error: not well-formed Location: file:///C:/Users/fenwky/XmlDoc.xml Line Number 2, Column 6:?> -----^
    Chrome
    This page contains the following errors: error on line 2 at column 16: colon are forbidden from PI names 'xsl:transform'
    This is what my c# code looks like in visual studio 2013:
    // Create a procesing instruction.
    XmlProcessingInstruction newPI;
    // Stylesheet
    String PItext = "<abc:stylesheet xmlns:abc=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    newPI = doc.CreateProcessingInstruction("abc:stylesheet", PItext);
    doc.InsertAfter(newPI, doc.FirstChild);
    // Save document
    doc.Save(xmlfilename);

    Hi
    Kylee Fenwick,
    Could you show us your CSV file? And the code how do you imports a csv and exports an xml file?
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.
    Hi Kristen,
    Thank you in advance for your healp. Here is my CSV file:
    Item Code;Item Description;Current Count;On Order
    A0001;"Wheels, Horse on";5;No
    A0002;"Wheels, Elephant on";2;No
    A0003;"Wheels, Dog on";0;Yes
    A0004;"Wheels, Seal on";3;No
    A0005;"Wheels, Bear on";7;No
    A0006;"Bear, Teddy";2;Yes
    A0007;"Clown,";5;No
    A0008;"Puppy(crouch),";3;No
    A0009;"Puppy(stand),";2;No
    A0010;"Puppy(jump),";2;Yes
    A0011;"Pupp(lying),";1;Yes
    A0012;"(50), Cart with Blocks";0;Yes
    A0013;"(100), Cart with Blocks";5;No
    A0014;"(200), Cart with Blocks";4;No
    A0015;"Carriage, Train with 0";12;No
    A0016;"Carriage, Train with 1";10;No
    A0017;"Carriage, Train with 2";5;Yes
    A0018;"Carriage, Train with 3";4;Yes
    A0019;"Carriage, Train with 4";5;No
    A0020;"Carriage, Train with 5";2;No
    A0021;"(20), Building Blocks";15;No
    A0022;"(30), Building Blocks";13;No
    A0023;"(40), Building Blocks";16;No
    A0024;"(50), Building Blocks";5;Yes
    A0025;"(100), Building Blocks";2;Yes
    A0026;"(200), Building Blocks";8;No
    A0027;"Windmill,";5;No
    A0028;"Farmhouse,";6;Yes
    A0029;"Fencing,";22;Yes
    A0030;"Barn,";12;Yes
    A0031;"Tractor,";6;Yes
    A0032;"Animals,";3;Yes
    A0033;"House,";9;No
    A0034;"Car,";12;No
    A0035;"(small), Building";4;No
    A0036;"(medium), Building";3;No
    A0037;"(tall), Building";4;No
    A0038;"Shop,";7;No
    A0039;"Lights, Traffic";5;Yes
    A0040;"Station, Petrol";4;Yes
    And here is my code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;
    using System.Data.OleDb;
    using System.Xml;
    using System.Xml.Xsl;
    using System.Xml.XPath;
    namespace CSVImporter
    public partial class CSVImporter : Form
    //const string xmlfilename = @"C:\Users\fenwky\XmlDoc.xml"; - file name and location of xml file
    const string xmlfilename = @"C:\Users\fenwky\XmlDoc.xml";
    // New code
    //const string xmlfilename = @"C:\Users\fenwky\XmlDoc.xml"; - file name and location of xsl file
    const string stylesheetsimple = @"C:\Users\fenwky\style1.xsl";
    //const string xmlfilecomplex = @"C:\Users\fenwky\XmlDoc2.xml";
    const string xmlfilecomplex = @"C:\Users\fenwky\XmlDoc2.xml";
    DataSet ds = null;
    public CSVImporter()
    InitializeComponent();
    // Create a Open File Dialog Object.
    openFileDialog1.Filter = "csv files (*.csv)|*.csv|All files (*.*)|*.*";
    openFileDialog1.ShowDialog();
    string fileName = openFileDialog1.FileName;
    //doc.InsertBefore(xDeclare, root);
    // Create a CSV Reader object.
    CSVReader reader = new CSVReader();
    ds = reader.ReadCSVFile(fileName, true);
    dataGridView1.DataSource = ds.Tables["Table1"];
    private void WXML_Click(object sender, EventArgs e)
    WriteXML();
    public void WriteXML()
    StringWriter stringWriter = new StringWriter();
    ds.WriteXml(new XmlTextWriter(stringWriter), XmlWriteMode.WriteSchema);
    string xmlStr = stringWriter.ToString();
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(xmlStr);
    XmlDeclaration xDeclare = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    doc.InsertBefore(xDeclare, doc.FirstChild);
    // Test code //
    // Load the style sheet.
    XslCompiledTransform xslt = new XslCompiledTransform();
    xslt.Load("style1.xsl");
    // Test code //
    // Transform the file and output an HTML string.
    string HTMLoutput;
    StringWriter writer = new StringWriter();
    xslt.Transform("XmlDoc.xml", null, writer);
    HTMLoutput = writer.ToString();
    writer.Close();
    // Create a procesing instruction.
    XmlProcessingInstruction newPI;
    // Stylesheet
    // String PItext = "<abc:stylesheet xmlns:abc=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    String PItext = "<xsl:stylesheet xmlns:xls=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    // newPI = doc.CreateProcessingInstruction("abc:stylesheet", PItext);
    newPI = doc.CreateProcessingInstruction("xls:stylesheet", PItext);
    doc.InsertAfter(newPI, doc.FirstChild);
    // Save document
    doc.Save(xmlfilename);
    private void btExportComplexXML_Click(object sender, EventArgs e)
    WriteXMLComplex();
    public void WriteXMLComplex()
    // Creates stringwriter
    StringWriter stringWriter = new StringWriter();
    ds.WriteXml(new XmlTextWriter(stringWriter), XmlWriteMode.WriteSchema);
    string xmlStr = stringWriter.ToString();
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(xmlStr);
    XmlDeclaration xDeclare = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    doc.InsertBefore(xDeclare, doc.FirstChild);
    // Create a procesing instruction.
    XmlProcessingInstruction newPI;
    // Uses XML transformation.
    String PItext = "<abc:stylesheet xmlns:abc=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    newPI = doc.CreateProcessingInstruction("xsl:stylesheet", PItext);
    doc.InsertAfter(newPI, doc.FirstChild);
    // Saves document.
    doc.Save(xmlfilecomplex);
    //Creates a CSVReader Class
    public class CSVReader
    public DataSet ReadCSVFile(string fullPath, bool headerRow)
    string path = fullPath.Substring(0, fullPath.LastIndexOf("\\") + 1);
    string filename = fullPath.Substring(fullPath.LastIndexOf("\\") + 1);
    DataSet ds = new DataSet();
    try
    if (File.Exists(fullPath))
    string ConStr = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}" + ";Extended Properties=\"Text;HDR={1};FMT=Delimited\\\"", path, headerRow ? "Yes" : "No");
    string SQL = string.Format("SELECT * FROM {0}", filename);
    OleDbDataAdapter adapter = new OleDbDataAdapter(SQL, ConStr);
    adapter.Fill(ds, "TextFile");
    ds.Tables[0].TableName = "Table1";
    foreach (DataColumn col in ds.Tables["Table1"].Columns)
    col.ColumnName = col.ColumnName.Replace(" ", "_");
    catch (Exception ex)
    MessageBox.Show(ex.Message);
    return ds;

  • XML from CF not well-formed?

    I have been working through the Training from the Source book
    on Flex2 (Trapper, Boles, Talbot, etc.). In Lesson 17, it deals
    with accessing server-side objects.
    One piece of code accesses a CF template, which brings in an
    XML file:
    <mx:HTTPService id="prodByCatRPC"
    url="
    http://localhost/flexGrocer/xml/categorizedProducts.cfm"
    result="prodByCategoryHandler(event)"
    resultFormat="e4x" />
    The CF plate from the book's file has the following:
    <cfheader name="Expires" value="#now()#" />
    <cfxml variable="xProducts">
    <cfinclude template="categorizedProducts.xml">
    </cfxml>
    <cfset xmlObject=ToString(xProducts)>
    <cfcontent type="text/xml" />
    <cfoutput>#variables.xmlObject#</cfoutput>
    When run the Flex file, I get a run-time message which seems
    to indicate that the XML is not well-formed. (Here is a bit of the
    message; not sure I'm understanding it!):
    [RPC Fault faultString="Error #1088: The markup in the
    document following the root element must be well-formed."
    faultCode="Client.CouldNotDecode" faultDetail="null"]
    I am ASSUMING that the CF page is not returning the xml as
    desired, because if I simply change the flex http service call to
    the xml file that the CF page is including, the flex app runs as
    expected and without errors:
    url="
    http://localhost/flexGrocer/xml/categorizedProducts.xml"
    (something in the posting mech is making the above url
    statement messed up, but you can probably tell what I mean)
    I am a CF developer and although haven't used the book's
    exact method to get the cf generated xml, I have done so
    successfully for Spry and other things.
    I tried some ot the things I had to do to get the CF
    generated xml to work in Spry with this flex, but didn't help.
    Tried adding a reset='true" with the cfcontent tag; tried making
    the cfcontent wrap the output; added cfprocessing tags to
    suppresswhitespace.
    Appreciate any thoughts/help on how to solve this. Also,
    whether others agree that the problem is with the generated xml
    rather than something else.
    Thanks
    Keith

    I don't remember the exact context when I first posted this
    question and answered it; but, if one doesn't want to change
    overall settings for debugging in cf admin., I *think* you can
    ajust for a specific area using cfsetting and/or
    cfprocessingdirective. There's a number of attributes and
    combinations there that I think can take care of the problem. I
    forget for sure, but may want to try that, especially on a
    development box where you might generally want debugging to be on.
    Also, if using cfcs in any part of what you generate, they
    can produce whitespace. To solve (or minimize), make sure that
    output attribute in the component is false and that output in
    function is false (unless directly outputting within the function.
    Seems like CF and whitespace is an ongoing item to try to
    manage.
    Keith

  • File not well formed: Process instruction name (may not be 'xml') expected

    I am a WBI developer whose end result is to produce one XML file. This file will receive a number of events that will constantly append to XML file. Each appendage will contain same structure but diff data than one before. Also I have created a WBI business object to mirror the XML structure.
    However, below is my XML in a Not well formed state. My error happens at first appendage ( see second tag of ><?xml version='1.0' encoding='utf-8'?>)
    My question: Can I actually produce a correct XML file? if so how do I do this, is it a change needed in my Busines Object? And if I cannot then what are my other options.
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE BATCH_AUTO>
    <BATCH_AUTO><POLICY><POL_TRANCODE>CHKS</POL_TRANCODE><POL_EXTRACTDTE>20050602</POL_EXTRACTDTE><POL_POLICYNO>PAA-123456789</POL_POLICYNO><POL_EFFDATE>20050101</POL_EFFDATE><POL_DUEDATE>20051201</POL_DUEDATE><POL_TOTALPREMIUM>1</POL_TOTALPREMIUM><POL_ACCTBALANCE>2.00</POL_ACCTBALANCE><POL_MAILNAME1>John Doe</POL_MAILNAME1><POL_MAILNAME2>Jane Doe2</POL_MAILNAME2><POL_MAILNAME3>Mark Doe3</POL_MAILNAME3><POL_MAILADDR1>1234567891 W1 MAIN St. A ST A WA APTAPTAPTAPT 12345678 APTAPTAPTAPT 12345678</POL_MAILADDR1><POL_CANCELDATE>20050901</POL_CANCELDATE><POL_CANCELREASON>REASON</POL_CANCELREASON><POL_SUBTOTAL>7.00</POL_SUBTOTAL><POL_TOTALFEE>1</POL_TOTALFEE><POL_TOTALADJS>4.00</POL_TOTALADJS><POL_CHECKDATE>020050525</POL_CHECKDATE><POL_CHECKNO>000001</POL_CHECKNO><POL_CHKEXPLANATION>Cancelled</POL_CHKEXPLANATION><POL_CHECKAMOUNT>5</POL_CHECKAMOUNT><POL_BANKACCTNO>8765015692</POL_BANKACCTNO><POL_BANKROUTNO>719232845</POL_BANKROUTNO><POL_TOTAMTPAID>1</POL_TOTAMTPAID></POLICY></BATCH_AUTO><?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE BATCH_AUTO>
    <BATCH_AUTO><POLICY><POL_TRANCODE>CHKS</POL_TRANCODE><POL_EXTRACTDTE>20050602</POL_EXTRACTDTE><POL_POLICYNO>PAA-123456789</POL_POLICYNO><POL_EFFDATE>20050101</POL_EFFDATE><POL_DUEDATE>20051201</POL_DUEDATE><POL_TOTALPREMIUM>1</POL_TOTALPREMIUM><POL_ACCTBALANCE>2.00</POL_ACCTBALANCE><POL_MAILNAME1>John Doe</POL_MAILNAME1><POL_MAILNAME2>Jane Doe2</POL_MAILNAME2><POL_MAILNAME3>Mark Doe3</POL_MAILNAME3><POL_MAILADDR1>1234567891 W1 MAIN St. A ST A WA APTAPTAPTAPT 12345678 APTAPTAPTAPT 12345678</POL_MAILADDR1><POL_CANCELDATE>20050901</POL_CANCELDATE><POL_CANCELREASON>REASON</POL_CANCELREASON><POL_SUBTOTAL>7.00</POL_SUBTOTAL><POL_TOTALFEE>1</POL_TOTALFEE><POL_TOTALADJS>4.00</POL_TOTALADJS><POL_CHECKDATE>020050525</POL_CHECKDATE><POL_CHECKNO>000001</POL_CHECKNO><POL_CHKEXPLANATION>Cancelled</POL_CHKEXPLANATION><POL_CHECKAMOUNT>5</POL_CHECKAMOUNT><POL_BANKACCTNO>8765015692</POL_BANKACCTNO><POL_BANKROUTNO>719232845</POL_BANKROUTNO><POL_TOTAMTPAID>1</POL_TOTAMTPAID></POLICY></BATCH_AUTO>

    Hi,
    The <?xml version='1.0' encoding='utf-8'?>) xml declaration can occur only once and that too at the very top of the xml file before everything else. I think your best bet would be to strip the xml declaration and the doctype declaration before appending. You might want to check the API documentation of the API you are using to serialize the xml to see if it supports suppressing xml and doctype declarations.
    With apache xerces, you can do
    OutputFormat.setOmitXMLDeclaration(true);
    where OutputFormat dictates what underlying serialized is used to serialize the document based on the specified method.
    Hope this helps.
    Cheers,
    vidyut

  • WHAT IS THE FIX TO THIS ERROR:  XML Parsing error: not well-formed (invalid token) (error code 4)

    Hello, looking to see if there's anyone out there who knows how to resolve this error from popping up when I open a previously saved adobe file with data populated inside (tax form). 
    The error states: 
    XML Parsing error: not well-formed (invalid token) (error code 4), line 16028, column 2 of file. 
    So when I go to open this file, THAT ERROR appears.  But then allows me to view the content inside the PDF (tax form) - however it will not allow further editing - this is an issue. 
    This began after working and populating certain files, then transferring to a hosting site.  Now when I open any PDF file from the hosting site, the error appears.  Could just be coincidental however throwing that out there in case it's useful.
    What causes this error & what is the fix?
    Cheers! 

    Unfortunately No.  This was a tax form downloaded from IRS.gov.  The PDF file has been populated and saved off.  I believe the file has somehow become corrupt.  Curious how to cleanse the file so it opens without issue (that error message).
    Thanks for your response

Maybe you are looking for