This discussion is archived
0 Replies Latest reply: Jul 13, 2012 12:58 PM by 861167 RSS

Java API - PublicReportServiceClient.class

861167 Newbie
Currently Being Moderated
I have a BI Publisher API, publicreportserviceclient.class, that was created by a contractor in 2007 that needs to be reengineered. Code anomolies appear when opening the class in Oracle JDeveloper 11g Release 2. The code follows. What is the purpose of the _mthclass$(String s) methode.  There are many occurances of $, why?  How can I remove these unnecessary $ characters in the code without destroying the code?  Kinda lost, please help! Thanks.
package oracle.apps.xdo.webservice;

import java.io.FileOutputStream;
import java.util.Properties;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;

// Referenced classes of package oracle.apps.xdo.webservice:
//      ParamNameValue, ReportRequest, ReportResponse

public class PublicReportServiceClient
{
Couldn't fully decompile method _mthclass$
Couldn't resolve all exception handlers in method _mthclass$

  private static Service service = null;
  private static Call call = null;
  private static Class class$oracle$apps$xdo$webservice$ReportRequest; /* synthetic field */
  private static Class class$org$apache$axis$encoding$ser$BeanSerializerFactory; /* synthetic field */
  private static Class class$org$apache$axis$encoding$ser$BeanDeserializerFactory; /* synthetic field */
  private static Class class$oracle$apps$xdo$webservice$ParamNameValue; /* synthetic field */
  private static Class class$oracle$apps$xdo$webservice$ReportResponse; /* synthetic field */

  public static void main(String args[])
    throws Exception
  {
    callRunReport("Report", "pdf", "11-NOV-2009", "19-NOV-2009", "4", "13", "13-NOV-2009");
  }

