on 12-30-2014 3:40 AM
is it possible to use the RESTFul api to do a post to a opendocument URL to bypass IE's 2083 character limit?
I'm what my end goal is we have a URL that can be extremely long due to variable selections needed for our crystal report that could exceed IEs 2083 character limit for URLs.
Hello Vi Tran,
As Dan said, OpenDocument and RESTful API are two separate products.
Depending on what is your real final goal, RESTful API might fit.
For instance, it's possible, through Raylight (Webi RESTful webservice, to get a PDF output of a Webi document very simply.
Best regards,
Anthony
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vi Tran,
what I think you can do is "mix" the RestFul API with OpenDocument in the following way :
1 - logon to the API;
2 - set the query parameters of the document (your LOV);
3 - refresh the document ;
4 - save the document
5 - logoff
6 - use OpenDocument, without the parameters to open your document;
Steps 1 to 5 use RestFul API calls.
The tough step would be step 2, finding a way to pass the parameters, depending on how you intend to call OpenDocument
Cheers,
Rogerio
Hi again Vi,
each task you want to perform with the Restful API is an HTTP request you have to do (see SAP BusinessObjects Business Intelligence platform 4.1 – SAP Help Portal Page ) for further information.
These calls are GETs PUTs or POSTs to the URL.
So, to get the logon token (which is the authentication to BO server is :
GET http://localhost:6405/biprws/logon/long, passing your user, password and authentication tyoe (Enterprise, LDAP, ...)
to refresh the document with the parameters see Refreshing Documents in the documentation,
to save the document, take a look at Managing Documents - Updating the state of a Document, and finally to logoff , use POST http://<baseURL>/logoff.
Cheers,
Rogerio
I Was just trying to access the link that Rogerio provided using the URL I found in the CMC. It would give me a page not found so I was curious if some thing wasn't active.
HI, the correct URL should be :
Hi Vi,
the URL you found in the CMC should have the server name, not "Localhost". Is the Web Application Container Service (WACS) installed on the same machine as the CMC/BILaunchpad or is it on a different web server?
If you are using webi reports, then the information provided by Rogerio and Anthony applies in that you could pass paramenters using the REST APIs, but for Crystal Reports, the rest APIs will only work with a "Crystal Reports For Enterprise" report and not a standard Crystal Report created in the CR designer (crw32.exe). For that you will need to use opendocument or the .NET/Java SDKs to set the parameters.
to POST to Opendocument, sample code is provided below for the case where the serialized session (serSes) exceeds the URL limit for IE.
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.ILogonTokenMgr" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="java.net.URLEncoder" %>
<%
String cms = "localhost:6400";
String username = "administrator";
String password = "";
String authentication" = "secEnterprise";
String serSession = "";
IEnterpriseSession enterpriseSession;
try
{
ISessionMgr sm = CrystalEnterprise.getSessionMgr();
enterpriseSession = sm.logon(username, password, cms, authentication);
serSession = enterpriseSession.getSerializedSession();
}
catch(SDKException e)
{
out.println("An error has occured: " + e.getMessage());
}
%>
<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY>
<form method="post" id="applyForm" name="applyForm" action="http://localhost:8080/BOE/OpenDocument/opendoc/openDocument.jsp">
<input type="text" name="iDocID" value="AXpyoryP_Z5BoXVoM2_3kWQ" />
<input type="text" name="sIDType" value="CUID" />
<input type="text" name="serSes" value='<%= serSession%>' />
<input type="submit" value="Get" />
</form>
</br>
</br>
serSession.length <%= serSession.length()%>
</br>
</br>
<script>
function apply(){
var aa=document.getElementById("applyForm");
document.getElementById("applyForm").submit();
}
apply();
</script>
</BODY>
</HTML>
I hope this helps,
Dan
Daniel, thanks for the information. Correct it doesn't state localhost, but for privacy purposed I just reposted it as "localhost". I believe the issue is that the "WACS" is not activated but is installed. I'll have to work with our BOE person to see if we can activate this on our test system.
Thanks for the code snippet. Is it possible to do this with straight HTML5 / UI5 and not via .net?
Yeah, I'll need to check on that also but 6405 is what's set in the CMC for RESTful Web Service URL.
If I visit the following URL in the web browser: http://localhost:6405/biprws/logon/long what comes up? Just wanted to know so I can show my BOE admin what's supposed to appear.
You should see something like:
<attrs xmlns="http://www.sap.com/rws/bip">
<attr name="userName" type="string"/>
<attr name="password" type="string"/>
<attr name="auth" type="string" possibilities="secEnterprise,secLDAP,secWinAD,secSAPR3">secEnterprise</attr>
</attrs>
Regards,
Anthony
There's no restful call, but you can do an HTTP POST to Opendocument.
Have a look at the following knowledgebase article for an example,
https://i7p.wdf.sap.corp/sap/support/notes/1842106
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.