cancel
Showing results for 
Search instead for 
Did you mean: 

only whitespace content allowed before start tag and not E

sudiptafghosh
Member
0 Kudos
481

SAP BusinessObjects BI Platform 4.3 Support Pack 3 Patch 4 Version : 14.3.3.4607.4

Java : 1.8

in my project, I want to convert report to .XML file.

the following code was from "How to export Web-Intelligence report to XML format" from SAP.

but i get the following exception

Stacktrace:] with root cause

org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not E (position: START_DOCUMENT seen E... @1:1)

at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)

at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)

at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

at com.businessobjects.sdk.core.server.internal.markup.xml.XmlReader.next(XmlReader.java:635)

at com.businessobjects.sdk.core.server.internal.markup.xml.server.ServerResponseXmlReader.next(ServerResponseXmlReader.java:192)

at com.businessobjects.sdk.core.server.internal.markup.xml.XmlReader.readToEvent(XmlReader.java:840)

at com.businessobjects.sdk.core.server.internal.markup.xml.XmlReader.readToStartElement(XmlReader.java:862)

at com.businessobjects.sdk.core.server.internal.markup.xml.server.ServerResponseXmlReader.parseCommonResponse(ServerResponseXmlReader.java:91)

at com.businessobjects.sdk.core.server.common.CommonRequestHandler.afterProcessing(CommonRequestHandler.java:105)

at com.businessobjects.sdk.core.server.internal.AbstractServer.processIt(AbstractServer.java:201)

at com.businessobjects.sdk.core.server.internal.AbstractServer.process(AbstractServer.java:163)

at com.businessobjects.sdk.core.server.internal.InstanceServer.process(InstanceServer.java:101)

at com.businessobjects.sdk.core.server.internal.blob.BlobInterpreter.getBlobInfo(BlobInterpreter.java:219)

at com.businessobjects.sdk.core.server.internal.blob.BlobInterpreter.getInfo(BlobInterpreter.java:169)

at com.businessobjects.sdk.core.server.internal.blob.BlobInterpreter.getMimeType(BlobInterpreter.java:104)

at com.businessobjects.sdk.core.server.internal.blob.RemoteBlobFactoryImpl.create(RemoteBlobFactoryImpl.java:40)

at com.businessobjects.rebean.wi.impl.services.ReportEngineOutputServiceImpl.getDocumentOutput(ReportEngineOutputServiceImpl.java:80)

at com.businessobjects.rebean.wi.internal.viewing.reports.WIReport.createView(WIReport.java:392)

at com.businessobjects.rebean.wi.internal.viewing.reports.WIReport.getXMLView(WIReport.java:224)

at org.apache.jsp.test_jsp._jspService(test_jsp.java:156)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)

at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:750)

<%@ page import = "com.crystaldecisions.sdk.occa.infostore.*" %>

<%@ page import = "com.crystaldecisions.sdk.plugin.desktop.folder.*"%>

<%@ page import = "com.businessobjects.sdk.plugin.desktop.*"%>

<%@ page import = "com.crystaldecisions.sdk.framework.*"%>

<%@ page import = "com.crystaldecisions.sdk.occa.security.*"%>

<%@ page import = "com.crystaldecisions.sdk.exception.SDKException"%>

<%@ page import = "com.businessobjects.rebean.wi.*"%>

<%@ page import = "java.util.*"%>

<%@ page import = "java.io.* "%>

<%

IEnterpriseSession boeSession;

boeSession = CrystalEnterprise.getSessionMgr().logon("username","password","SAP-server:port","sec");

IInfoStore boeIStore = (IInfoStore)boeSession.getService("InfoStore");

IInfoObjects documents = boeIStore.query("Select * from CI_InfoObjects Where SI_Name = 'MyReport'");

IInfoObject report = (IInfoObject)documents.get(0);

ReportEngines repEngines = (ReportEngines)boeSession.getService("ReportEngines");

ReportEngine wiRepEngine = (ReportEngine)repEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

DocumentInstance myDoc = wiRepEngine.openDocument(report.getID());

XMLView output = (XMLView)myDoc.getReports().getItem(1).getXMLView(XMLView.CONTENT);

Reader reader = output.getReader();

int length = 0;

FileWriter fout = new FileWriter("d:\\MyReport.xml");

while((length=reader.read()) > 0)

{

fout.write(length);

}

fout.close();

%>

Accepted Solutions (0)

Answers (0)