7 Replies Latest reply: Aug 16, 2013 2:04 AM by user100012345 RSS

    Report Definition not found - calling a report from JDev.

    Rooney
      Hello,

      I have the following on my local machine:
      BI Publisher
      Jdeveloper

      I created a report in BI publisher called Test1, and now I am creating a web service in jdeveloper to call it.
      I am having issues with calling it from my jdeveloper.

      here is the code I am using to call my report (below).
      Since BI publisher is installed on my local machine I tried both paths but neither are working

      1- final String reportAbsolutePath = "C:\\Test1.xdo";
      2 - "http://aramamni-us.us.oracle.com:9704/xmlpserver/~administrator/Learn/Test1/Test1.xdo"

      I am sure 2 will not work since System.out.println("calling " + myPort.getEndpoint()); returns
      "calling http://localhost:9704/xmlpserver/services/PublicReportService"

      I know the problem is with this line of code but I can't figure it out.
      repResponse = myPort.runReport(repRequest,username,password);
          public static void main(String[] args) {
              try {
                  bip_webservice.proxy.PublicReportServiceClient myPort = new bip_webservice.proxy.PublicReportServiceClient();
                  System.out.println("calling " + myPort.getEndpoint());
                  // Add your own code here
                   final String username = "Administrator";
                   final String password = "Oracle123";
                   //final String reportAbsolutePath = "/Web Service Test/HR Manager/Employee Salary Report.xdo";
                   final String reportAbsolutePath = "C:\\Test1.xdo";
                   
                  // Testing runReport
                  System.out.println("Testing runReport Service");
                  ReportRequest repRequest = new ReportRequest();
                  repRequest.setReportAbsolutePath(reportAbsolutePath);
                  repRequest.setAttributeTemplate("default");
                  repRequest.setAttributeFormat("pdf");
                  repRequest.setAttributeLocale("en-US");
                  repRequest.setSizeOfDataChunkDownload(-1);
                  System.out.println("1111111111111");
                  ParamNameValue[] paramNameValue = new ParamNameValue[1];
                  paramNameValue[0] = new ParamNameValue();
                  paramNameValue[0].setName("EMP");
                  
                  System.out.println("2222222222");
                  paramNameValue[0].setValues(new String[] {"20"});
                  //paramNameValue[1] = new ParamNameValue();
                  //paramNameValue[1].setName("p_job");
                  //paramNameValue[1].setValues(new String[] {"CLERK"});
                  repRequest.setParameterNameValues(paramNameValue);
                  System.out.println("3333333333333");
                  ReportResponse repResponse = new ReportResponse();
                  System.out.println("4444444444");
                  
                  System.out.println(username);
                  System.out.println(password);
                  System.out.println(repRequest);
                  repResponse = myPort.runReport(repRequest,username,password);
                  System.out.println("55555555");
                  String contentType = repResponse.getReportContentType();
                  System.out.println(contentType);
                  byte[] baReport = repResponse.getReportBytes();
                  
                  FileOutputStream fio = new FileOutputStream("C:\\temp\\test.pdf");
                  fio.write(baReport);
                  fio.close();
                  
              } catch (Exception ex) {
                  ex.printStackTrace();
              }
          }
      Output -> Report Definition not found
      calling http://localhost:9704/xmlpserver/services/PublicReportService
      Testing runReport Service
      1111111111111
      2222222222
      3333333333333
      4444444444
      Administrator
      Oracle123
      bip_webservice.proxy.ReportRequest@8238f4
      WARNING: The received SOAP fault contains non standard fault element: "{http://xml.apache.org/axis/}hostname".  This element will be ignored.
      javax.xml.rpc.soap.SOAPFaultException: oracle.apps.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport Failure: Due to oracle.apps.xdo.servlet.CreateException: Report definition not found:C:\Test1.xdo
           at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:565)
           at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:400)
           at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
           at bip_webservice.proxy.runtime.PublicReportServiceSoapBinding_Stub.runReport(PublicReportServiceSoapBinding_Stub.java:3733)
           at bip_webservice.proxy.PublicReportServiceClient.runReport(PublicReportServiceClient.java:173)
           at bip_webservice.proxy.PublicReportServiceClient.main(PublicReportServiceClient.java:84)
      Process exited with exit code 0.
      Thanks for the help - what can i do to solve this.

      Edited by: Rooney on May 25, 2010 2:57 PM