1 Reply Latest reply: May 22, 2012 11:54 PM by 924141 RSS

    generating a report from RTF template using WSDL from ADF

    924141
      Hi,

      I am a newbie to ADF-BIP integration.

      I am using the wsdl http://<<ip>>:<<port>>/xmlpserver/services/PublicReportService?WSDL for generating a report from RTF Template in ADF.

      We are using Oracle Business Intelligence Publisher Release 11g (11.1.1) and JDeveloper 11g (11.1.1.5.0).

      I have a couple of merge variables in my RTF template and I am passing these variable using Report Request parameters.

      below is code I added for creating the report request.
      First I created publicReportService using webservice proxy.
          public static ReportRequest getReportRequestFromBIPWithTemplate(String reportFolderOnBIP,
                                                              String reportName,
                                                              String outputFileFormat,
                                                              String template,
                                                              HashMap params) {
            String reportAbsolutePath = reportFolderOnBIP + "/" + reportName + ".xdo";
            ReportRequest repRequest = new ReportRequest();
            System.out.println("report path:  " + reportAbsolutePath);
            repRequest.setReportAbsolutePath(reportAbsolutePath);
            repRequest.setAttributeTemplate(template);
            repRequest.setAttributeFormat(outputFileFormat);
            repRequest.setAttributeLocale("en-US");
            repRequest.setSizeOfDataChunkDownload(-1);
      
            System.out.println(params.size());
            ParamNameValue[] paramNameValue = new ParamNameValue[params.size()];
            ArrayOfParamNameValue arrayOfparamNameValue = new ArrayOfParamNameValue();
      
            Set set = params.entrySet();
            Iterator iter = set.iterator();
            int i = 0;
      
            while (iter.hasNext()) {
              Map.Entry me = (Map.Entry)iter.next();
              System.out.println(i + "--->>>" + me.getKey() + " : " + me.getValue());
              paramNameValue[i] = new ParamNameValue();
              paramNameValue.setMultiValuesAllowed(false);
      ArrayOfString values = new ArrayOfString();
      if (me.getValue() == null) {
      values.getItem().add("");
      } else {
      values.getItem().add((me.getValue()).toString());
      }
      paramNameValue[i].setValues(values);
      paramNameValue[i].setName((me.getKey()).toString());
      arrayOfparamNameValue.getItem().add(paramNameValue[i]);
      i++;
      }

      repRequest.setParameterNameValues(arrayOfparamNameValue);
      return repRequest;
      }
      I generated report response bytes using below code
      
      {code:java} 
      
      repRes = publicReportService.runReport(repReq,userID,password);
      reportStream = repRes.getReportBytes();
      I could see the generated PDF but the supplied variables are NOT reflected in place of merge variables.
      Ex: In template
       
      Welcome, <<merge variable, userName>>
      {code} 
      Generated PDF should have 
      {code:java} 
      Welcome, Hello World
      {code} 
      Instead of the above I am getting
      {code:java} 
      Welcome, 
      {code} 
      
      I am looking for a suggestion, Please help me in this regard. 
      
      Thanks,
      Satya
      
      Edited by: 921138 on May 30, 2012 11:11 PM