Exception in thread "main" org.xml.sax.SAXParseException:

Hi everybody,
I had a code which is running good in the output till error comes,i want to remove that error in xml file and replace with blanck(or null value) by using string function.
It will be a great help if some body could modify my code .
import javax.xml.bind.Validator;
import javax.xml.parsers.*;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
import java.util.jar.Attributes;
import java.io.File;
class Reading extends DefaultHandler
public static void main(String args[])throws Exception
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
File file=new File("C://raj.xml");
sp.parse(file,new Reading());
/*XMLReader xmlr=sp.getXMLReader();
xmlr.setContentHandler(new Reading());
xmlr.parse("first.xml");*/
private Object args;
public void startElement(String uri,String localName,String qName,
Attributes attributes)
System.out.println(qName);
public void characters(char []ch,int start,int length)
String str=new String(ch,start,length);
System.out.print(str);
public void endElement(String uri,String localName,String qName)
System.out.println(qName);
// Get a validator from the schema.
//Validator validator = schema.newValidator();
/*String file;
try {
Object validator;
     Object source;
     ((Object) validator).validate(source);
System.out.println(file + " is valid.");
catch (SAXException ex) {
System.out.println(file + " is not valid because ");
System.out.println(ex.getMessage());
/* Object args;
          if (args.length != 1) {
System.err.println("Exception in thread "main" org.xml.sax.SAXParseException: The entity "content_ppov_1704781_1091806592456" was referenced, but not declared.");
System.exit(1);
//public boolean equalsIgnoreCase(String anotherString)
//String s="content_ppov_1704781_1091806592456";
//String s1="null";
//Object error = null;
//Stringreplace(content_ppov_1704781_1091806592456,null);
//return null;
//System.out.println("");
//private void Stringreplace(Object error, Object object) {
     // TODO Auto-generated method stub
/* Object internal;
     private String file;
     // Let's suppose that lines in the underlying input stream are known
// to be no greater than 80 characters long.
     // Emit an error message, and delete the resource:
               String msg = file+ "content_ppov_1704781_1091806592456";
               //void getServer().errlog(this, msg);
               delete();
                    private void delete() {
                         // TODO Auto-generated method stub
                    private void errlog(Reading reading, String msg2) {
                         // TODO Auto-generated method stub
and my raj.xml file is like this
<div>This is a data .</div>]]>
</TEXT>
</content>
&content_1234789; // this line of error is comming
</content>
thanks in advance.
The error message displaying on console is
Exception in thread "main" org.xml.sax.SAXParseException: The entity "content_ppov_1704781_1091806592456" was referenced, but not declared.
     at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
     at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:601)
     at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1264)
     at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
     at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
     at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
     at javax.xml.parsers.SAXParser.parse(SAXParser.java:331)
     at runner.Reading.main(Reading.java:18)

The error is in your XML input, not in your Java code. Probably the XML doesn't declare its encoding, so the parser assumes that it is encoded in UTF-8. And probably it contains some character (like an accented letter, for example) that is not part of the UTF-8 encoding. So contact the person who created the XML -- which is not well-formed XML, by the way -- and get them to fix it. It's possible that declaring the encoding as ISO8859-1 might work, but it might not. All depends on what the invalid character is.

Similar Messages

  • Org.xml.sax.SAXParseException: File "..\contents.dtd" not found.

    I have an xml file that has to be parsed in my application, without changing the XML. I don't have the dtd that is mentioned in the XML file.
    The code i am using to parse the xml into a Document is
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(false);
    System.out.println("Factory=" + factory.isValidating());
    DocumentBuilder builder = factory.newDocumentBuilder();
    builder.setEntityResolver(new XMLResolver());
    System.out.println("DocBuilder=" + builder.isValidating());
    Document doc = builder.parse(xml.getInputStream());
    System.out.println("doc=" + doc);
    if (doc == null) {
    return;
    The XML file is
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE contentspace SYSTEM "..\contents.dtd" [
    ]>
    <contentspace validdtd="0.0.2">
    <emscombicategory emscombisubtype="EMSCOLLECTION">
    <default name="lugares" description="lugares"/>
    <emscombi>
    <default name="alemania" description="Alemania"/>
    <commondetails copyrightowner="TME" copyright="COPYRIGHTED" price="" validfrom="" validto="" provider="terramobile" globalcontentid="ECOLL"/>
    <previewedbinarycontent preview="alemania.GIF">
    <binarycontent binarydata="alemania.OTA"/>
    </previewedbinarycontent>
    <emsringtone>
    <default name="alema" description="Himno de Alemania"/>
    <commondetails copyrightowner="TME" copyright="FREE" price="" validfrom="" validto="" provider="terramobile" globalcontentid="TMEEMEL"/>
    <previewedbinarycontent preview="alema.WAV">
    <binarycontent binarydata="alema.OTA"/>
    </previewedbinarycontent>
    <ringtonedetails composer="Tradicional" performer="Tradicional"/>
    </emsringtone>
    <emspicture>
    <default name="birra" description="Cerveza alemana"/>
    <commondetails copyrightowner="TME" copyright="COPYRIGHTED" price="" validfrom="" validto="" provider="terramobile" globalcontentid="TMEEPM"/>
    <emspicturedetails width="32" height="32">
    <previewedbinarycontent preview="birra.GIF">
    <binarycontent binarydata="birra.OTA"/>
    </previewedbinarycontent>
    </emspicturedetails>
    </emspicture>
    </emscombi>
    </emscombicategory>
    </contentspace>
    When i run this through it throws an exception with the message
    org.xml.sax.SAXParseException: File "..\contents.dtd" not found.
    I thought by setting factory.setValidating(false) it would not read the DTD, but it does.
    Is there any way to make the document model NOT attempt to read the DTD ???

    setValidating(false) has no effect on checking against the DTD.
    create your own EntityResolver rather than using new XMLResolver(): in this resolver divert the call to the DTD on an empty XML document.
    i have shown how to do so in another thread, just run a search on this forum (this hint is valid for any question btw)

  • Exception: org.xml.sax.SAXParseException

    Hi Folks,
    We are trying to parse against a dtd and we are receiving:
    org.xml.sax.SAXParseException: Relative URI "C:\SuitabilityHR.dtd"; can not be resolved without a document URI.
    The path is absolute and named correctly. Can anyone provide some direction around the cause of this exception? Thanks.

    Thanks. However we are still receiving this exception. Here is the <!Doctype> tag along with the rest of the message. We also tried the relative version. Thanks.
    <!DOCTYPE SuitAddClose SYSTEM "c:\\SuitabilityCasesInput.dtd"><SuitAddClose><XMLVersion><XMLBase>3.0</XMLBase><XMLRev>1.0</XMLRev></XMLVersion><EMMHeader/><SuitActionCode>Update</SuitActionCode><SuitCaseInfo><ClientID>00100000000000018364735</ClientID><SuitIndicator>Y</SuitIndicator><TIN/><AcctID/><AdvisorID/><GroupID/><Reason/><Topic/><SubTopic/><PaymentAmount/><SuitFields/></SuitCaseInfo></SuitAddClose>

  • Org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bo

    Hi,
    When deploying the ADF aaplication in glassfish server getting error like,
    [#|2012-12-03T14:21:53.586+0530|INFO|glassfish3.1.2|oracle.j2ee.jsp|_ThreadID=22;_ThreadName=Thread-2;|unable to dispatch JSP page: The following exception occurred:.
    oracle.jsp.parse.JspParseException:
    Error: Validator com.sun.faces.taglib.jsf_core.CoreValidator reports:
    org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bound.
         at oracle.jsp.parse.OracleJsp2Java.reportValidationMsgs(OracleJsp2Java.java:777)
         at oracle.jsp.parse.OracleJsp2Java.invokeValidator(OracleJsp2Java.java:755)
         at oracle.jsp.parse.OracleJsp2Java.checkJspTagLibValidator(OracleJsp2Java.java:653)
         at oracle.jsp.parse.OracleJsp2Java.transformImpl(OracleJsp2Java.java:522)
         at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:593)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:691)
         at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:490)
         at oracle.jsp.runtimev2.JspPageCompiler.parseAndGetTreeNode(JspPageCompiler.java:457)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:624)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:645)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:385)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:810)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:734)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
         at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
         at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:167)
         at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:363)
         at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:341)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:990)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at com.ge.ohr.dm.ui.sessionHandler.GEDMSessionExpiryHandler.doFilter(GEDMSessionExpiryHandler.java:61)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at com.ge.ohr.dm.ui.filter.GEDMSecurityFilter.doFilter(GEDMSecurityFilter.java:173)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    The code which in .jspx page is like;
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns="http://www.w3.org/1999/xhtml">
    <c:set var="gedmuiBundle" value="#{adfBundle['com.ge.ohr.dm.ui.UIBundle']}"/>
    When including the 'xmlns:c="http://java.sun.com/jsp/jstl/core' it shows the error;
    The server encountered an internal error (OracleJSP error: oracle.jsp.parse.JspParseException: <br>Error: Validator com.sun.faces.taglib.jsf_core.CoreValidator reports:<br>org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bound.<br>) that prevented it from fulfilling this request.
    Please help me on this.
    Thanks and Regards
    Binsy

    This is an ADF application, so you will probably find more help in the JDeveloper and ADF forum here:
    JDeveloper and ADF
    Best Regards,
    Chris

  • Error: org.xml.sax.SAXParseException: Line 1, Column 2049 : XML-20100:

    Hi Experts,
    While trying to run HelloWorld Program provided by devkit..... we ended up with following error:
    HelloWorld: starting
    java.lang.RuntimeException:java.lang.RuntimeException: Unknown exception. See cause.
    java.lang.RuntimeException: Unknown exception. See cause.
         at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.handleException(AxisRemoteManagersFactory.java:1023)
         at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.<init>(AxisRemoteManagersFactory.java:172)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at oracle.ifs.fdk.ManagersFactory.login(ManagersFactory.java:224)
         at oracle.ifs.fdk.ManagersFactory.login(ManagersFactory.java:131)
         at oracle.ifs.fdk.ManagersFactory.login(ManagersFactory.java:94)
         at oracle.ifs.examples.api.HelloWorld.main(HelloWorld.java:166)
    Caused by: org.xml.sax.SAXParseException: <Line 1, Column 2049>: XML-20100: (Fatal Error) Expected 'EOF'.
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at oracle.ifs.fdk.RemoteLoginManagerSoapBindingStub.login(RemoteLoginManagerSoapBindingStub.java:242)
         at oracle.ifs.fdk.client.impl.RemoteLoginManagerProxy.login(RemoteLoginManagerProxy.java:48)
         at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.<init>(AxisRemoteManagersFactory.java:160)
         ... 8 more
    Caused by: org.xml.sax.SAXParseException: <Line 1, Column 2049>: XML-20100: (Fatal Error) Expected 'EOF'.
         at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:415)
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:284)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:300)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:207)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         ... 19 more
    HelloWorld: done
    How can i resolve this problem.
    Thanks
    parker.

    Hi!
    Read this site, maybe the solution is on the bottom of the page:
    http://www.orafaq.com/forum/t/91517/0/
    "3. Verify this file to be a valid xml file. There should be no unwanted extra lines after the last element either."
    "4. Make necessary changes in the file. Save the file."
    "5. Try to deploy the application again."
    Bests!
    Tamas

  • Org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of ..

    Hello,
    I try to validate a DOM Document using:
    SchemaFactory factory=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Source schemaFile=new StreamSource("myschema.xsd");
    schema schema=factory.newSchema(schemaFile);
    Validator validator=schema.newValidator();
    validator.validate(new DOMSource(document));
    I don't validate using the parse(File) method, because I already have a DOM Tree in memory.
    BUT now I receive the following error:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'catalogue'.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
    at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
    at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
    at org.apache.xerces.jaxp.validation.XMLSchemaValidator.validate(Unknown Source)
    at javax.xml.validation.Validator.validate(Unknown Source)
    catalogue is my rootElement.
    I'm using jdk 1.4.
    Does somebody know how to solve this?
    Thank you!
    Katja

    extra information
    a part of the XSD schema:
    <?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">     <xsd:element name="catalogue">    <xsd:complexType>      <xsd:sequence>        <xsd:element ref="date_created"/>        <xsd:element ref="date_modified"/>        <xsd:element ref="comment"/>        <xsd:element ref="books"/>        <xsd:element ref="cds"/>      </xsd:sequence>    </xsd:complexType>  </xsd:element>the code I'll using:
    public class DomWriterWithValidation extends AppBo{
         public static void main(String[] args) {
              DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
              dbFactory.setNamespaceAware(true);
              final String OUR_SCHEMA="C:/_develop/asja/lib/local/domxmlliblocal/properties/xmlfiles/catalogueBig.xsd";
              SchemaFactory schemaFactory=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
              try{
                   Source schemaFile=new StreamSource(new FileInputStream(OUR_SCHEMA));
                   Schema schema=schemaFactory.newSchema(schemaFile);
                   Validator validator=schema.newValidator();
                   DocumentBuilder domBuilder=dbFactory.newDocumentBuilder();
                   File file=new File("C: /xmlfiles/catalogueDOMW1.xml");
                   Document document=domBuilder.newDocument();
                   Catalogue catalogue=getCatalogue(10,10);
                   writeXMLFile(file,catalogue,document,validator);
              }catch (Exception e) {
                   e.printStackTrace();
    public static void writeXMLFile(File file,Catalogue catalogue,Document document,Validator validator)throws SAXException{
              //1. BUILDING THE DOM TREE
              Element rootElement=document.createElement("catalogue");
              document.appendChild(rootElement);
              Element dateCreated=document.createElement("date_created");
              rootElement.appendChild(cds);
              OutputStream outputstream=null;               
                   try{
                        //2. WRITE THE DOM TREE TO AN XML FILE
                   TransformerFactory transformerFactory = TransformerFactory.newInstance();
                      Transformer transformer = transformerFactory.newTransformer();
                      transformer.setOutputProperty(OutputKeys.METHOD,"xml");
                      transformer.setOutputProperty(OutputKeys.INDENT,"yes");
                      outputstream=   new FileOutputStream(file.getPath());
                      /*With VALIDATION */
                        validator.validate(new DOMSource(document));
                   /*With VALIDATION */
                      transformer.transform(new DOMSource(document), new StreamResult(outputstream));      
              }catch (SAXException saxException){
                        System.out.println("The XML-file you are trying to create is not valid");
                        throw saxException;
              catch(Exception e){
                   e.printStackTrace();
              }finally{
                   try{
                   outputstream.close();
                   }catch (IOException ioException){
                        ioException.printStackTrace();
                        throw new RuntimeException(ioException);
    }A little part of the valid XML file I want to create:
    <?xml version="1.0" encoding="UTF-8"?><catalogue><date_created><day>1</day><month>7</month><year>2008</year></date_created><date_modified><day>1</day><month>7</month><year>2008</year></date_modified>

  • Org.xml.sax.SAXParseException with XML Report Publish

    Anyone see the following error in XML Report Publisher? This happened after I ran Employee W2 XML Interface and ran XML Report Publisher for the output of the PDF output.
    --XDOException
    java.lang.reflect.InvocationTargetException
         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 oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:570)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:684)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Caused by: org.xml.sax.SAXParseException: <Line 268, Column 6>: XML-20109: (Fatal Error) PI with the name 'xml' can occur only in the beginning of the document.
         at oracle.xdo.parser.v2.XMLError.flushErrorHandler(XMLError.java:441)
         at oracle.xdo.parser.v2.XMLError.flushErrors1(XMLError.java:303)
         at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:305)
         at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:289)
         ... 17 more
    Thanks.

    We are going to user Employee W-2 PDF.

  • Org.xml.sax.SAXParseException: Content is not allowed in prolog.

    Hi All,
    Currently i m doing some practice on JSTL and following few examples from this link http://java.sun.com/developer/technicalArticles/javaserverpages/faster/
    while doing xml-ex1.jsp
    This is xml-ex1.jsp code
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
    <html>
    <head>
    <title>JSTL Support for XML</title>
    </head>
    <body bgcolor="#FFFFCC">
    <h3>Books Info:</h3>
    <c:set var="xmltext">
    <books>
    <book>
    <title>Book Title A</title>
    <author>A. B. C.</author>
    <price>17.95</price>
    </book>
    <book>
    <title>Book Title B</title>
    <author>X. Y. Z.</author>
    <price>24.99</price>
    </book>
    </books>
    </c:set>
    <x:parse xml="${xmltext}" var="output"/>
    <b>The title of the first book is</b>:
    <x:out select="$output/books/book[1]/title"/>
    <br>
    <b>The price of the second book</b>:
    <x:out select="$output/books/book[2]/price"/>
    </body>
    </html>
    While running jsp page i m getting follwing error
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
         at org.apache.jsp.jsp.xml_002dex1_jsp._jspx_meth_x_parse_0(org.apache.jsp.jsp.xml_002dex1_jsp:152)
         at org.apache.jsp.jsp.xml_002dex1_jsp._jspService(org.apache.jsp.jsp.xml_002dex1_jsp:70)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at
    NOTE :- I m using Tomcat 5.5.14 .
    Please help me out how to resolve this problem
    Thanks & Regards
    Rupesh Kumar

    From what I understand, it has nothing to do with your JSP and all to do with the XML it's supposed to parse. It sounds malformed. Check the first tag.

  • Org.xml.sax.SAXParseException: Missing whitespace before SYSTEM literal URI

    Hi
    I've written a Java web service using WLW7.0.1. I now want to test it using SOAP
    RPC from a Java client. Having written the client, I get a "org.xml.sax.SAXParseException:
    Missing whitespace before SYSTEM literal URI" exception when I run it.
    Has anyone else come across this exception, or am I missing something glaringly
    obvious?!!!
    Thanks
    Tim

    Hi Tim,
    Could you post the entire traceback?
    Also, you might try the verify utility against the WSDL just as a check:
    http://webservice.bea.com/wsdlVerify.zip
    You are using clientgen to build the client?
    HTHs,
    Bruce
    Tim Dickson wrote:
    >
    Hi
    I've written a Java web service using WLW7.0.1. I now want to test it using SOAP
    RPC from a Java client. Having written the client, I get a "org.xml.sax.SAXParseException:
    Missing whitespace before SYSTEM literal URI" exception when I run it.
    Has anyone else come across this exception, or am I missing something glaringly
    obvious?!!!
    Thanks
    Tim

  • Org.xml.sax.SAXParseException: The markup in the document preceding the roo

    Below is the XML we are using to parse:
    <?xml version="1.0" encoding="UTF-8"?>
    <ead><archdesc level="class">desc</archdesc><eadheader audience="internal"><eadid>eadid23456</eadid></eadheader></ead>
    The application throws the exception:
    org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
         at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1189)
         at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
         at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
         at gov.nysed.vrc.xml.FAHandler.parse(FAHandler.java:44)
         at gov.nysed.vrc.web.actions.FAEditorDispatchAction.validateFA(FAEditorDispatchAction.java:857)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)...
    I tried using several editors and online XML syntax checkers. None of them complained. Also I tried removing the newline character or any spaces in the document. Didn't help either. I read in some of the forums that Xerces could be picky about spaces but even without any spaces, I am getting this exception.
    We are using Weblogic 8.1 and the default parsers... Any help is appreciated. - Thanks...

    The Java API documentation (the bit about character encodings) mentions "ISO-8859-1" but not "ISO8859-1". Try that instead?

  • Org.xml.sax.SAXParseException: Line 1, Column 1 : XML-0108: (Fatal Error)

    Hi ,
    I am using SAX parser in a java code , which compiles and parses an xml correctly in the local JVM.
    But the same code in OC4J(10g) - version 9.0.4.2 throws the following exception when traced the error stack.
    08/04/04 17:48:40 Loading file workingday.xml from directory ========================== :::java.io.BufferedInputStream@bd4e3c
    08/04/04 17:48:40 Read the xml into instream => STEP II
    08/04/04 17:48:40 Read the xml into instream => STEP II
    08/04/04 17:48:40 adding to the bankholiday list
    org.xml.sax.SAXParseException: <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    08/04/04 17:48:40 at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
    08/04/04 17:48:40 at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
    08/04/04 17:48:40 at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:305)
    08/04/04 17:48:40 at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:267)
    08/04/04 17:48:40 at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
    08/04/04 17:48:40 at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:286)
    08/04/04 17:48:40 at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:224)
    Though I have imported the following JDK parsers in the code , the Oracle's SAX parser is taking other inside the application server and throwing the above error for an xml , which is absolutely alright.
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    Please let me know why this happens? Is it a known bug in the OC4J 9.0.4.2?
    Thanks and Regards
    Antara

    hi Antara
    about "... Though I have imported the following JDK parsers in the code , the Oracle's SAX parser is taking other inside the application server ..."
    If you have used the SAXParserFactory.newSAXParser() method to get a parser, the documentation for this method says "Creates a new instance of a SAXParser using the currently configured factory parameters.".
    So you might get a different parser in a different environment.
    regards
    Jan Vervecken

  • Org.xml.sax.SAXParseException: Document root element is missing.

    Hi,
    I am trying to get the portal login id from a weblogic server based application from iplaet portal server.
    I get this follwoing error
    org.xml.sax.SAXParseException: Document root element is missing.
    at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
    at com.sun.xml.parser.Parser.fatal(Parser.java:2805)
    at com.sun.xml.parser.Parser.parseInternal(Parser.java:493)
    at com.sun.xml.parser.Parser.parse(Parser.java:284)
    at com.sun.xml.tree.XmlDocument.createXmlDocument(XmlDocument.java:226)
    at com.iplanet.portalserver.util.XMLParser.<init>(XMLParser.java:70)
    at com.iplanet.portalserver.naming.share.NamingResponseParser.<init>(NamingResponseParser.java:33)
    at com.iplanet.portalserver.naming.share.NamingResponse.parseXML(NamingResponse.java:74)
    at com.iplanet.portalserver.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:174)
    at com.iplanet.portalserver.naming.WebtopNaming.getNamingProfile(WebtopNaming.java:155)
    at com.iplanet.portalserver.naming.WebtopNaming.getServiceURL(WebtopNaming.java:57)
    at com.iplanet.portalserver.session.Session.getSessionServiceURL(Session.java:534)
    at com.iplanet.portalserver.session.Session.getSessionServiceURL(Session.java:520)
    at com.iplanet.portalserver.session.Session.getSession(Session.java:414)
    at jsp_servlet.__eatonPortalLogin._jspService(__eatonPortalLogin.java:155)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:462)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    <May 19, 2004 9:01:12 AM EDT> <Error> <HTTP> <101017> <[ServletContext(id=4873279,name=ematrix,context-path=/ematrix)] Root cause of ServletException
    com.iplanet.portalserver.session.SessionException
    at com.iplanet.portalserver.session.Session.getSessionServiceURL(Session.java:539)
    at com.iplanet.portalserver.session.Session.getSessionServiceURL(Session.java:520)
    at com.iplanet.portalserver.session.Session.getSession(Session.java:414)
    at jsp_servlet.__eatonPortalLogin._jspService(__eatonPortalLogin.java:155)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:462)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    Any help/pointers will be appreciated.
    Ashish

    Just for anyone else who hits this problem: I encountered the same issue with an XML document that XMLSpy claims is quite well formed. I opened the document in a hex editor, and there at the from was a three-byte byte order marker - the marker that I believe the UTF-8 standard says is optional. I removed these three bytes, and the file was parsed correctly.
    In this case, the XML file was created using a Microsft DOM (save).
    My solution is to make the java parser - as I use it - a tad more robust: Open the file and create an input stream - a pushback input stream. Read the first three bytes; if they are NOT a BOM, then push those bytes back. Now - in any case - give the stream to the parser to read.
    try {
    // Open file for reading.
    f = new File(path);
    FileInputStream fis = new FileInputStream(f);
    PushbackInputStream pis = new PushbackInputStream(fis);
    byte[] buf = new byte[3];
    pis.read(buf, 0, 3);
    if (! (buf[0] == 0x00EF) && (buf[1] == 0x00BB) && (buf[2] == 0x00BF) ) {
         pis.unread(buf, 0, 3);
    builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    doc = builder.parse(pis);
    catch (Exception x) {
         x.printStackTrace();
    }

  • Org.xml.sax.SAXParseException in sessions.xml

    Hello,
    Recently I migrated a 10.1.3.4 project to 11.1.1.3 and than to 11.1.2.4. When I deploy the project to the IntegratedWeblogicServer org.xml.sax.SAXParseException exceptions are thrown regarding elements in the sessions.xml.
    session.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink-sessions version="11g Release 1 (11.1.1.5.0)" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="server-session">
    <name>default</name>
    <primary-project xsi:type="xml">META-INF/kiMap.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.Oracle11Platform</platform-class>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <datasource>jdbc/AlfaDS</datasource>
    <bind-all-parameters>false</bind-all-parameters>
    <byte-array-binding>false</byte-array-binding>
    <optimize-data-conversion>false</optimize-data-conversion>
    <trim-strings>false</trim-strings>
    <jdbc-batch-writing>false</jdbc-batch-writing>
    </login>
    </session>
    </toplink-sessions>
    Exceptions
    org.xml.sax.SAXParseException: <Line 9, Column 22>: XML-24534: (Fout) Element 'datasource' is niet verwacht.
    org.xml.sax.SAXParseException: <Line 10, Column 31>: XML-24534: (Fout) Element 'bind-all-parameters' is niet verwacht.
    org.xml.sax.SAXParseException: <Line 11, Column 30>: XML-24534: (Fout) Element 'byte-array-binding' is niet verwacht.
    org.xml.sax.SAXParseException: <Line 12, Column 36>: XML-24534: (Fout) Element 'optimize-data-conversion' is niet verwacht.
    org.xml.sax.SAXParseException: <Line 13, Column 24>: XML-24534: (Fout) Element 'trim-strings' is niet verwacht.
    org.xml.sax.SAXParseException: <Line 14, Column 30>: XML-24534: (Fout) Element 'jdbc-batch-writing' is niet verwacht.
    org.xml.sax.SAXParseException: <Line 15, Column 15>: XML-24521: (Fout) Element is niet voltooid: 'login'
    Translation
    is niet verwacht = not expected
    is niet voltooid = not complete
    Please help me with this configuration.
    With kind regards
    Martin
    Edited by: Martin Schaap on May 17, 2013 2:52 AM
    Edited by: Martin Schaap on May 20, 2013 10:31 PM

    In the session.xml schema it is a choice between driver-class/url and datasource, so you need to remove the driver-class tag as you are using a datasource.
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <datasource>jdbc/AlfaDS</datasource>
    replalce with,
    <datasource>jdbc/AlfaDS</datasource>

  • Org.xml.sax.SAXParseException: Reference is not allowed in prolog

    Hi,
    I have been using DocumentBuilder to parse an xml string in our application but now came up with this exception:
    org.xml.sax.SAXParseException: Reference is not allowed in prolog
    When I looked at the xml data, I found that it does not have a prolog in it. I also found that the data contains end of line character ""&#xD;""
    " in it.
    This the xml to be parsed: (Qutoted them to view the unicodes in xml)
    "<dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:title xml:lang="en">Test metadata</dc:title>
    <dc:language>en</dc:language>
    <dc:description xml:lang="en">Blah</dc:description>
    <dc:creator>BEGIN:vcard
    FN:Jan Austin
    ORG:IBalahblahLtd
    EMAIL:[email protected]
    END:vcard</dc:creator>
    <dc:format>text/html</dc:format>
    <dc:identifier>http://gg.com/</dc:identifier>
    <dc:subject>Medicine and Dentistry</dc:subject>
    </dc:dc>"
    And in the class, I used,
    DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(file);I can not change the xml data to be parsed as the application gets this data from other targets through a web service.
    So, can anyone provide any suggestions to solve this issue please?
    Thanks,
    Shiv.

    I have tried various options by
    1. factory.setIgnoringElementContentWhitespace(true);
    2. factory.setValidation(false);
    But, none of them seems to work.
    Could anyone please giv me atleast a gist abt where to look about?
    Cheers,
    Shiv.

  • Exception in thread "main" org.apache.axis2.AxisFault: Error in extracting

    I am getting this exception when I call the web service from the client. Please help me here.
    Exception in thread "main" org.apache.axis2.AxisFault: Error in extracting message properties
         at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
         at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
         at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
         at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
         at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
         at com.ttdev.ss.SecureServiceStub.concat(SecureServiceStub.java:182)
         at com.ttdev.ss.SecureClient.main(SecureClient.java:29)
    Caused by: org.apache.rampart.RampartException: Error in extracting message properties
         at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:386)
         at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
         at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
         ... 9 more
    Caused by: org.apache.ws.security.WSSecurityException: Error in converting SOAP Envelope to Document; nested exception is:
         java.lang.UnsupportedOperationException: TODO
         at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:161)
         at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:272)
         ... 11 more
    Caused by: java.lang.UnsupportedOperationException: TODO
         at org.apache.axiom.om.impl.dom.DocumentImpl.setStandalone(DocumentImpl.java:415)
         at org.apache.axiom.om.impl.builder.StAXOMBuilder.createDocument(StAXOMBuilder.java:190)
         at org.apache.axiom.om.impl.builder.StAXOMBuilder.<init>(StAXOMBuilder.java:105)
         at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:167)
         at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:130)
         ... 12 more
    Client WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions name="SecureService"
    targetNamespace="http://ttdev.com/ss"
    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
    xmlns:wsp="http://www.w3.org/Submission/2006/SUBM-WS-Policy-20060425"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://ttdev.com/ss"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurityutility-1.0.xsd">
    <wsdl:types>
    <xsd:schema targetNamespace="http://ttdev.com/ss">
    <xsd:element name="concat">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="s1" type="xsd:string"/>
    <xsd:element name="s2" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="concatResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="r" type="xsd:string">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="concatResponse">
    <wsdl:part name="parameters" element="tns:concatResponse">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="concatRequest">
    <wsdl:part name="parameters" element="tns:concat">
    </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="SecureService">
    <wsdl:operation name="concat">
    <wsdl:input message="tns:concatRequest">
    </wsdl:input>
    <wsdl:output message="tns:concatResponse">
    </wsdl:output>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SecureServiceSOAP" type="tns:SecureService">
    <wsp:PolicyReference URI="#p1" wsdl:required="true"/>
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="concat">
    <soap:operation soapAction="http://ttdev.com/ss/NewOperation"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SecureService">
    <wsdl:port name="p1" binding="tns:SecureServiceSOAP">
    <soap:address location="http://localhost:8080/ss/p1"/>
    </wsdl:port>
    </wsdl:service>
    <wsp:Policy wsu:Id="p1">
    <sp:AsymmetricBinding>
    <wsp:Policy>
    <sp:InitiatorToken>
    <wsp:Policy>
    <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/12/securitypolicy/IncludeToken/AlwaysToRecipient">
    <wsp:Policy>
    <sp:WssX509V3Token10/>
    </wsp:Policy>
    </sp:X509Token>
    </wsp:Policy>
    </sp:InitiatorToken>
    <sp:RecipientToken>
    <wsp:Policy>
    <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/12/securitypolicy/IncludeToken/Never">
    <wsp:Policy>
    <sp:WssX509V3Token10/>
    </wsp:Policy>
    </sp:X509Token>
    </wsp:Policy>
    </sp:RecipientToken>
    <sp:AlgorithmSuite>
    <wsp:Policy>
    <sp:TripleDesRsa15/>
    </wsp:Policy>
    </sp:AlgorithmSuite>
    </wsp:Policy>
    </sp:AsymmetricBinding>
    <sp:Wss10>
    <wsp:Policy>
    <sp:MustSupportRefEmbeddedToken/>
    <sp:MustSupportRefIssuerSerial/>
    </wsp:Policy>
    </sp:Wss10>
    <sp:SignedParts>
    <sp:Body/>
    </sp:SignedParts>
    <sp:EncryptedParts>
    <sp:Body/>
    </sp:EncryptedParts>
    <sp:EncryptedElements>
    <sp:XPath>
    //*[local-name()='Signature']
    </sp:XPath>
    </sp:EncryptedElements>
    <sp:SignedSupportingTokens>
    <wsp:Policy>
    <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/12/securitypolicy/IncludeToken/AlwaysToRecipient"/>
    </wsp:Policy>
    </sp:SignedSupportingTokens>
    </wsp:Policy>
    </wsdl:definitions>

    I think you are asking this question not only on the wrong section but also on the wrong website.
    The error you are refering to is a Axis2 specific exception, you might get the best answer by posting your question to the Axis2 mailing list:
    http://axis.apache.org/axis2/java/core/mail-lists.html
    BTW your exception "java.lang.UnsupportedOperationException: TODO"
    => looks like you have some comment left over in your Web-Service invokation. Actually your WSDL has no Method "TODO" so where should this call route to? I guess you should debug your code that invokes the call. Is there really a method TODO.
    I am also a bit confused with "Client Side WSDL" actually only the server does create a WSDL file, client only reads it (maybe you have some code generator that uses the WSDL to generate some code .. but the client has no WSDL).
    Further you should post a complete working example that can be run by somebody else, espacially with such a specific problem. Otherwise I am afraid hardly anybody will push you to the right direction.
    Sebastian

