Restful service and large parameters
Hello, all!
I need to create restful webservice in Apex 4.1 All is OK, but size of parameters in Apex is limited to 4KB.
I need to pass parameters to the size of 100KB and more. How to get around this limitation?
May be it's possible to upload files on RESTful page?
Edited by: mmb666 on 30.08.2012 22:51
mmb666 wrote:
Hello, all!
I need to create restful webservice in Apex 4.1 All is OK, but size of parameters in Apex is limited to 4KB.
I need to pass parameters to the size of 100RB and more. How to get around this limitation?
May be it's possible to upload files on RESTful page?What is "RB"? It's not a standard unit?
Similar Messages
-
RESTful service and BLOB with bind variable
Hi,
Has anyone successfully created a RESTful service with bind variable to retrieve a BLOB field and render it in an Apex app? I can create RESTful web service and render BLOB field for a record with no bind variable (single row). As soon as I add bind variable my RESTful service fails -- I get 404 Error. Without bind variable it renders both in TEST tool of Workspace and direct URL. As soon as I add a bind variable it fails either way. I have reported this in an SR to Oracle support, but thought I would post here too.
I would also like to retrieve the photo into an Apex application. Any hints would be appreciated.
Thanks,
PatHi Fateh -
Good question. You would identify the source type as a Media Resource, and use an SQL statement with the primary key and the BLOB column. When you use Media Resource, you are essentially telling your Database Cloud Service not to marshall the data, just to send it - which is exactly what you are looking for.
With this implementation, you would have to have a separate SQL call for each BLOB retrieval. However, you might be able to use a PL/SQL block as the end point for the RESTful Service and take care of multiple BLOB processing in the block.
Hope this helps.
- Rick Greenwald -
Call rest services and populate ViewObject
Hi All,
I have scenario where i need to populate the view object data from rest services and while loading the task flow i need to call the rest service and load data into view object.
So i marked java bean method as default activity in task flow where i am calling my rest service. Now i want to call a view object method in side my java bean method which is marked as default acity in task flow.
So could any body tell me how can i call a view object method in java bean method which is added as method activity in task flow?
Note: I am using jdeveloper version 11.1.1.6
Regards
Murali.Any inputs please?
-
How to authenticate with Sharepoint using rest service and jquery
Hi ,
I have a requirement where i need to authenticate with sharepoint from ios and android app using rest services and jquery.
Can anyone help me in this .
Thanks in Advance.
Regards,
SrinathHi,
According to your post, my understanding is that you want to access SharePoint data from IOS and Android app.
The following materials for your reference:
How can I authenticate SharePoint REST calls from Android App?
http://stackoverflow.com/questions/24673373/how-can-i-authenticate-sharepoint-rest-calls-from-android-app
Calling RESTful services from your Android app
http://www.techrepublic.com/blog/software-engineer/calling-restful-services-from-your-android-app/
SharePoint 2013 REST API in iOS
http://omicron-llama.co.uk/2012/12/13/sharepoint-2013-rest-api-in-ios/
Best Regards
Dennis Guo
TechNet Community Support -
Hi,
I use ODI 10.1.3.4.0 and in a new project I have to invoke Web service(department) (Web RESTFUL service).
I would like to know if it is possible via the command OdiInvokeWebService.
Should the opposite occur, what is the best solution?
Thankmmb666 wrote:
Hello, all!
I need to create restful webservice in Apex 4.1 All is OK, but size of parameters in Apex is limited to 4KB.
I need to pass parameters to the size of 100RB and more. How to get around this limitation?
May be it's possible to upload files on RESTful page?What is "RB"? It's not a standard unit? -
Do I need to install apex listener in order to use the Restful Services.
We are on apex 4.1 and use modplsql apex.
Do I need to also install apex listener in order to use the restful services or would it be just enougt to patch 4.1 to 4.1.1 and I can continue to use apex 4.1.1 with modplsql.
Thank you
KumarHi Kumar,
APEX Listener 1.1 (including your 1.1.4 installation) has a different implementation for RESTful webservices. You can access the configuration using APEX Listener's own configuration ("/listenerAdmin").
The new APEX-integrated RESTful implementation is provided with the new APEX Listener 2, which is still in Early Adpoters phase. It comes with a patch for APEX 4.1 to make 4.1 capable of using it as well. See the installation guide for the current EA release for details.
Since APEX 4.2 has been released now, I'd recommend to upgrade to this release instead of patching 4.1 if you don't have anything that would stop you from upgrading. And I expect APEX Listener 2 to be released soon as well, eventhough there hasn't been an official announcement yet.
-Udo -
Hi
How to upload images on Oracle cloud host and use it with RESTful pl/sql
For example following generate web page and display picture from Oracle web site
BEGIN
sys.htp.htmlopen;
sys.htp.headopen;
sys.htp.title('Title');
sys.htp.headclose;
sys.htp.bodyopen;
sys.htp.print('Hello World');
htp.p('<img src="http://www.oracle.com/us/hp01-thumb-bobevans-1896147.jpg" >');
sys.htp.bodyclose;
sys.htp.htmlclose;
END;
How to copy hp01-thumb-bobevans-1896147.jpg image on https://database-trialXXXX.db.us1.oraclecloudapps.com?
and refer to it as
htp.p('<img src="https://database-trialXXXX.db.us1.oraclecloudapps.com/pics/hp01-thumb-bobevans-1896147.jpg" >');
Thanks
LeonLeon -
If I follow your question, you are asking how to retrieve images with RESTful Web Services. It looks like your code assumes that RESTful Web Services have access to an underlying directory in the Cloud. This is not correct - Database Cloud users have no access to a file system. Instead, you would store your images in the database and use the Media Resource source type to return a .jpg without any translation or marshalling by the RESTful handler.
Hope this helps.
- Rick Greenwald -
Hi,
What the difference betwwen the wcf rest service and web api? When to choose to use the web api?Hi Andrewsys,
>>What the difference betwwen the wcf rest service and web api?
For the difference betwwen the WCF Rest Service and Web API, please try to refer to the following information:
WCF Rest Service:
To use WCF as WCF
Rest service you have to enable webHttpBindings.
It support HTTP GET and POST verbs by [WebGet] and [WebInvoke] attributes respectively.
To enable other HTTP verbs you have to do some configuration in IIS to accept request of that particular verb on .svc files
Passing data through parameters using a WebGet needs configuration. The UriTemplate must be specified
It support XML, JSON and ATOM data format.
Web API:
This is the new framework for building HTTP services with easy and simple way.
Web API is open source an ideal platform for building REST-ful services over the .NET Framework.
Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats)
It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection, unit testing that makes it more simple and robust.
It can be hosted with in the application or on IIS.
It is light weight architecture and good for devices which have limited bandwidth like smart phones.
Responses are formatted by Web API’s MediaTypeFormatter into JSON, XML or whatever format you want to add as a MediaTypeFormatter.
>>When to choose to use the web api?
Choose Web API when you want to create a resource-oriented services over HTTP that can use the full features of HTTP (like URIs, request/response headers, caching, versioning, various content formats).
Choose Web API when you want to expose your service to a broad range of clients including browsers, mobiles, iphone and tablets.
For more information, please try to refer to the following articles:
https://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx .
http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html
http://blogs.msdn.com/b/fkaduk/archive/2014/01/07/rest-wcf-vs-webapi-throughput.aspx .
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to upload Images to azure media services and show the image on on click on Link?
Hi,
I want to upload the image to the Azure media service asset and show the Link on the page. When use clicks on the Link I want to show it user. How can I implement this with C#? Now I am uploading the image to asset as in the normal way and getting the URL
for that. But I am not able to show it user when he click on the image link.
Thanks,
Pavankuamr H KHI
Azure media services has a RESTful service and a C# SDK that you can use to interact with the Azure Media Services.
Here is the documentation and sample code for calling the Media services and using the SDK:
https://msdn.microsoft.com/en-us/library/dn735908.aspx?f=255&MSPPError=-2147217396
Aram Koukia | Blog: koukia.ca | Twitter:
@aramkoukia -
Rest service DELETE doesn't work with OSB
Hi,
I am using OSB 11g, I am using OSB proxy to monitor external rest services call. I've created a business service that point to the external rest service and I created a proxy that is routed to my business service. I modified the flow by adding a piplinepairNode -->requestPipline-->stage -->created two assign and created two variable one for the id and another one for the productID. Then I modified the business service flow as follow:
created two insert, one to define the method, which is DELETE and another one to set the relative-URI to the productID variable and I set the response to replace the . in the body with $body, following this post: http://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1
When I test it using osb console Execute, I can see my productID variable is set to $inbound and it is passed all the way to the business service, where it should call the external rest service with the relative-URI, which is set to my productID. it doesn't work, I get 404 error, which is undefined, I believe the reason is because business service is trying to call the external rest service with
http://localhost:{port}/deleteProduct and the rest service expect this URL
http://localhost:{port}/deleteProduct/2 or {productID}
can you please help and tell me what I'm doing wrong?
appreciate any kind of help
Thanks
M.Please refer -
http://blogs.oracle.com/jeffdavies/entry/enhanced_rest_support_in_oracl
Regards,
Anuj -
Want to access RESTful Services through Java Program
We are trying to access RESTful Services exposed by Oracle database cloud through our Java code, with authentication enabled for a particular user.
Till now, we have completed below steps:
1) We have a working account with Oracle database cloud (Username – xxx.xxx)
2) We log in using the credentials for above account, and navigate to Oracle Apex ? SQL Workshop ? RESTful Services
3) We create a new “RESTful Service Module” by filling out the details as below:
Name: SampleTest
URI Prefix: test
URI Template: /getallemp
Pagination Size: 25 (kept to default)
Required Privilege: TestGroupPrivilege
Resource Handler Details:
Method: GET
Source Type: Query
Format: JSON
Source: select * from emp
After creating the above module and testing it, it works fine and the data is retrieved in JSON successfully.
The resulting URL for above RESTful Service Module is: https://<HOST_URL>/apex/test/getallemp
Note that “TestGroupPrivilege” is a privilege assigned to the user group “RESTful Services” and the user “xxx.xxx” is a member of “RESTful Services” user group.
4) We are unable to call the RESTful services from Java program. We are passing username and password in request header as basic authentication. But, we are getting: Error 500--Internal Server Error
5) If we change the “Required Privilege” to default i.e. no privileges present on the module, we can get the response through Java code and everything works perfectly fine.
Please suggest us in: How to access RESTful Services through Java code by passing user credentials in HTTP header for authentication. Also let us know if we have to do any settings through Apex, in case we are missing any.
Message was edited by: NeerajGirolkar
- When we are logging in to Oracle cloud on browser and execute the Oracle cloud RESTful service in another tab of same browser, we are able to get the result. But when executed the same RESTful service from a different browser or java program we get internal server error.
- After investigation, we found that when user logs in to oracle database cloud, a cookie is set in browser with name s “OAMAuthnCookie_cstest-domo.db.us1.oraclecloudapps.com:443” and value as some random token. This cookie is passed in the subsequent requests to the RESTful Service calls when using same browser and as a result, we are able to get the results
- In the Java program, we copied the same cookie with random token in the HTTP Request header and we got the proper response from REST APIs.
- It seems that this cookie is created by an Oracle Middleware tool/server called as OAM – Oracle Accounts Manager, which sends the authentication token after successful authentication and creates the cookie.
- We found that the cookie that OAM creates on authentication is exactly in the same format i.e. ‘OAMAuthnCookie_cstest-domo.db.us1.oraclecloudapps.com:443’. So, we are guessing that Oracle cloud uses OAM for authentication. Please refer to following link for same : http://docs.oracle.com/cd/E14571_01/doc.1111/e15478/sso.htm
Can anyone please suggest:
1. How to provide authentication to Oracle Cloud REST APIs from java program?
2. How to pass the username and password in Java code to OAM (or how to communicate with OAM using Java) so that we can receive the unique token from OAM. We can use the token in the further requests? 3. Also in Oracle cloud white papers , it is mentioned that they support OAuth2.0. But we didn’t find any URLs for same. Can anyone please confirm?
Thanks
~ Neeraj GirolkarHi Nilesh,
We tried to connect to Oracle Cloud Database using the way you suggested above, but unfortunately it is not working as well.
Can you let us know the authentication process with Oracle Cloud Database? We found in documentation that it uses OAM (Oracle Access Manager) for authentication. Can you tell us a bit about that? That will be extremely helpful.
Thanks,
- Neeraj -
About the Error after applying product key for bing search rest service
For the Project Siena I ve created the product key for Bing search rest service and i applied that product key which is valid even though i got the error when i click TRY button .can anyone please help me to find the solution
There was an error in retrieving sample data. Error : Unable to reach service. Please check if your service connector configuration is valid and you have network connectivityHello,
Thanks for your post. I am jotting down few steps to get the Bing search account key (you may have completed many/all of these).
To add Bing Search Service, go to
https://datamarket.azure.com/account/datasets and search for "Bing Search API". After you have subscribed to the service, navigate to "My Data" and click on Use. Click on Show and copy the
Primary Account Key information.
Note if your key contains a special character like / or = then double clicking on the content will copy the key partially.
Make sure you have copied the full key correctly. If the is incorrectly pasted in Siena's Primary Account Key field, you will get the error below:
This is similar to the error you have posted. Since the Primary Account Key is masked you can never be sure the contents are correct. It's best to clear the field and paste the key again.
If you still face the issue, please post your machine configuration (x86/OS) information.
Hope this helps,
-Karthik
This posting is provided "AS IS" with no warranties and confers no rights. -
InfoPath combined with Excel Rest services gives State service error
Hi
I'm having a problem with InfoPath and Excel Services. I have a InfoPath form that calls Excel to do a fairly simple calculation, but I also have another form at a client that is doing the same calling a much more complicated function.
The error I get is
SharePoint Server
State Service
bm1k
Medium
StateSqlSession.GetItemBytesInternal() Locked row in database for key ba18f90ee2e844468b08e90ad96dff2c_05967b71a21948d39b7d4d3ada9b27c9 for 4 seconds
SharePoint Server
State Service
bm0t
Unexpected
StateManager.GetState() Locked data (05967b71-a219-48d3-9b7d-4d3ada9b27c9)
InfoPath Forms Services
Runtime - State Service
b5st
Medium
MOSS StateService threw an exception: A Microsoft SharePoint Server State Service error occurred while processing your request. For more information, contact your server farm administrator.
I have determined that if the user is in the Members group, then it works, but as soon as the user is in another group, it gives the error. I have played around with permission levels, given the user all rights, but it still gives that error.
Does anyone have any idea about what might be the problem? I have thought that it's a problem on the state service, but it isn't configurable. I don't want to resort to put everyone into the Members group, as that doesn't seem to be a solution that will
work with everyone. We are on the June 2012 CU.Thanks Sergio. I tried that but unfortunately didn't fix the problem. I have given the groups Contribute rights, Full Control rights, create my own custom permission level, nothing works except when the user is in the Members post.
I realised today that the error I posted above is a bit misleading. The error that happens first before that one is this (after removing timestamps and correlations):
Entering monitored scope (Request (POST:https://<server>/ContentHub/_layouts/Postback.FormServer.aspx))
Name=Request (POST:https://<server>/ContentHub/_layouts/Postback.FormServer.aspx)
Site=/
Access denied.
Thread was being aborted.
Not persisting state for request due to previous errors. Form Template: urn:schemas-microsoft-com:office:infopath:Expense-Claims-With-Excel:-myXSD-2004-12-26T20-14-04
Unhandled exception processing request for PostbackPage Microsoft.Office.InfoPath.Server.Util.InfoPathFatalException: Exception of type
'Microsoft.Office.InfoPath.Server.Util.InfoPathFatalException' was thrown.
at Microsoft.Office.InfoPath.Server.Util.GlobalStorage.get_CurrentFormId()
at Microsoft.Office.InfoPath.Server.Util.GlobalStorage.get_CurrentContext()
at Microsoft.Office.InfoPath.Server.Util.GlobalStorage.IsDefined(GlobalItems key)
at Microsoft.Office.InfoPath.Server.Controls.DateFormattingInfo.TryGetCachedTimeZoneId(UInt16& timeZoneId)
at Microsoft.Office.InfoPath.Server.Controls.DateFormattingInfo.GetSPTimeZoneObject()
at Microsoft.Office.InfoPath.Server.Controls.DateFormattingInfo.CalculateSPLocalTimeOffset()
at Microsoft.Office.InfoPath.Server.Util.GenericUtils.GetServerTimeZone()
at Microsoft.Office.InfoPath.Server.DocumentLifetime.ErrorPageRenderer.RenderResult(TextWriter writer, Document document, EventLogStart eventLogStart)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.ErrorPageRenderer.RenderForException(HttpContext context, Exception exception, Document document, EventLogStart eventLogStart)
at Microsoft.Office.InfoPath.Server.Controls.PostbackPage.OnPreInit(EventArgs e)
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The error I first posed is I think the reaction to this exception. The strange thing is that the user can access the spreadsheet fine. When I go to the URL that is used for the rest service and just remove the $format parameter, it displays it fine as a HTML
value. -
RESTful Service: Expose BLOB file inside DB as RESTful service ??
Hello,
With Oracle Cloud we can expose the Data as RESTful Web Service, but how about exposing BLOB... we need to generate a link for that file which is stored in the DB.
To make it clearer:
Two Tables:
Properties (Property_ID number PK, Project varchar2(40), Property_number varchar2(20) ...)
Images (ID number PK, Property_ID number FK, content blob,
mimetype varchar2(200), filename varchar2 (200), filesize varchar2 (200))And I would like to expose this query as RESTful :
Select p.property_id, p.project, p.property_number, i.content
from properties p inner join images i on (p.property_id = i.property_id)Usually we use: [url http://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_util.htm#CHDICGDA] apex_util.get_blob_file_src , but that one should be called from a valid apex session !!!!! ( in that query "i.content" should give a link.)
How can we do it ???
Another point, since we expose the data as JSON:
Suppose I have a property with 10 images, then it does not make sense to get 10 rows fro the same property just to give different image. I think we need another level (nested level) for images !!!
I hope that my point is clear,
Thanks in advance ....
FatehHi Fateh -
Good question. You would identify the source type as a Media Resource, and use an SQL statement with the primary key and the BLOB column. When you use Media Resource, you are essentially telling your Database Cloud Service not to marshall the data, just to send it - which is exactly what you are looking for.
With this implementation, you would have to have a separate SQL call for each BLOB retrieval. However, you might be able to use a PL/SQL block as the end point for the RESTful Service and take care of multiple BLOB processing in the block.
Hope this helps.
- Rick Greenwald -
The Opration timed out occurred on calling REST Service in Addin in windows 7 ultimate 64 bit
Hi,
I have created VSTO solution for Outlook Addin in Visual studio 2010.
In that on button it will call Java REST webservice and validating the username and password.
Evrything working fine in few systems.But it showing "The operation timed out" in WIndows 7 64 bit office 2013.
In other windows 7 machine with office 2010 and 2007 its working perfectly.
Below is the code :
var responseMessage = (String)null;
var request = WebRequest.Create(string.Concat(serviceUrl, resourceUrl)) as HttpWebRequest;
if (request != null)
request.ContentType = "application/xml";
request.MediaType = "text/xml";
request.Method = method;
request.keepalive=false;
request.ContentLength = xmlRequestBody.Length;
ServicePointManager.Expect100Continue = false;
//var objContent = HttpContentExtensions.CreateDataContract(requestBody);
if (method == "POST" && xmlRequestBody != null)
byte[] requestBodyBytes = ASCIIEncoding.UTF8.GetBytes(xmlRequestBody.ToString());
request.ContentLength = requestBodyBytes.Length;
using (Stream postStream = request.GetRequestStream())
postStream.Write(requestBodyBytes, 0, requestBodyBytes.Length);
if (request != null)
request.Credentials = new NetworkCredential("Username", "password");
//request.ProtocolVersion = HttpVersion.Version11;
var response = request.GetResponse() as HttpWebResponse;
if (response.StatusCode == HttpStatusCode.OK)
Stream responseStream = response.GetResponseStream();
if (responseStream != null)
var reader = new StreamReader(responseStream);
responseMessage = reader.ReadToEnd();
else
responseMessage = response.StatusDescription;
return responseMessage;
Could you please help what could be the reason.Any firewall issue or any serviced related issue.Kidly suggest.Hi,
I have created the windows application using REST Service and tested the application on
windows 7 64 bit Ultimate edition but I'm getting the same error "The
operation timed out" attached the screen shot for your reference.
http://www.screencast.com/t/YeIJxl383a
I developed the application on Windows 7 Ultimate 64 bit version it is working on my machine. while the executing exe on another windows 7 64 bit Ultimate
edition which is on the virutal machine Im getting the error.
There is no visual studio installed on the Virtual machine , i have installed the Dot Net frame work 4.0 client profile on the virtual machine.
Could you please suggest is there any issues related to opearating system or related to framework.
Kindly help with some suggestions.
Maybe you are looking for
-
Hi, i'm having problems with the text input feature, i'd created a comment field but when typing it go only in one line. I would like to know if theres any way to make alow typing in more than one line in the same text field. Sorry for my english, th
-
I had a major crash of Firefox - maybe virus or malware. I think computer is clean now. I deleted all Mozilla/Firefox files I could find and re-install Firefox. Will not run in safe mode (same error). Since I deleted Firefox/Mozilla files, I can not
-
i need help with my ipod. i have ben locked out and it is disabled so i tried the whole press home and stuff and connect t the computer and it works for a while but then a message pops up saying therre was an error updating it or something.
-
Reversal of Input VAT credit taken in case of EOU sales within State
Dear All, Whenever my client sells material to EOU within state, they have to reverse the corresponding input tax credit taken on the Raw material purchase from the supplier from the same state. if they supply the same from imported materials or from
-
I'm a new user of XML. I've a very important question: Is it possible create an XML file using some java package? If yes what package i must use? JDOM is the right product? Thanks