Adding a DTD DOCTYPE declaration to an XML DomNode?

I have the following XML
<MYDOC>
<SOMENODES>
<!-- ect -->
</SOMENODES>
</MYDOC>
And want to add a DOCTYPE declaration to the message like this:
<MYDOC>
<!DOCTYPE some.dtd> <!--this is the node I wanna add -->
<SOMENODES>
<!-- ect -->
</SOMENODES>
</MYDOC>
How would I do in a PL/SQL package?
-BKN

I tried this code:
xmldom.setStandAlone(MyDomDoc, 'no');
xmldom.setDocType(MyDomDoc, 'some.dtd', '', null);
But it didn't change the outputted XML text. I need to add the <!DOCTYPE > tag to the document (so ECXpert can properly know how to manipulate the document), so I'm doing something wrong. What am I missing?
-BKN

Similar Messages

  • Doctype not set n XML file

    Hi,
    Is there a way to create a new DOM document and include the DTD?
    I used the following:
    docType = DOMimp.createDocumentType("my.dtd", null , "my");
    Doc = DOMimp.createDocument(null,ROOT_ITEM, docType);
    docType = Doc.getDoctype();
    The docType is properly set when retrieving the values:
    String s1 = docType.getPublicId();
    String s2 = docType.getSystemId();
    String s3 = docType.getName();
    When, saving the Doc to a file using the JAXP transform, the doctype doesn't appear?
    Any help is most welcome. / dzone

    Hi dzoneKL,
    There is no way of setting or modifying the DOCTYPE declaration in the XML document itself; according to the documentation, this is not allowed by the DOM Level 2 specification. However, you can do it in the javax.xml.Transformer object (this is the object you use to write the xml out):
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer();
    transformer.setOutputProperty(javax.xml.transform.OutputKeys.DOCTYPE_SYSTEM, "name.dtd");
    ...Check the javax.xml.transform.OutputKeys javadoc for more details about the properties you can set for the transformer.
    Hope it helps
    Giordano

  • The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing

    Hello,
    I want to create web service from ejb but everytime I want to do it, I get the following error:
    I'm using NWDS 7.2 and JDK 1.6
    [004]Deployment aborted
    Settings
    SDM host : XXX
    SDM port : 50118
    URL to deploy : file:/C:/DOCUME1/XXXX/LOCALS1/Temp/temp3760382784932063822XXXWSProjectEar.ear
    Result
    => deployment aborted : file:/C:/DOCUME1/XXX/LOCALS1/Temp/temp3760382784932063822XXX/WSProjectEar.ear
    Aborted: development component 'XXXWSProjectEar'/'sap.com'/'localhost'/'2011.01.06.15.48.31'/'0':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/XXXWSProjectEar.. Reason: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing. ; nested exception is:      com.sap.engine.services.ejb.exceptions.deployment.EJBXMLParserException: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing.
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : The deployment of at least one item aborted
    Can anyone tell me why am I getting this error.
    Thnx for your help.
    Best regards.

    Hello Decio Junior,
    Actually yes, I resolved my problem.
    I'm developing an EJB 3.0 project. I'm using NWDS 7.2 and JDK 1.6 as I said.
    The problem is that my server was using JDK 1.4 and that was the problem.
    EJB 1.1 and 2.1 need ejb-jar.xml but EJB 3.0 use the annotations instead.
    Check your server JDK Version. It should be JDK 1.5 or higher.
    Something else that you should check, in your project properties :
    In the Build PATH : Use JDK 1.5
    In the Java Compiler : Set the java compiler compliance level to 1.6 and check use default compliance settings
    Hope it would help.
    If you need more explanations, I'm here
    Good luck.

  • DTD Doctype for weblogic-ejb-jar.xml

    Hi,
    I have a small question about XML DOCTYPE DEFINITION used with XML descriptors.
    What should be the DOCTYPE HEADER for weblogic 6.0 sp2 & EJB 1.1?
    Currently, i'm using :
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems,
    Inc.//DTD WebLogic 5.1.0 EJB//EN''http://www.bea.com/servers/wls510/ dtd/weblogic-ejb-jar.dtd'>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    These are working fine. But my question is, why should we use DTDs of WLS5.1 even
    if we are using WL6.0?
    Note that we intend to use EJB1.1 specification.
    Regards,
    Amit

    There is a new 6.0 DTD for CMP 1.1 entity beans to take advantage of new
    features (such as 2pc). Search the CMP EJB newsgroup for a post from me
    about 1 or 2 months ago summarizing the topic.
    Otherwise the old DTDs seem to work just fine.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "Amit Vaidya" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi,
    I have a small question about XML DOCTYPE DEFINITION used with XMLdescriptors.
    >
    What should be the DOCTYPE HEADER for weblogic 6.0 sp2 & EJB 1.1?
    Currently, i'm using :
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems,
    Inc.//DTD WebLogic 5.1.0 EJB//EN''http://www.bea.com/servers/wls510/
    dtd/weblogic-ejb-jar.dtd'>
    >
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD EnterpriseJavaBeans
    1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    These are working fine. But my question is, why should we use DTDs ofWLS5.1 even
    if we are using WL6.0?
    Note that we intend to use EJB1.1 specification.
    Regards,
    Amit

  • What is DTD (related to BC and XML)?

    Hi all,
    Could you please refer me to links/documents, after giving a brief overview of <b>DTD</b>
    Thanks,
    Charles.

    Hi,
    The purpose of a DTD is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A DTD can be declared inline in your XML document, or as an external reference.
    Internal DTD
    This is an XML document with a Document Type Definition: (Open it in IE5, and select view source)
    <?xml version="1.0"?>
    <!DOCTYPE note [
    ><!ELEMENT note (to,from,heading,body)>
    <!ELEMENT to (#PCDATA)>
    <!ELEMENT from (#PCDATA)>
    <!ELEMENT heading (#PCDATA)>
    <!ELEMENT body (#PCDATA)>
    ]>
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    The DTD is interpreted like this:
    !ELEMENT note (in line 2) defines the element "note" as having four elements: "to,from,heading,body".
    !ELEMENT to (in line 3) defines the "to" element to be of the type "CDATA".
    !ELEMENT from (in line 4) defines the "from" element to be of the type "CDATA"
    and so on.....
    External DTD
    This is the same XML document with an external DTD: (Open it in IE5, and select view source)
    <?xml version="1.0"?>
    <!DOCTYPE note SYSTEM "note.dtd">
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    This is a copy of the file "note.dtd" containing the Document Type Definition:
    <?xml version="1.0"?>
    <!ELEMENT note (to,from,heading,body)>
    <!ELEMENT to (#PCDATA)>
    <!ELEMENT from (#PCDATA)>
    <!ELEMENT heading (#PCDATA)>
    <!ELEMENT body (#PCDATA)>
    Why use a DTD?
    XML provides an application independent way of sharing data. With a DTD, independent groups of people can agree to use a common DTD for interchanging data. Your application can use a standard DTD to verify that data that you receive from the outside world is valid. You can also use a DTD to verify your own data.
    For more information, please check this links.
    http://help.sap.com/saphelp_nw04/helpdata/en/64/0bee3da7138e5be10000000a114084/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/dc/6b827c43d711d1893e0000e8323c4f/content.htm
    Regards,
    Ferry Lianto

  • Diff. between DOCTYPE and ROOT in xml

    Hi ,
    what is differnce betwwen Doctype and root elemnt.
    Because we can have many doctype and only one root.
    Somebody says both are same. Is it true?
    If yes then, what about above statement?
    Whats exact truth?
    ....yogesh

    Because we can have many doctype and only one root.This is not true.
    You must have one root element to get well formed XML file, but you can also have zero or one DOCTYPE declaration per XML file.
    The DOCTYPE element mut include the name of the root element and then the public and system ids.
    Check out here:
    http://www.w3.org/TR/2004/REC-xml-20040204/#sec-prolog-dtd
    Somebody says both are same. Is it true?No. see above.
    Ran.

  • How to specify XML declaration in an XML Variable

    I had posted this question in the Flex Builder discussion,
    but I am not sure if that was the right board, so posting it again
    here:
    I need to set the XML declaration for my XML variable as
    follows:
    var employees:XML =
    <?xml version="1.0" encoding="utf-8"?>
    <employees>
    <employee ssn="123-123-1234">
    <name first="John" last="Doe"/>
    <address>
    <street>11 Main St.</street>
    <city>San Francisco</city>
    <state>CA</state>
    <zip>98765</zip>
    </address>
    </employee>
    <employee ssn="789-789-7890">
    <name first="Mary" last="Roe"/>
    <address>
    <street>99 Broad St.</street>
    <city>Newton</city>
    <state>MA</state>
    <zip>01234</zip>
    </address>
    </employee>
    </employees>;
    However, if I specify <?xml version="1.0"
    encoding="utf-8"?>, I get a design time and compile error. If I
    remove it it works fine. But the server to which I send this XML is
    expecting the declaration. How can I set the declaration?
    Any help or pointer is appreciated.

    I am not able to load the xml. Can anybody figure out the
    problem :
    I have used a LoadXML class :
    package {
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    // Demonstrates the code required to load external XML
    public class LoadXML extends Sprite {
    // The property that will eventually contain the loaded XML
    private var novel:XML;
    // The object used to load the XML
    private var urlLoader:URLLoader;
    // Constructor
    public function LoadXML () {
    // Specify the location of the external XML
    var urlRequest:URLRequest = new URLRequest("novel.xml");
    // Create an object that can load external text data
    urlLoader = new URLLoader();
    // Register to be notified when the XML finishes loading
    urlLoader.addEventListener(Event.COMPLETE,
    completeListener);
    // Load the XML
    urlLoader.load(urlRequest);
    // Method invoked automatically when the XML finishes
    loading
    private function completeListener(e:Event):void {
    // The string containing the loaded XML is stored in the
    URLLoader
    // object's data property (urlLoader.data). To create a new
    XML
    // instance from that loaded string, we pass it to the XML
    constructor
    novel = new XML(urlLoader.data);
    trace(novel.toXMLString()); // Display the loaded XML, now
    converted
    // to an XML object
    And in main.mxml :
    myXml = new LoadXml ;
    trace ( myXml.novel ) ;
    The output is errenous

  • How to specify the XML Declaration for an XML variable

    I need to set the XML declaration for my XML variable as
    follows:
    var employees:XML =
    <?xml version="1.0" encoding="utf-8"?>
    <employees>
    <employee ssn="123-123-1234">
    <name first="John" last="Doe"/>
    <address>
    <street>11 Main St.</street>
    <city>San Francisco</city>
    <state>CA</state>
    <zip>98765</zip>
    </address>
    </employee>
    <employee ssn="789-789-7890">
    <name first="Mary" last="Roe"/>
    <address>
    <street>99 Broad St.</street>
    <city>Newton</city>
    <state>MA</state>
    <zip>01234</zip>
    </address>
    </employee>
    </employees>;
    However, if I specify <?xml version="1.0"
    encoding="utf-8"?>, I get a design time and compile error. If I
    remove it it works fine. But the server to which I send this XML is
    expecting the declaration. Can somebody help me with this?
    Thanks

    I work mostly with the Java versions of the parser so you'll have to make the translation to C++. As far as I know, you can't use the SAX API to access to the encoding.
    You need to use the DOM along with Oracle's extension to the basic DOM functionality. Oracle's package, oracle.xml.parser.v2 defines a class which implements the Document interface called XMLDocument. This class has a method, getEncoding(), which returns the encoding. You would use the method in getDocument() in the Parser base class inherited by DOMParser to retrive the XMLDocument.
    Jeff

  • I am getting this error when i am doing CSOM on project server..For security reasons DTD is prohibited in this XML document.

    before two day my csom code was working fine..but from last two days when i tried to execute my code i am getting this error..
    For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

    Found in negative cache.... very strange.
    RFC found in negative cache
    What is the negative cache?

  • DTD is prohibited in this XML document. (System.xml)

    Hi,
    I am having issue with my SSRS report, XML Data Source, when I am try to execute my query I get this error:
    "Could not generate a list of fields for the query. Check the query syntax or click refresh Fields on the query
    Toolbar. DTD is prohibited in this XML document."
    This my query:
    <Query>
      <ElementPath>Action {}/Step {Obj,Details,Time,NodeArgs}</ElementPath>
    </Query>
    This is my Connection string:
    http://localhost/results.xml?NoRedirect=true
    Please help;
    Angel C. Barrientos
    angelatino2013

    Below link may be helpful,
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/11b1a418-7c70-4318-9535-6a60dd26539d/dtd-is-prohibited-in-this-xml-document-systemxml-error-while-accessing-xml-file-of-form-library?forum=sqlreportingservices
    Regards, RSingh

  • Cannot have multiple DOCTYPE declarations

    I discoverd that my application gives an error when i'm using Internet Explorer 6.
    It says: Cannot have multiple DOCTYPE declarations.
    With the view source option I see twice a doctype declaration. Although in my JDeveloper project there is only one jsp:output tag with the doctype declaration.
    When i'm using IE7 or Firefox i don't get the error. Can anyone tell me why JDeveloper generate the DOCTYPE declaration twice and how i can fix this?!

    I found out a solution...
    There is a jsp:output tag in the source who prints the Doctype ones and the other is being generated by the <afh:html> tag.
    If you delete the jsp:output tag the problem is solved...

  • Getting inner exception "dtd is prohibited in this xml document exchange" while reading emails from outlook

    Getting error "The response received from the service didn't contain valid XML." with inner exception "dtd is prohibited in this xml document exchange" while reading emails from outlook(Not while reading every mail).
    Can anybody please tell me what might be the issue. Below is the code where I am getting error
    FindItemsResults<Item> RetrievedItems=null ;
    RetrievedItems = service.FindItems(FIds, new ItemView(4));
    String[] SignatureList = ConfigurationManager.AppSettings.Get("SignatureTypes").Split(',');
    if (RetrievedItems != null && RetrievedItems.Count() > 0)
    RetrievedItems.ToList().ForEach(x =>
    try
    List<String> Attachments = new List<String>();
    List<String> ScanFileName = new List<String>();
    bool IsAvailable = true;
    //Getting error while Load() - below line of code
    ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Load();
    Vo.EmailMessage msg = new Vo.EmailMessage();
    msg.MessageId = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Id.UniqueId;
    msg.From = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).From.Address;
    ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).ToRecipients.ToList().ForEach(z => msg.To += z.Address + ",");
    ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).ReplyTo.ToList().ForEach(y => msg.ReplyToEmailAddress += y.Address + ",");
    msg.Subject = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Subject;
    msg.Body = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Body.Text;
    msg.Dated = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).DateTimeSent;
    Please help.

    Hi,
    Thank you for your post.
    This is a quick note to let you know that we are performing research on this issue.
    Niko Cheng
    TechNet Community Support

  • For security reasons DTD is prohibited in this XML document in sharepoint

    Hi,
     I am new SharePoint and still learning it.
     I have been tasked to do the following on office 365 E3 SharePoint 2013 Online edition.
     1) I have to create a Web page in asp.net
     2) This page needs to show document from a given SharePoint folder and bind them in a grid
      My code is in C#
                            ClientContext clientContextApp = new ClientContext("Apps Url");
                            clientContextApp = SPOAuthe(clientContextApp);
                            List oListDocuments = clientContextApp.Web.Lists.GetByTitle("Documents");
                            CamlQuery camlQueryDoc = new CamlQuery();
                            var qDocuments = new CamlQuery() { ViewXml = "<View><Query><Where><Eq><FieldRef Name='Externalurl'
    /><Value Type='URL'>" + decodedUrl + "</Value></Eq></Where></Query></View>" };
                            Microsoft.SharePoint.Client.ListItemCollection collListItemDoc = oListDocuments.GetItems(qDocuments);
                            clientContextApp.Load(collListItemDoc);
                            clientContextApp.ExecuteQuery();
                            foreach (Microsoft.SharePoint.Client.ListItem oListItemDoc in collListItemDoc)
                                startDate = Convert.ToDateTime(oListItemDoc["StartDate"].ToString());
                                endDate = Convert.ToDateTime(oListItemDoc["_EndDate"].ToString());
                                currentDate = System.DateTime.Now;
                                documentLocation = ((FieldUrlValue)oListItemDoc["DocumentLocation"]).Url.ToString();
          but it is following error occurred LINE-9(clientContextApp.ExecuteQuery();).
          "For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method"
                           What is missing my code?
     I am not also not sure what is the best way of achieving the functionality this?
     Thanks
     Krishna

    Below link may be helpful,
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/11b1a418-7c70-4318-9535-6a60dd26539d/dtd-is-prohibited-in-this-xml-document-systemxml-error-while-accessing-xml-file-of-form-library?forum=sqlreportingservices
    Regards, RSingh

  • Ignore DTD declaration in incoming XML message

    Hi,
    I have an issue where I am receiving an incoming XML message which starts with a DTD declaration.
    This causes an issue with the XML parser step in the mapping because the parser attempts to resolve the DTD location. However this location is external and the PI server cannot access it.
    The location for reference is http://dtd.bibit.com/paymentService_v1.dtd
    Therefore I am investigating options to ignore the DTD declaration or removing it altogether prior to the XML parser step.
    I would hope I could use either XSLT or Java mapping but do not really know where to start.
    Can anyone please provide a method of doing this ? I would prefer to use XSLT but am open to other options.
    I have no control over the DTD declaration as it is supplied by a 3rd party application. 
    Thanks
    Colin.

    Hi Russell,
    The XSLT sample you have provided does not work.
    I still get the message below in the trace file:
    <Trace level="2" type="T">Call XSLT processor with stylsheet BIBIT_PaymentResponse.xsl.</Trace>
      <Trace level="2" type="T">resolveEntity systemId = 'http://dtd.bibit.com/paymentService_v1.dtd' (publicId = '-//Bibit//DTD Bibit PaymentService v1//EN').</Trace>
      <Trace level="3" type="T">Search http://dtd.bibit.com/paymentService_v1.dtd (urn:com-dg-ng:crm:paycardauth, -1) in swcv 703fadc0-858c-11dd-971b-f2400a20801e.</Trace>
      <Trace level="3" type="T">Search http://dtd.bibit.com/paymentService_v1.dtd (-1) in swcv 703fadc0-858c-11dd-971b-f2400a20801e without namespace.</Trace>
      <Trace level="1" type="T">Resource not found: http://dtd.bibit.com/paymentService_v1.dtd Thrown: com.sap.aii.ib.server.mapping.execution.MappingClassNotFoundException: http://dtd.bibit.com/paymentService_v1.dtd at com.sap.aii.ib.server.mapping.execution.InternalMappingFinder.getInputStream(InternalMappingFinder.java:119) at com.sap.aii.ib.server.mapping.execution.InternalMappingFinder.readFile(InternalMappingFinder.java:62) at com.sap.aii.ib.server.mapping.execution.MappingLoader.getResourceAsStream(MappingLoader.java:131) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer$MappingEntityResolver.resolveEntity(AbstractMappingTransformer.java:328) at com.sap.engine.lib.xml.parser.XMLParser.scanDTD(XMLParser.java:1272) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2804) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2839) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:229) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parse_DTDValidation(Parser.java:282) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:293) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:126) at com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingXMLReader.parse(MappingXMLReader.java:102) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:387) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer.transform(AbstractMappingTransformer.java:174) at com.sap.aii.ib.server.mapping.execution.XSLTMapping.executeStep(XSLTMapping.java:79) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.SequenceMapping.executeStep(SequenceMapping.java:40) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:119) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at sun.reflect.GeneratedMethodAccessor310.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy544.processFunction(Unknown Source) 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.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:183) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:269) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)</Trace>
    I will try your Java mapping next and get back to you if I get success with this.
    Cheers for your help.
    Colin.

  • DTD and XSD Validation for xml file

    hi kindly reply to this mail guru'ssss
    i am facing a problem in parising a xml file against dtd and xsd.
    i have the dtd which contains only enitities that can be present in the xml file and the xsd file for validation against elements and attribute.
    when DTD is present then it is throwing errors like the elements should be declared.
    when i take out the doctype line and validate against schema its throwing the error that particular entity is not found or declared.
      public Vector validateSchema(String SchemaUrl, String XmlDocumentUrl)  
          SAXParser parser =new SAXParser();
         try{
             //parser.setNamespaceAware (true);     
             //parser.s
             parser.setFeature("http://xml.org/sax/features/validation",true);
             parser.setFeature("http://apache.org/xml/features/validation/schema",true);
             parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
            // parser.setProperty("http://xml.org/sax/properties/declaration-handler", new DTDHandl());
             parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",SchemaUrl);
            // parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
            // System.out.println(parser.getDTDHandler());
            // UnparsedCache cache = new UnparsedCache();
           //  parser.setDTDHandler(cache);
             InputSource inputSource =new InputSource(new java.io.FileInputStream(new java.io.File(XmlDocumentUrl)));
           //  parser.setDTDHandler(new myDTDHandler());
             //parser.setEntityResolver(new CustomResolver());
         //  parser.setContentHandler(this);
             Validator handler=new Validator();
             parser.setErrorHandler(handler); 
             parser.parse(inputSource);
             if(handler.validationError==true)
               System.out.println("XML Document is not valid");
             else                  
               System.out.println("XML Document is valid");
             for(int i=0;i<ErrorLines.size();i++){
                 System.out.println(ErrorLines.elementAt(i));
       }catch(java.io.IOException ioe){  
         System.out.println("IOException"+ioe.getMessage());   
       }catch (SAXParseException e) {
         System.out.println("SAXParseException "+e.getMessage());   
      }catch (SAXException e) {
         System.out.println("SAXException"+e.getMessage());   
         return ErrorLines;
    what could be soln to this.

    Hi
    Venky_Ferrari.
    Based on your description, your case related to XMLXSD, SO I will move your thread to
    Data Platform Development > XML, System.Xml, MSXML and XmlLite      
    forum for better support.
    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.

Maybe you are looking for