Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

BIP API - schedule and email report

Received Response
51
Views
1
Comments

Summary

BIP API - schedule and email report

Content

Hello,

I am following: Oracle BI Publisher Consulting: How to Schedule a Report with BI Publisher Web Service?  , but the part of :

Example:


DeliveryRequest dr = new DeliveryRequest();
dr.setEmailOption(em);

is giving error. Opening the class(DeliveryRequest) i found it has not the referred method (setEmailOption):

package api.types;import javax.xml.bind.annotation.XmlAccessType;import javax.xml.bind.annotation.XmlAccessorType;import javax.xml.bind.annotation.XmlElement;import javax.xml.bind.annotation.XmlType;/** * <p>Java class for DeliveryRequest complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DeliveryRequest"&gt; *   &lt;complexContent&gt; *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; *       &lt;sequence&gt; *         &lt;element name="contentType" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; *         &lt;element name="deliveryChannels" type="{http://xmlns.oracle.com/oxp/service/v2}DeliveryChannels"/&gt; *         &lt;element name="documentData" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt; *         &lt;element name="dynamicDataSource" type="{http://xmlns.oracle.com/oxp/service/v2@}BIPDataSource"/&gt; *       &lt;/sequence&gt; *     &lt;/restriction&gt; *   &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */@XmlAccessorType(XmlAccessType.FIELD)@XmlType(name = "DeliveryRequest",         propOrder = { "contentType", "deliveryChannels", "documentData", "dynamicDataSource" })public class DeliveryRequest {    @XmlElement(required = true, nillable = true)    protected String contentType;    @XmlElement(required = true, nillable = true)    protected DeliveryChannels deliveryChannels;    @XmlElement(required = true, nillable = true)    protected byte[] documentData;    @XmlElement(required = true, nillable = true)    protected BIPDataSource dynamicDataSource;    /**     * Gets the value of the contentType property.     *     * @return     *     possible object is     *     {@link String }     *     */    public String getContentType() {        return contentType;    }    /**     * Sets the value of the contentType property.     *     * @param value     *     allowed object is     *     {@link String }     *     */    public void setContentType(String value) {        this.contentType = value;    }    /**     * Gets the value of the deliveryChannels property.     *     * @return     *     possible object is     *     {@link DeliveryChannels }     *     */    public DeliveryChannels getDeliveryChannels() {        return deliveryChannels;    }    /**     * Sets the value of the deliveryChannels property.     *     * @param value     *     allowed object is     *     {@link DeliveryChannels }     *     */    public void setDeliveryChannels(DeliveryChannels value) {        this.deliveryChannels = value;    }    /**     * Gets the value of the documentData property.     *     * @return     *     possible object is     *     byte[]     */    public byte[] getDocumentData() {        return documentData;    }    /**     * Sets the value of the documentData property.     *     * @param value     *     allowed object is     *     byte[]     */    public void setDocumentData(byte[] value) {        this.documentData = value;    }    /**     * Gets the value of the dynamicDataSource property.     *     * @return     *     possible object is     *     {@link BIPDataSource }     *     */    public BIPDataSource getDynamicDataSource() {        return dynamicDataSource;    }    /**     * Sets the value of the dynamicDataSource property.     *     * @param value     *     allowed object is     *     {@link BIPDataSource }     *     */    public void setDynamicDataSource(BIPDataSource value) {        this.dynamicDataSource = value;    }}

Did things changed that drastically from bip API 11 to 12?

If so i did not find any documentation.

So now how can i accomplish the e-mail?

Thanks

Regards,

Carlos

Answers

  • Nagarjuna Reddy-149958
    Nagarjuna Reddy-149958 Rank 1 - Community Starter

    do you find any clues about error? 

                EMailDeliveryOption em = new EMailDeliveryOption();
                 ------
                ArrayOfEMailDeliveryOption er = new ArrayOfEMailDeliveryOption();
                er.getItem().add(em);
                DeliveryChannels dc = new DeliveryChannels();
                dc.setEmailOptions(er);
                DeliveryRequest dr = new DeliveryRequest();
                dr.setContentType(contentType);
                dr.setDeliveryChannels(dc);
                dr.setDocumentData(report.getBytes());

     

    but problem report attached to my mail is prefixed with .pdf and also i am struggling to find way to name my report name. Do you have any solution for that