on 06-30-2009 2:29 AM
Hi , everyone!
I tried to access the BOE's Crystal Report in my application by webservice sdk . When I want to get the report data the following Exception occurs :
09:37:32,468 INFO [STDOUT] 09:37:32,453 INFO [HTTPSender] Unable to sendViaPost to url[http://PS300NT:28080/dswsbobje/services/ReportEngine]
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.businessobjects.dsws.reportengine.ReportEngine.getDocumentInformation(Unknown Source)
at org.apache.jsp.work_005fpage_jsp._jspService(work_005fpage_jsp.java:241)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
I confirm the statement which throws exception is " boRepEng.getDocumentInformation(boReportCUID, null, null, null,boRetrieveData);"
My system environment is: BO XI 3.0 installed on a single server, and my application deployed in another server which use Jboss4.2 .
Could anyone help me?
Hi,
You should have the getDocumentInformation call 2 times in your code. 1st when it retrieves the prompt and provider information adn 2nd when it retrieves the view. Its the 2nd call that throws the error. Is that correct? Are you setting up the report prompts? I guess it could be something within your code. Try the following:
-
URL sessConnURL = new URL(serviceURL + "/Session");
Connection boConnection = new com.businessobjects.dsws.Connection(sessConnURL);
Session boSession = new Session(boConnection);
EnterpriseCredential boEnterpriseCredential = EnterpriseCredential.Factory.newInstance();
boEnterpriseCredential.setDomain(cmsname);
boEnterpriseCredential.setLogin(username);
boEnterpriseCredential.setPassword(password);
SessionInfo boSessionInfo = boSession.login(boEnterpriseCredential);
String[] biPlatformURL = boSession.getAssociatedServicesURL("BIPlatform");
BIPlatform oPlatform = BIPlatform.getInstance(boSession, biPlatformURL[0]);
String[] strBORepEngURL = boSession.getAssociatedServicesURL("ReportEngine");
ReportEngine oReportEngine = ReportEngine.getInstance(boSession,strBORepEngURL[0]);
ResponseHolder rh;
GetOptions oGetOptions = GetOptions.Factory.newInstance();
oGetOptions.setIncludeSecurity(Boolean.FALSE);
//get the report
rh = oPlatform.get("query://{select * from ci_infoobjects where si_name='test webi prompt'}",oGetOptions);
//get report id
String repID = rh.getInfoObjects().getInfoObjectArray(0).getCUID();
Action[] oActions = new Action[1];
oActions[0]= Refresh.Factory.newInstance();
//here we will retrieve information about the report specifically parameters information
RetrieveMustFillInfo boMustFill = RetrieveMustFillInfo.Factory.newInstance();
boMustFill.setRetrievePromptsInfo(RetrievePromptsInfo.Factory.newInstance());
DocumentInformation boDocInfo = oReportEngine.getDocumentInformation(repID, boMustFill, oActions, null, null);
PromptInfo[] oPromptInfos = boDocInfo.getPromptInfoArray();
PromptInfo myPrompt = oPromptInfos[0];
FillPrompts fillPrompts = FillPrompts.Factory.newInstance();
FillPrompt[] fillPromptList = new FillPrompt[1];
fillPromptList[0]= FillPrompt.Factory.newInstance();
fillPromptList[0].setID(myPrompt.getID());
DiscretePromptValue[] dPromptValues = new DiscretePromptValue[1];
dPromptValues[0] = DiscretePromptValue.Factory.newInstance();
dPromptValues[0].setValue("new value");
fillPromptList[0].setValuesArray(dPromptValues);
fillPrompts.setFillPromptListArray(fillPromptList);
oActions[0] = fillPrompts;
RetrieveData oRetrieveData = RetrieveData.Factory.newInstance();
RetrieveView oRetrieveView = RetrieveView.Factory.newInstance();
oRetrieveData.setRetrieveView(oRetrieveView);
//get the report
boDocInfo = oReportEngine.getDocumentInformation(boDocInfo.getDocumentReference(), null,oActions,null,oRetrieveData);
//get an html view of the report and write it
CharacterView myBOView = (CharacterView) boDocInfo.getView();
String docContents = myBOView.getContent();
out.print(docContents);
----
You will need to set callback optons for images within the report.
Thanks
Aasavari
Edited by: Aasavari Bhave on Jun 30, 2009 8:50 AM
Edited by: Aasavari Bhave on Jun 30, 2009 8:51 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.