Maybe you are looking for

  • Help! Did IOS5 upgrade on my iPod Touch and my music no longer plays...

    It's visible, though it's only visible in a faded grey text now.  Can view all my albums correctly, but the songs are greyed out.  I've resynced repeatedly, and this does not resolve my problem.   Any help would be greatly appreciated.

  • Anything after 3.6.3 doesn't open window, but process appears in task manager.

    After trying to upgrade from 3.6.3 Firefox never opens, it will still show that it is being used in processes under the task manager, but no window ever comes up. Version 3.6.3 works perfectly but any version after has the same effect. I am running W

  • Webi Report can not be displayed in Infoview

    Hi All, i am facing a problem with infoview. I created a report in Webintelligence and exported it to CMS. When i loggin into the Infoview, under my favorites, i can see the report. By double clicking on it , it displayed an error. What should i do t

  • Open-vm-tools-modules and kernel rebuild

    Initially when I installed open-vm-tools-modules the wiki instructed me to rebuild the kernel to include the VMWare drivers. Today there was an upgrade to open-vm-tools-modules and I was wondering if a kernel rebuild is required every time this packa

  • AAF export not working in PPCC 8.1

    Im running New Mac Pro with 10.9.5.  I have a 2 min trailer with 12 stereo tracks and 2 video tracks in my sequence that I'm trying to get out to an Avid MC for finish. Everytime I export an AAF it gets all the way to the end of the process and then