BIP - Web Service

Card Puncher Data Processing

About

Getting Started with BIP Web Service

WSDL

Web Services - Description Language (WSDL)

http://<host>:<port>/xmlpserver/services/PublicReportService?wsdl

Generate Stub Classes

How to generate the BI Publisher Stub Classes

import com.oracle.xmlns.oxp.service.PublicReportService.ItemData;
import com.oracle.xmlns.oxp.service.PublicReportService.ReportRequest;
import com.oracle.xmlns.oxp.service.PublicReportService.ReportResponse;
import com.oracle.xmlns.oxp.service.PublicReportService.ParamNameValue;
import com.oracle.xmlns.oxp.service.PublicReportService.ReportDefinition;
import com.oracle.xmlns.oxp.service.PublicReportService.ScheduleRequest;
import com.oracle.xmlns.oxp.service.PublicReportService.DeliveryRequest;
import com.oracle.xmlns.oxp.service.PublicReportService.EMailDeliveryOption;

With Eclipse

See Eclipse - How to consume a web service (OBIEE) with WTP ?

Bip Eclipse Web Service

With Axis command line

See Java - Axis (Web Services / SOAP / WSDL engine)

Classpath

Include the following jar files in your classpath

  • activation.jar from the Java Activation Framework (1.1.1)
  • mail-1.4.jar from Java Mail
  • xmlpserver.jar. The Oracle BI Publisher API. (Ensure that all the required request and response objects are present and that it's not needed to generate response and request stub objects)

With the linux find command, you will find xmlpserver.jar:

find OracleBI_Home -name xmlpserver.jar
OracleBI_Home/oc4j_bi/j2ee/home/applications/xmlpserver/xmlpserver/WEB-INF/lib/xmlpserver.jar

Operation

validateLogin

Enveloppe:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
   <soapenv:Header/>
   <soapenv:Body>
      <pub:validateLogin>
         <pub:userID>gerar600bip</pub:userID>
         <pub:password>gerar600bip</pub:password>
      </pub:validateLogin>
   </soapenv:Body>
</soapenv:Envelope>

Java Class:

import java.net.URL;
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;

public class ValidateLogin {

    public static void validateLogin() throws Exception {

	final String bipEndpoint = "http://bipserver:bipserverport/xmlpserver/services/PublicReportService";
	final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
	// final String reportPath = "/HR Manager/Employee Salary Report/Employee Salary Report.xdo";

	Service service = new Service();
	Call call = (Call) service.createCall();
	call.setTargetEndpointAddress(new URL(bipEndpoint));

	System.out.println("TESTING login Service BEGIN");
	
	// Operation definition
	call.setOperationName(new QName(bipNamespace, "validateLogin"));
	call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
	call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
	call.setReturnType(XMLType.XSD_BOOLEAN);

	// issue the request
	Boolean valid = (Boolean) call.invoke(new Object[] {
		"gerardnico",
		"gerardnico"
	});

	if (valid) {
	    System.out.println("user valid");
	} else {
	    System.out.println("user invalid");
	}
	System.out.println("Success for validateLogin");
    }

    public static void main(String[] args) throws Exception {
	
	validateLogin();

    }
}

Output:

TESTING login Service BEGIN
user valid
Success for validateLogin

Documentation / Reference







Share this page:
Follow us:
Task Runner