  public static void callRunReport(String reportName, String reportType, String a_DATE, String b_DATE, String c_NUMBER, String d_NUMBER, String e_DATE)
    throws Exception
  {
    Properties props = new Properties();
    ClassLoader loader = Thread.currentThread().getContextClassLoader();
    java.io.InputStream in = loader.getResourceAsStream("connInfoCHANGEME.properties");
    props.load(in);
    String url = props.getProperty("BIPubWebServiceURL");
    service = new Service();
    call = (Call)service.createCall();
    call.setTargetEndpointAddress(url);
    call.setTimeout(new Integer(0x36ee80));
    QName reportReq = new QName("http://xmlns.oracle.com/oxp/service/PublicReportService", "ReportRequest");
    Class cls = class$oracle$apps$xdo$webservice$ReportRequest == null && (class$oracle$apps$xdo$webservice$ReportRequest = _mthclass$("oracle.apps.xdo.webservice.ReportRequest")) == null ? class$oracle$apps$xdo$webservice$ReportRequest : class$oracle$apps$xdo$webservice$ReportRequest;
    call.registerTypeMapping(cls, reportReq, class$org$apache$axis$encoding$ser$BeanSerializerFactory == null && (class$org$apache$axis$encoding$ser$BeanSerializerFactory = _mthclass$("org.apache.axis.encoding.ser.BeanSerializerFactory")) == null ? class$org$apache$axis$encoding$ser$BeanSerializerFactory : class$org$apache$axis$encoding$ser$BeanSerializerFactory, class$org$apache$axis$encoding$ser$BeanDeserializerFactory == null && (class$org$apache$axis$encoding$ser$BeanDeserializerFactory = _mthclass$("org.apache.axis.encoding.ser.BeanDeserializerFactory")) == null ? class$org$apache$axis$encoding$ser$BeanDeserializerFactory : class$org$apache$axis$encoding$ser$BeanDeserializerFactory);
    QName nmvals = new QName("http://xmlns.oracle.com/oxp/service/PublicReportService", "ParamNameValue");
    cls = class$oracle$apps$xdo$webservice$ParamNameValue == null && (class$oracle$apps$xdo$webservice$ParamNameValue = _mthclass$("oracle.apps.xdo.webservice.ParamNameValue")) == null ? class$oracle$apps$xdo$webservice$ParamNameValue : class$oracle$apps$xdo$webservice$ParamNameValue;
    call.registerTypeMapping(cls, nmvals, class$org$apache$axis$encoding$ser$BeanSerializerFactory == null && (class$org$apache$axis$encoding$ser$BeanSerializerFactory = _mthclass$("org.apache.axis.encoding.ser.BeanSerializerFactory")) == null ? class$org$apache$axis$encoding$ser$BeanSerializerFactory : class$org$apache$axis$encoding$ser$BeanSerializerFactory, class$org$apache$axis$encoding$ser$BeanDeserializerFactory == null && (class$org$apache$axis$encoding$ser$BeanDeserializerFactory = _mthclass$("org.apache.axis.encoding.ser.BeanDeserializerFactory")) == null ? class$org$apache$axis$encoding$ser$BeanDeserializerFactory : class$org$apache$axis$encoding$ser$BeanDeserializerFactory);
    QName reportRespqn = new QName("http://xmlns.oracle.com/oxp/service/PublicReportService", "ReportResponse");
    cls = class$oracle$apps$xdo$webservice$ReportResponse == null && (class$oracle$apps$xdo$webservice$ReportResponse = _mthclass$("oracle.apps.xdo.webservice.ReportResponse")) == null ? class$oracle$apps$xdo$webservice$ReportResponse : class$oracle$apps$xdo$webservice$ReportResponse;
    call.registerTypeMapping(cls, reportRespqn, class$org$apache$axis$encoding$ser$BeanSerializerFactory == null && (class$org$apache$axis$encoding$ser$BeanSerializerFactory = _mthclass$("org.apache.axis.encoding.ser.BeanSerializerFactory")) == null ? class$org$apache$axis$encoding$ser$BeanSerializerFactory : class$org$apache$axis$encoding$ser$BeanSerializerFactory, class$org$apache$axis$encoding$ser$BeanDeserializerFactory == null && (class$org$apache$axis$encoding$ser$BeanDeserializerFactory = _mthclass$("org.apache.axis.encoding.ser.BeanDeserializerFactory")) == null ? class$org$apache$axis$encoding$ser$BeanDeserializerFactory : class$org$apache$axis$encoding$ser$BeanDeserializerFactory);
    call.setOperationName(new QName("http://xmlns.oracle.com/oxp/service/PublicReportService", "runReport"));
    call.addParameter("ReportRequest", reportReq, ParameterMode.IN);
    call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
    call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
    call.setReturnClass(class$oracle$apps$xdo$webservice$ReportResponse == null && (class$oracle$apps$xdo$webservice$ReportResponse = _mthclass$("oracle.apps.xdo.webservice.ReportResponse")) == null ? class$oracle$apps$xdo$webservice$ReportResponse : class$oracle$apps$xdo$webservice$ReportResponse);
    ParamNameValue paramNmVals[] = new ParamNameValue[5];
    paramNmVals[0] = new ParamNameValue("a_date", new String[] {
      a_START_DATE
    });
    paramNmVals[1] = new ParamNameValue("b_date", new String[] {
      b_END_DATE
    });
    paramNmVals[2] = new ParamNameValue("c_volume", new String[] {
      c_NUMBER
    });
    paramNmVals[3] = new ParamNameValue("d_number", new String[] {
      d_NUMBER
    });
    paramNmVals[4] = new ParamNameValue("e_date", new String[] {
      e_DATE
    });
    String reportPath = props.getProperty("BIPubReportsFolder");
    reportPath = reportPath + "/" + reportName + "/" + reportName + ".xdo";
    ReportRequest req = new ReportRequest(reportPath, paramNmVals, reportType, null, null);
    String bi_username = props.getProperty("BIPubUser");
    String bi_pass = props.getProperty("BIPubPass");
    ReportResponse reportResp = (ReportResponse)call.invoke(new Object[] {
      req, bi_username, bi_pass
    });
    String bip_location = props.getProperty("BIPLOCATION");
    byte baReport[] = reportResp.getReportBytes();
    FileOutputStream fio = new FileOutputStream(bip_location);
    fio.write(baReport);
    fio.close();
  }

  public PublicReportServiceClient()
  {
  }

  static Class _mthclass$(String s)
  {
    s;
    Class.forName();
    return;
    JVM INSTR new #8   <Class NoClassDefFoundError>;
    JVM INSTR dup_x1 ;
    JVM INSTR swap ;
    getMessage();
    NoClassDefFoundError();
    throw ;
  }

}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points