EJB + REST WebServices

Hi all

I am developing an EJB application and REST to display Web services for client application.

What I tried and founded:

Oracle JDeveloper 12 c (12.1.3) tutorials - building and consuming a RESTful Web Service from related database

Oracle JDeveloper 12 c (12.1.2) tutorials - creating a Web Application using EJB and JPA JavaServer Faces

http://waslleysouza.com.br/2014/10/RESTful-Web-service-no-JDeveloper-12C/

Re: The best way to implement Web service in the existing EJB application

Oracle JDeveloper 12 c (12.1.3) tutorials - web services REST-JSON consuming in Mobile Applications with Oracle Mobile Ap...

Annotation EJB REST/JSON session...?

Re: Need DataControl customer who accepts JSON of Service Rest

These are not quite what I need. There are parts that I use all of them, but at the end, when I test the webService with analizer http it doesn´t work.

Anyone know a good tutorial, from the beginning (create EJB´s, creation of the webservice_REST) to the end (customer consuming the webservice_REST) without problems?

Thanks in advance

https://blogs.Oracle.com/IMC/entry/building_simple_java_ee_rest

Tags: Java

Similar Questions

  • How to call the REST Webservices via native J2ME app.

    Hi, can someone help me how to call REST Webservices via native J2ME app. I don't want to use the HTTP request. Is there a possible way to call via AJAX, if so how? I use only the RIM and the J2ME API. Thank you, joy

    JSON is just the format fo the data returned.  So all you do is make a standard HTTP call, get the data and analyze using JSON.  OS 6.0 includes JSON, but OS 5.0 doesn't work, then you will need to get a JSON library if you want to use in the 5.0 OS.

    You might find them useful:

    http://supportforums.BlackBerry.com/T5/Java-development/JSON-library/m-p/573687

    http://supportforums.BlackBerry.com/T5/Java-development/sample-code-implementing-JSON-in-your-applic...

  • The Post of Restful Webservice method using

    Hi all

    I use jdev 12.1.3

    I'm new to the MAF.

    I want to use the Post of Restful webservice to MAF method. I have a variable defined in the service binding Restful web and if I use it with a HTTP client works not very well.

    Please let me know how to use the Post of service Restful MAF method.

    I made a data control to the Get method with json respose. Can I use the same data control with a different method for the position.

    Kind regards

    KP

    It depends on what awaits your REST webservice as input.

    You can try passing param1 = 123 & param2 = abc & param3 = load useful s bat

    The first feature film in references of function in the file application.xml - MAF is displayed by default.

  • Secure RestFul WebService call with basic authorization via https

    Hello

    is it possible to call a secure RestFul WebService with basic authorization via https to APEX?

    Database: Oracle 11g XE
    APEX: 4.2.1

    I have a solution by calling the Java Web service, which was called from the database via a scheduled task (run).

    As my hosting partner does not support Java, I'm looking for another option.

    Concerning
    Markus

    Hello

    Oracle XE can USE a wallet with utl_http without problem. Just create a portfolio from a version supporting the creation of the portfolio and copy this portfolio to your XE machine and use it. It really works.

    ---
    Lavenu
    MaxApex accommodation
    http://www.maxapex.com

    Published by: Richard on January 23, 2013 23:32

  • POST REST webservice call

    Hello

    I'm new to web services. I created a POST web service using the REST in APEX, which accepts 3 data variables and inserts them into a table.

    I don't know how to call this web service through java script POST to test works. My main question is how to send data to the web service POST.

    Hi Ally_p,

    Ally_p wrote:

    I'm new to web services. I created a POST web service using the REST in APEX, which accepts 3 data variables and inserts them into a table.

    I don't know how to call this web service through java script POST to test works. My main question is how to send data to the web service POST.

    Check out the following OBE tutorial: Creating and Using RESTful Web Service on-demand Express 5.0

    The illustrated tutorial how to create type GET/POST to web services in Oracle APEX 5.0, but unfortunately it gives example only how to consume GET kind of RESTful Services.

    For example how to use POST type of RESTful Web Service in Oracle APEX consult: https://www.youtube.com/watch?v=QnNtrxNlRgw

    Kind regards

    Kiran

  • A simple example of RESTful webservice in atg

    Hello

    I'm looking for a simple example create a RESTFul Web service in atg. I went through the documentation of the atg, but there little confusing and complicated to start with.

    Please help me.

    In the ATG, we deal with some core components that has references to java classes.

    Jersy unknown components of atg abt nuclues and there by cannot take advantage of core component.

    And we must write annotation in each class/method in Jersy.

    But with ATG rest MVC, just using configurations (actors) you can do just about any rest service component without touching the java class.

    Peace

    Shaik

  • Response of ATG10.1.1 REST webservices with respect

    Hello world


    I'm under ATG 10.1.1 REST webservieces to access the giftlist of user particular. when I run the service with http://localhost: 8080/rest/repository/atg/commerce/gifts/Giftlists/gift-point

    This URL. I get a respose as below.

    which returns

    {"article-gift": []}

    {

    "atg-rest-component-path': ' / atg/commerce/gifts/Giftlists."

    "atg-rest-point-descriptor': 'article-gift."

    'atg-rest-repository-id': 'gi140001 '.

    },................

    1. how to change or use this response for the name of Giftlist?

    as I'm naïve to REST Web services. can someone explain to me please better in this REST.

    2. we have a module Mobile REST to ATG 10.1.1 in that I found a few jsp how can we use these jsp?

    Thank you and best regards,

    Ravi

    Try this URL for the name property of access

    http://localhost: 8080/rest/repository/atg/commerce/gifts/Giftlists/gift-point/gi140001/displayName

    See the following URL for more information:

    URL of Oracle ATG Commerce Web Services - REST Web

    Get the items from the repository

  • RESTful Webservice - Page not found

    Using web services in the SQL Studio wizard, I created a simple Restful web service with a query GET the resource Type of media. The SQL statement Gets the mime_type and a blob value in a table via a parameter ID. The code works fine in my standalone environment (apex 4.2 listener 2.1) but on the cloud, when I bind the variable: ID and press the test button, it always returns "Page not found". Even when I call the ws via APEX_WEB_SERVICE. MAKE_REST_REQUEST, it returns, "Page not found".

    The test screen creates the following URL: https://database-xxxxxx.us1.oraclecloudapps.com/apex/export/get/1

    If I run the present in the browser, it also returns "Page not found". By looking at the URL, it seems wrong. Usually, the workspace is also a part of the url (after the/apex/piece). Here it is absent. However, even when I add, the error is "Page not found". I checked that the workspace has enabled Restful web services and I connect with the admin user who has all three SQL Dev granted permissions.

    Anyone seen this before? I have I have some missing permission or something wrong?

    Thank you

    Steve

    Hi Steve,.

    + > The code works fine in my standalone environment (apex 4.2 listener 2.1) +.
    Just to clarify things, which I assume is the version that you have installed locally, Oracle Application Express Listener 2.0.1 is the latest available listener and is running on the cloud. Oracle Application listener 2.0 adds support for connecting to multiple databases and includes support for a number of different strategies for routing requests to the appropriate database, each of which is described in the earphone Installation and Configuration Guide (see http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/config.htm#CBDCHGDF). All the strategies are based on the review of the request URI and choose the database based on some sort of football game against the URL and according to the chosen strategy, the URL will be different.

    + >... when I bind the variable: ID and press the test button, it always returns "Page not found"... The test screen creates the following URL: https://database-xxxxxx.us1.oraclecloudapps.com/apex/export/get/1+
    To help identify the cause of the error you see, could you please confirm if the following details correspond to your RESTful service:

    * URI model: get / {id}
    * Resource Manager method: GET
    * Type of resource manager Source: Media resources
    * Requires secure access: No.
    * Source (corresponding to the following syntax): select mime_type, tbl_nameSET from table_name where none =: id

    NOTE: If you define a variable binding for a parameter, then the 'Set Bind Variables' option should be used instead of 'Test '.

    + > Usually, the workspace is also a part of the url (after the/apex/piece). +
    In your local environment, requests are routed through the prefix setting of path to the URL of the RESTful Service (see http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/config.htm#CBDJIEGH). On your local instance, navigate to Administration > manage, set preferences for Workspace, and in the region for SQL Workshop, you will find the item Path Prefix. The default access path prefix is the short name of the workspace, which is what you see in your URL locally. However, another method of routing is used on the cloud, then you will not see the path of the prefix used it.

    Could you test the "oracle.example.hr" sample RESTful Service in your workspace and let me know if you encounter any problems by running one of the examples?

    Kind regards
    Hilary

  • Connection problem while accessing a jersey RESTful webservice using the aysynch callback method.

    Hello

    I have a consumer application and producer. Producer is a Web service based in Jersey, deployed on a tomcat server. On the consumer side I use executor service to create a planner that will keep voting and creates a new Thread where I do a req from asynchronous callback for the service (Producer). But the problem is after my executor asynch feed will die again, I see a connection to the deployment server.

    I used the yourkit Profiler, I see a thread in passable condition even when the asynch executor dies.

    I think Planner always spout there is a connection between the client and the service. I wanted to create several consumers to treat several thread, but because of the leak of thread, I'm not able to go forward.

    Could you please help me on this?

    Err, close the connection?

  • Oracle JDeveloper 11.1.1.9 didn't REST components

    Hi, I installed 11.1.1.9 and wanted to create a restful Web service project but there was no relaxing component of 'All the technology' TAB with the exception of 'Project of RESTful webservice ADF model' but disabled. I checked my list of extensions and extension of the REST web service was there. Is this a bug in 11.1.1.9?

    To my knowledge, use 12.1.3 for rest services. Have you read that they are available in 11.1.1.9?

    Timo

  • APEX listener ignores jdbc. MaxRows limit for REST Services?

    Hello

    Someone have problem with ADR when REST webservice is limited to 500 return lines?

    We use the Listener APEX APEX 4.2 2.0 and Oracle Standard Edition 12.1.

    We tried to change settings as shown here https://docs.oracle.com/cd/E37099_01/doc.20/e25066/config_file.htm#sthref122 but without effect.

    We missed something?

    Thank you

    Radovan

    The solution is very simple. Parameterjdbc.MaxRows mentioned in documentation in real world starts with small m. It is actually jdbc.maxRows .

    Hope that helps,

    Radovan

  • Download binary files with the RESTful web service = HTTP 500?

    I want to allow access to the photos (BLOBs) stored in the database via a RESTful APEX service.

    I have an API of PL/SQL existing based on wpg_docload.download_file works well when called directly on the URL (for example granted to APEX_PUBLIC_USER). I would like to re - use this API because it a lot of other things, including security and the cache.

    The code looks like:
    ===
    Photo of procedure (id number, v in varchar2) is
    l_blob blob.
    -- ...
    Start
    -security checks
    -extract the data in l_blob...
    -check if the document has been updated (304)
    -- ...
    owa_util.mime_header (l_mime_type, false);
    HTP.p ("Content-length: ' |") DBMS_LOB.GetLength (l_blob));
    HTP.p ("ETag:" | ") l_etag);
    HTP.p ('Cache-Control: public');
    owa_util.http_header_close;
    wpg_docload.download_file (l_blob);
    end;
    ===

    However, when I call this API with APEX 4.2.1 Restful WebService (the GET - PL/SQL source type resource manager) I get a "500 - internal server error" back to the listener of the APEX (2.0.0.354.17.08 - both running standalone or with Tomcat 7) - console log attached.

    A similar approach - APEX RESTful WebService API in PL/SQL call - works fine for the content of the STRING/CLOB. So it must be something to do with the wpg_docload.download_file

    No idea how to work around this bug/feature or a suggestion for an alternative approach will be appreciated.

    Jan

    -----

    February 28, 2013 21:39:03 oracle.dbtools.rt.web.WebErrorResponse internalError
    SEVERE: ORA-22922: non-existent LOB value

    java.io.IOException: ORA-22922: non-existent LOB value
    at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:204)
    at oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:169)
    at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:143)
    at java.io.FilterInputStream.read (unknown Source)
    to java.nio.channels.Channels$ ReadableByteChannelImpl.read (unknown Source)
    at oracle.dbtools.common.util.StreamCopy.drain(StreamCopy.java:75)
    at oracle.dbtools.common.util.StreamCopy.drain(StreamCopy.java:52)
    at oracle.dbtools.rt.web.ServletResponses.sendResponse(ServletResponses.java:85)
    at oracle.dbtools.rt.web.ServletResponses.sendResponse(ServletResponses.java:130)
    at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:343)
    at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:125)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    to com.sun.grizzly.http.servlet.ServletAdapter$ FilterChainImpl.doFilter (ServletAdapter.java:1059)
    to com.sun.grizzly.http.servlet.ServletAdapter$ FilterChainImpl.invokeFilterChain (ServletAdapter.java:999)
    at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:434)
    at oracle.dbtools.standalone.SecureServletAdapter.doService(SecureServletAdapter.java:65)
    at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:379)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:196)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    to com.sun.grizzly.util.AbstractThreadPool$ Worker.doWork (AbstractThreadPool.java:532)
    to com.sun.grizzly.util.AbstractThreadPool$ Worker.run (AbstractThreadPool.java:513)
    at java.lang.Thread.run (unknown Source)
    Caused by: java.sql.SQLException: ORA-22922: non-existent LOB value

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
    at oracle.jdbc.driver.T4C8TTILob.processError(T4C8TTILob.java:792)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
    at oracle.jdbc.driver.T4C8TTILob.read(T4C8TTILob.java:146)
    at oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2435)
    at oracle.sql.BLOB.getBytes(BLOB.java:348)
    at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:181)
    ... more than 33

    Hi Pat,

    problem with the "media resource" has been resolved for APEX listener 2.0.1

    See Re: error APEX listener 2.0.1 Standalone CLOB

    Jan

  • Customer connection remains for the data control

    Hello

    I ve recently created an ejb rest aplication consequence with the tutorial of:https://blogs.oracle.com/imc/entry/building_simple_java_ee_rest

    It works perfectly in factor.

    Now, I want to create the client application.

    I started to make adf web application, and in the template project, I want to get the webservice through the connection still to expose it as a datacontrol to user interface layer.

    However, I m in web service data to create order Wizard, in the first step, create the connection REMAINS, I put endpoint URL: "the url I get when deploy the web service application" but when I test gives:' error received: forbidden ' or if I put the url of a method: ' received error: the source cannot be found.'

    How can I fix it, please.

    Thanks in advance.

    Carlos

    Your REST is back JSON or XML.

    The REST data control now supports only the XML responses.

    Here's a demo of use basis:

    https://blogs.Oracle.com/Shay/entry/accessing_remote_databases_from_oracle

    If you return JSON, at this point, you create a Java class that parses the JSON and then to expose this class as a data control.

  • URL of the Web Service, LV2013 vs LV2012 length limits

    (* CROSS POST: http://lavag.org/topic/18435-web-service-url-length-limits-lv2013-vs-lv2012/ *)

    (* Please answer in this forum.  I scored the other thread for responses here. *)

    A that someone noticed a reduction in the limit on the length of the URL for the Web Services between the versions of LV 2012 and 2013?

    Under LV2012, a RESTful web service seems to accept URLS with lengths at least as long as 4096 characters.  With LV2013, the maximum length of URL seems to be 511 characters for RESTful web services as the project item. Unfortunately for me the project, I have converted just travel on this issue. My goal with posting this request here is my understanding of this limitation before deciding the best way to modify my code.  Certainly using POST instead of GET with a long URL is an option, but again, I am looking to understand the change in limitation before choosing a solution.

    To illustrate, I enclose three projects for the most part identical, demonstrating the issue.  In each case, the project contains a webservice consisting of a single VI, 'ComputeLength', which takes a string as an input parameter and that returns the length of the string.  The three projects are the following.

    1 LV2012 RESTful WebService.

    2 LV2013 RESTful WebService.

    3 LV2013 article project web service.

    The web service contains a single VI.  For the relaxing examples, the web service is started by selecting deploy menu of right-click Build specification.  For the example of project item, the web service is started by selecting start in right click menu position of work/WebService. The use of this example is shown with the following URL:

    (Note that the port is 8080 for both relaxing examples and 8001 for the project web service point if used in debug mode, which is the default value for the statement above.)

    http://localhost: 8080/webservice/computelength? string = 1234567890

    And the output looks like this.

    Workaround.  Apparently from 2013 of LV, there is a default limit of 512 to the length of the URL.  The default limit can be overridden as described below.

    Martin

    He is Brian in the technique of applications for National Instruments. I am following up about the 511 character limit in your Web Service HTTP request after the port number. After some research, I realized that the problem is related to a web site by default, the setting of the server called "LimitUri", which limits the maximum length of a URL. The default is 512 characters long that's why we are seeing this problem.

    There are several ways to modify the URL length limit depending on how you use your web service. If you publish the web service using the Application Web Server can change "C:\Program Files (x 86) \National WebServer\NIWebAppServer.conf" and add "LimitUri 4096" at the end of the file without the quotes.

    If you run the Debug Web server simply by clicking start on the web service, and then change "C:\Program Files (x 86) \National 2013\resource\webserver\niwsdebugserver.conf" and add "LimitUri 4096" at the end of the file without the quotes.

  • AJAX request works just with a Wi - fi Blackberry Widget

    I'm doing an Ajax request to're RESTful WebService. When I run the Simulator everything works fine, but when I install the widget for blackberry on my device (9800) applications works when I'm using the Wifi connection...

    It's my config.xml file:

    
    http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="0.2.0.0">
      bbbb
      bbbb
      
      
      
      
      
      
      
      
      
      
        
        
        
        
        
        
        
        
        
      
      
      
      
        TCP_WIFI
        MDS
        BIS-B
        TCP_CELLULAR
        WAP2
        WAP
      
      
      
    
    

    Why this is happening?

    Finally! I found it! I have no why, but it works only on .com, .net o .org domains

    I made the request to a .mobi domain.

Maybe you are looking for