Rest Web service

How to use the web service rest in the blackberry for the answers platform

Same as you would project in any other JavaScript. The only extra thing you need to do is Server whitelist in your config.xml file.

Tags: BlackBerry Developers

Similar Questions

  • Could not find 'MAF Business objects of REST Web Service' in the Gallery

    Hello

    I installed Jdev studio 12.1.3.0.0 and installed updates for the extension of the MAF. It shows screen-Extensions on Jdev Mobile Application Framework.

    I have windows 32-bit and using the version compatible jdev.

    But there is no option for the creation of 'MAF Business objects of REST Web Service' in the gallery.

    Can someone please help.

    I am also attaching screenshot.

    Thank you

    Abbas Qureshi

    Abbas,

    This wizard is part of the A-team Mobile Accelerator persistence (AMPA), which is a separate JDeveloper extension that works on top of the MAF.

    See this article start for more information.

    Steven Davelaar,

    Oracle Mobile & Cloud A-team.

  • UTL_HTTP to call the RESTful web services

    I tried a few days to access a REST Web service and the response is an HTML element:

    Supported media not taken type > 10.4.16 415

    > the server refuses the request because the entity of the request is in a format not supported by the resource for the requested method.

    It works from the browser (Mozilla). And there is demand:

    https://xmlhub-test.xxx.xx/xmlhubws/jersey/SubmitMessage

    POST/xmlhubws/jersey / SubmitMessage HTTP/1.1

    Host: xmlhub - test.xxx.xx

    User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:12.0) Gecko/20100101 Firefox/12.0

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

    Accept-Language:-us, en; q = 0.5

    Accept-Encoding: gzip, deflate

    Connection: keep-alive

    Referer: https://Portal-test.xxx.XX/portal/page/Portal/xxx/extranet/opma_main/xxxx/wsclient-xmlhub.html

    Cookie: JSESSIONID = JjhpJTqKsRYFGCjL3QLV2GcYMJHLvLDVlBL5hyh5FN8K2qyb10PR!-621147356! 625535808; ObSSOCookie=s47sUDozSHzJ%2FarHPqrcaD5LkcFJXEmkuTQKr51UYXa3lZPjeNHKjzaUmxYbPxLkZYaaztIqCJwodlHpo6D4jR%2FVkKhmd%2Bcc9dJg4jw9cA3Kn%2FZxiwe3RA1Fyf2A%2BFLgy6eQStLzV6C9QbOi2lersS9gZBbYEy28etCXhPgMuOavl3Xtnf%2BeMVCj4Hg2QQxZSt%2FHjkSWRh%2FyVhDevt2yUo4zpoLTZ7ZKX28um6FO8CCXUTCvSlljWSzhzmSL9SwO;     RSERVER_XMLHUB_TEST_TCP_7012 = R1894177232

    Content-Type: multipart/form-data; Boundary = - 204562724022109

    Content-Length: 2607

    -204562724022109

    Content-Disposition: form-data; name = "content"; filename = "abc - 01.xml".

    Content-Type: text/xml

    <? XML version = "1.0" encoding = "UTF-8"? >

    ETC.

    and my code is:

    -UTL_HTTP. CLOSE_PERSISTENT_CONNS (g_wsdl_url);

    Utl_http.set_response_error_check (false);

    Utl_http.set_detailed_excp_support (true);

    Utl_http.set_cookie_support (true);

    Utl_http.set_transfer_timeout (60);

    Utl_http.set_follow_redirect (3);

    Utl_http.set_persistent_conn_support (true);

    UTL_HTTP. SET_WALLET (xxxx, xxxxx);

    v_http_request: = utl_http.begin_request ("https://xmlhub-test.xxx.xx/xmlhubws/jersey/SubmitMessage ', ' POST ',' HTTP/1.1 '");

    Utl_http.set_body_charset (' v_http_request, ' UTF-8 ');

    Utl_http.set_authentication (v_http_request, xxxx, xxxxxx, "basic", false);

    UTL_HTTP.set_header(v_http_request,'Host','xmlhub-test.xxx.xx');

    UTL_HTTP.set_header(v_http_request,'User-Agent', 'Mozilla/5.0 (Windows NT 5.2;)) RV:12.0) Gecko/20100101 Firefox / 12.0 ');

    Utl_http.set_header(v_http_request,'Accept','Text/HTML,application/XHTML+XML,application/XML;q=0.9,*/*;q=0.8 ');

    UTL_HTTP.set_header(v_http_request,'Accept-Language','en-US,en;q=0.5');

    -UTL_HTTP.set_header (v_http_request, 'Accept-Encoding', 'gzip, deflate');

    Utl_http.set_header (v_http_request, 'Connection', 'keep-alive');

    -UTL_HTTP.set_header (v_http_request, 'Referer','https://portal-test.bnr.ro/portal/page/portal/BNR/extranet/opma_main/opma/wsclient-xmlhub.html');

    text/html; Charset = UTF - 8-' multipart/form-data ".

    Utl_http.set_header (v_http_request, 'Content-Type', ' multipart/Form-data');

    Utl_http.set_header (v_http_request, "Transfer-Encoding", "chunked");

    Utl_http.set_header (v_http_request, "Content-Length", l_clob_len);

    Utl_http.set_header (v_http_request, 'id', '"downloadMessage" ');

    Utl_http.write_text (v_http_request, p_xml.getStringVal ());

    ...

    What can I do? How cand I try. I tried dozens of variants (query of xml > 180 files).

    Please help me.

    Tjank you!

    Generate a model for POST UTL_HTTP, of the w.

    I suggest using the free version of SoapUI for this. Very simple. Create the new project of REST. Enter w location (URL). Generates a sample call and look at how the HTML call is formatted. You can also trigger test POST CALL using SoapUI. When it works, copy - paste this MESSAGE template for use in PL/SQL

    From what you have posted, it seems to be an error in user code. So if you can get the details of the correct POSITION, the user code should work.

  • the RESTful web service and database NoSql.

    I configured a database version Oracle NoSQL 3.0.5.

    I wrote the below 12 c JDev RestFul web service.

    the Rest works well, but when running query (GET) it returns the following error.

    I don't know how to correct it. Need help

    package store;

    import com.hp.hpl.jena.query.Query;
    import com.hp.hpl.jena.query.QueryExecution;
    import com.hp.hpl.jena.query.QueryExecutionFactory;
    import com.hp.hpl.jena.query.QueryFactory;
    import com.hp.hpl.jena.query.ResultSet;
    import com.hp.hpl.jena.query.ResultSetFormatter;
    import com.hp.hpl.jena.query.Syntax;
    import com.hp.hpl.jena.rdf.model.Model;

    Import javax.ws.rs.GET;
    Import javax.ws.rs.Path;
    Import javax.ws.rs.Produces;

    Import oracle.kv.impl.api.ops.Get;

    Import oracle.rdf.kv.client.jena.OracleModelNoSql;
    Import oracle.rdf.kv.client.jena.OracleNoSqlConnection;

    @Path ("store")
    public class StoreResourceHandle {}
    public StoreResourceHandle() {}
    Super();
    }

    public static String queryStoreNoSQL() {}
    String StoreName = "semep;
    String HostName = 'localhost ';
    String HostPort = "5000";
    String szModelName = "http://example.org/Captation";
    String ModelName = "http://Repository";
    OracleNoSqlConnection conn = OracleNoSqlConnection.createInstance (StoreName, HostPort, HostName);
    Model = OracleModelNoSql.createOracleModelNoSql (ModelName, conn);

    String szQuery = "SELECT? s? p? o\n +.
    "where {\n" +
    "  { ?s  ?p  ?o}\n" +
    "}";


    System.out.println ("Execute query" + szQuery);

    Query query = QueryFactory.create (szQuery, Syntax.syntaxARQ);
    QueryExecution qexec = QueryExecutionFactory.create (query, model);
    ResultSet results = qexec.execSelect ();
    String textResults = ResultSetFormatter.asText (results);

    qexec. Close();
    Model.Close ();
    Conn.Dispose ();
    Return textResults;
    }


    @GET
    @Produces("text/plain")
    public String getStoreQuery() {}
    String result = StoreResourceHandle.queryStoreNoSQL ();
    System.out.println ("result");
    return the result;
    }

    }

    [Running the application on IntegratedWebLogicServer StoreResource...]
    [21: 45:44] StoreWebApp.war of Module Web recognized in the project Store.jpr
    [Another instance of the storeresource application is running on the server.  JDeveloper redeploy the application.]
    [21: 45:44]-deployment began.  ----
    [21: 45:44] the target platform's (Weblogic 12.x).
    [21: 45:44] recovery of the existing application information
    [21: 45:44] analysis of the dependence running...
    [21: 45:44] deployment 2 profiles...
    [21: 45:44] wrote on the Web for C:\Users\memus\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\o.j2ee\drs\StoreResource\StoreWebApp.war application Module
    [21: 45:44] wrote the Module Enterprise Application to C:\Users\memus\AppData\Roaming\JDeveloper\system12.1.2.0.40.66.68\o.j2ee\drs\StoreResource
    [21: 45:44] application is not transferred
    [21: 45:44] the constriction of context following URLS have been defined and can be used as a starting point for testing your application:
    [21: 45:44] http://localhost:7101 / StoreResource-store-context-root
    [21: 45:44] time to deployment: 1 second
    [21: 45:44]-deployment is complete.  ----
    Run start time: 554 ms.
    [Application running on IntegratedWebLogicServer StoreResource]

    Target application w- http://localhost:7101/StoreResource-Store-context-root/resources/application.wadl

    Target URL - http://localhost:7101 / StoreResource-store-context-root/resources/store
    < 25 may 2014 21: 45 CEST > < error > < com.sun.jersey.spi.container.ContainerResponse > < BEA-000000 > < exception contained in MappableContainerException could not be mapped to a response, re - throw to the HTTP container
    java.lang.NoClassDefFoundError: oracle/rdf/kv/customer/jena/OracleNoSqlConnection
    to the store. StoreResourceHandle.queryStoreNoSQL (StoreResourceHandle.java:41)
    to the store. StoreResourceHandle.getStoreQuery (StoreResourceHandle.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Truncated. check the log file full stacktrace
    >
    < 25 may 2014 21: 45 CEST > < error > < HTTP > < BEA-101017 > < [ServletContext@10446167[app:StoreResource module: StoreResource-store-context-spec: null, path root-version: 3.0], request: [ weblogic.servlet.internal.ServletRequestImpl@1e35577
    GET StoreResource-Store-context-root/resources/store HTTP/1.1
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: Oracle HTTPClient Version 10: 00
    Accept: text/plain
    X HTTPAnalyzer-Rules: 1@localhost:8099

    Root cause]] of ServletException.
    java.lang.NoClassDefFoundError: oracle/rdf/kv/customer/jena/OracleNoSqlConnection
    to the store. StoreResourceHandle.queryStoreNoSQL (StoreResourceHandle.java:41)
    to the store. StoreResourceHandle.getStoreQuery (StoreResourceHandle.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Truncated. check the log file full stacktrace
    >
    < 25 may 2014 21: 45 CEST > < opinion > < Diagnostics > < BEA-320068 > < Watch "UncheckedException" in the module "Module-FMWDFW" with severity "Notice" on the server "DefaultServer" triggered on 25 may 2014 21: 45 CEST. Details of the notification:
    WatchRuleType: Journal
    WatchRule: (SEVERITY = "Error") AND ((MSGID = ' WL-101020') OR (MSGID = "WL-101017'") OR (MSGID = "WL-000802'") OR (MSGID = "BEA-101020'") OR (MSGID = "BEA-101017'") OR (MSGID = "BEA-000802'"))
    WatchData: DATE = may 25, 2014 21: 45 CEST SERVER = DefaultServer MESSAGE = [ServletContext@10446167[app:StoreResource module: StoreResource-store-context-spec: null, path root-version: 3.0], request: [ weblogic.servlet.internal.ServletRequestImpl@1e35577
    GET StoreResource-Store-context-root/resources/store HTTP/1.1
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: Oracle HTTPClient Version 10: 00
    Accept: text/plain
    X HTTPAnalyzer-Rules: 1@localhost:8099

    Root cause]] of ServletException.
    java.lang.NoClassDefFoundError: oracle/rdf/kv/customer/jena/OracleNoSqlConnection
    to the store. StoreResourceHandle.queryStoreNoSQL (StoreResourceHandle.java:41)
    to the store. StoreResourceHandle.getStoreQuery (StoreResourceHandle.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    to com.sun.jersey.spi.container.JavaMethodInvokerFactory$ 1.invoke(JavaMethodInvokerFactory.java:60)
    to com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ TypeOutInvoker._dispatch (AbstractResourceMethodDispatchProvider.java:185)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at weblogic.jaxrs.server.portable.servlet.ServletContainer.service(ServletContainer.java:218)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:280)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:254)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at oracle.j2ee.ws.server.jaxrs.TenantServletFilter.doFilter(TenantServletFilter.java:81)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:137)
    at java.security.AccessController.doPrivileged (Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3367)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3333)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
    to weblogic.servlet.provider.ContainerSupportProviderImpl$ WlsRequestExecutor.run (ContainerSupportProviderImpl.java:254)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
    Subsystem = HTTP USERID < WLS Kernel > = SEVERITY = error THREAD = ExecuteThread [ASSET]: '1' for the queue: MSGID "(self-adjusting) weblogic.kernel.Default" = BEA - 101017 MACHINE = mustapha TXID = the CONTEXTID = 6a226c0c-6115-47df-833a-8465cd21cc68-0000002f TIMESTAMP = 1401047153802
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    < 25 may 2014 21: 46 CEST > < emergency > < oracle.dfw.incident > < BEA-000000 > < 65 incident created with the key to problem "DFW-99998 [java.lang.NoClassDefFoundError] [oracle.j2ee.ws.server.jaxrs.TenantServletFilter.doFilter] [StoreResource]" >

    Hi MEMU,.

    I have it. And he has deployed in the built-in container. It works very well. Note that I did the following.

    (1) change the project properties,

    In the libraries and Classpath, I need to add in Classpath entries associated Jena libraries, slf4j, sdordfnosqlclient.jar, kvclient.jar etc.

    (2) use the xercesImpl - 2.9.1.jar instead of xercesImpl - 2.10.0.  Jdev 12 c appears to use an older version of xerces as bundles of Jena.

    Once done the configurations above, I can execute your project without changing Java code.

    Here is the result:

    [14: 34:08] wrote the Web application Module for /home/alwu/.jdeveloper/system12.1.2.0.40.66.68/o.j2ee/drs/UniversalSparqlQuery/queryWebApp.war

    [14: 34:09] wrote the Module Enterprise Application to /home/alwu/.jdeveloper/system12.1.2.0.40.66.68/o.j2ee/drs/UniversalSparqlQuery

    [14: 34:09] Application deployment...

    [14: 34:15] Application deployed successfully.

    [14: 34:15] the constriction of context following URLS have been defined and can be used as a starting point for testing your application:

    [14: 34:15] http://192.168.1.1:7101 / UniversalSparqlQuery-application-context-root

    [14: 34:16] for deployment time: 9 seconds

    [14: 34:16]-deployment is complete.  ----

    Run start time: 9573 ms.

    [Application running on IntegratedWebLogicServer UniversalSparqlQuery]

    Target application w- http://localhost:7101/UniversalSparqlQuery-query-context-root/resources/application.wadl

    Target URL - http://127.0.0.1:7101 / UniversalSparqlQuery-query context root/resources/query/select/home/store/port/model/application

    I went in a universal store

    I create the connection to: model

    Run the select query

    I leave the store: store

    I spent in-store universal semep

    I create the connection to: http://Repository

    Run select select? s? p? o where {? s? p? o}

    I leave the store: semep

    It will be useful,

    Zhe Wu

  • With parameters rESTful Web services

    Hello

    I'm new to the RESTful Web Services and I have a few problems.  Here's what I've done so far.

    1.) created a web service in SQL workshop area.

    2.) named the User_Test module

    3.) named the model URI User_Test / {Userid} (requires secure access is set to no and format is set to JSON)

    4.) created a query that looks something like this...

    Select field1,

    Field2,

    field3

    from schema.table

    Where user_id =: userid

    5.) created a parameter name and variable binding name are the two "userid".

    Navigated 6) at the following URL:

    _ http://localhost:9091 / apex/app_name/User_Test/1

    The result is:

    {

    [items]

    }

    When I change my steps so that there is no parameter, it works fine.  Any thoughts on what I am doing wrong?

    Thank you

    Brian

    OK, looks like NOT specifying a parameter seems to solve this problem.

  • RESTful Web services works only with input parameters

    I want to create a RESTful Web Services APEX 4.2, who returns to the client, account information required to certain conditions.

    SELECT NAME, AGE, ADDRESS

    ACCOUNT

    WHERE FINANCE >: FUNDS AND CONTROL >: AUDIT

    I defined variables this way.  I tried two URIS, and the Source Type of Httpentete, but nothing works.

    NameLink the name of the VariableAccess methodType of sourceParameter type
    AUDIT OFAUDIT OFINURIDouble
    FUNDFUNDINURIDouble

    I would like to invoke Web Services from a custom page in a web browser, something like this:

    http://localhost/user/customer?funds=1000 & checking = 200

    I could not make passing the values of input in URI parameters to Web Services to work (got an error).  I did anything wrong here?  Is this supported?

    Thank you.

    After some research, I finally cracked. The URI template for my example should be: customer? funds {MONEY} = & check = {CURRENT} now, I can access web services using this URL: http://localhost/schema/customer?FUNDS=1000&CHECKING=200

  • REST Web Service references: cannot run Google API

    Hi all!

    I learn about how to incorporate a reference to REST web service in application of the APEX. I found a video tutorial on YouTube 'to create and use a RESTful Web Service in Application Express 4.2', which seems very useful and easy to do on my sample application. The REST Web Service URL:

    http://maps.googleapis.com/maps/api/geocode/xml?address=san%20fancisco&sensor=false
    

    But my application throws an error like below:

    1 error has occurred
    
    ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-24247: network access denied by access control list (ACL)
    
    

    After going through some posts here to OTN, I granted access as follows:

    GRANT EXECUTE ON SYS.UTL_HTTP TO ETI;
    GRANT EXECUTE ON SYS.UTL_INADDR TO ETI;
    GRANT EXECUTE ON SYS.UTL_TCP TO ETI;
    GRANT EXECUTE ON SYS.UTL_SMTP TO ETI;
    GRANT EXECUTE ON SYS.UTL_URL to ETI;
    GRANT EXECUTE ON SYS.UTL_XML to ETI;
    

    Second thing I did was, created and assigned ACL:

    begin
      dbms_network_acl_admin.create_acl (
        acl         => 'googleapis.xml', 
        description => 'Google Translate API',
        principal   => 'CONNECT',
        is_grant    => true,
        privilege   => 'connect',
        start_date  => null,
        end_date    => null
      );
    
    
      dbms_network_acl_admin.add_privilege (
        acl       => 'googleapis.xml',
        principal => 'CONNECT',
        is_grant  => true,
        privilege => 'connect'
      );
    
    
      dbms_network_acl_admin.assign_acl ( 
        acl  => 'googleapis.xml',
        host => 'ajax.googleapis.com'
      );
    
    
      dbms_network_acl_admin.assign_acl ( 
        acl  => 'googleapis.xml', 
        host => 'maps.googleapis.com'
      );
    end;
    

    All of these statements have been executed on my database with any error, even if does not help my web service reference for work.

    No idea how can I get my Google API REST Web service works, what is the thing that I'm missing here?

    At first, I wonder why use 'CONNECT' as a security principal has failed.  Then, I realized that this is a ROLE.

    General suggestion: I would stop the use of the CONNECT role, unless you created it yourself.  It will grant to the users/schemas some privileges that they do not need or shouldn't have.

    Oh... giving the ACL of a ROLE will not work.  You must grant the real schema.

    This could be the schema of analysis, or it could be the pattern that keeps the PL/SQL Package.

    MK

  • Make a REST Web service call. Error code: 401 Access to the requested resource is not allowed

    Hi all

    I'm having a hard time finding ways to Rest Web service calls.

    I tried this runs directly through the browser and I get an error.

    http:localhost:8080/r EST/bean/atg/userprofiling/ProfileServices/loginUser? [email protected] & arg2 = password

    13:18:20, 613 [RestSecurityServlet] error code: 401

    Access to the requested resource is not allowed: / atg/userprofiling/ProfileServices

    1. atg.rest.RestException: access to the requested resource is not allowed: / atg/userprofiling/ProfileServices

    at atg.rest.processor.RestSecurityProcessor.checkAccess(RestSecurityProcessor.java:546)

    at atg.rest.processor.RestSecurityProcessor.handleGetRequest(RestSecurityProcessor.java:313)

    at atg.rest.processor.RestSecurityProcessor.doRESTGet(RestSecurityProcessor.java:199)

    at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:417)

    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:260)

    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)

    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)

    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:264)

    at atg.rest.servlet.HeadRestServlet.service(HeadRestServlet.java:130)

    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)

    Documentation, I understand that I need to create a session, the session is needed to access the secure components since this

    method specific 'ProfileServices.loginUser' was declared as non-secure, restSecurityConfiguration.xml

    In addition, there are two different ways in which I can connect

    1. 1. with the help of RestSession.createSession providing the user name and password.
    2. 2. or by using ProfileServices.loginUser or ProfileFormHandler

    Can someone please clarify

    If you call the REST web service from a Java client, you can create a RestSession object using the createSession method. But in your case you seem to be invoking it with an HTTP request, which, by default, would be considered a GET request by application of the REST of the ATG. So either a GET, he would try to get a property "loginUser" of the component/atg/userprofiling/ProfileServices (based on your URL) that would always fail.

    To call the method ProfileServices loginUser() with your argument, you need to tell the system to the REST of the ATG to process your incoming request not GET, but as a demand that you can do to atg-rest-http-method of the parameter control in your application like this

    http:localhost:8080/rEST/bean/atg/userprofiling/ProfileServices/loginUser? [email protected]& arg2 = password & atg-rest-http-method = POST

    It should work in this way, your restSecurityConfiguration.xml is correct.

  • Consume the RESTful web service - by passing the values of URL parameters

    Hello

    I'm working on a RESTful web service call. It works fine if I encode a URL in the format below (it is not the actual URL, just for your information):

    http://ws.webserviceproducer.com/KEYVALUE/FUNCTIONVALUE/COUNTRY/CP/champs

    where KEYVALUE is required by the Web service provider text

    FUNCTIONVALUE is again fixed and determines what the result is returned in the format

    COUNTRY is the code of the country, e.g. UK, so would need to be replaced by a variable

    Postcode is the postcode for example PO14 2JN or postal code and must be replaced by a variable

    field text is again fixed and is used to determine the output format.

    My question is simple how can I replace the two fields, COUNTRY and POSTAL code with variables of the elements of the apex.

    I tried using the headers HTTP REST and the REST of the settings entry but without any luck so far. I tried substitution of variables directly in the URL also without success.

    Thank you

    Chris

    Have you tried this APEX_WEB_SERVICE ?

  • Basic authentication with the RESTful WEb service and a Web Service reference

    Hi all

    We have made significant progress on getting an application to work with RESTful web services, but are now trying to understand how to lock a RESTful Web service while making it available for a particular application.

    We use one of the 'emp' table sample web services come with Apex 4.2 and are trying to apply the Basic Auth to the WEb Service using Weblogic filter defined in the web.xml file. Which works very well. I now get challenged when I try to go to:

    https://wlogic.edu/Apex/BNR/ACE/HR/empinfo/

    And when I authenticate this challenge, I am able to get the data. (we are usiing the Weblogic-level LDAP authentication)

    However, I'm not sure how to get even basic authentication to work with Web Service reference in my application. I see the error message in the application when I try to call this Web Service:

    401 Unauthorized <

    And I see:
    "The request requires user authentication. It MUST contain a header field WWW-Authenticate (section 14.46) containing a fault that is applicable to the requested resource. The client MAY repeat the request with a suitable authorization (section 14.8) header field. If the request already includes identification of the authorization information»

    How can I provide the credentials in the Web reference or provide credentials in the Application?
    Web service works fine if I remove the auth basic RESTful web service in the Web.xml file.

    We should NOT use basic auth and auth Weblogic web service definition basic RESTful Workspace use instead. If so, how would we implement THIS basic authentication in the definition of Web Service and the Web SErvice reference on the application?

    Thank you
    Pat

    Hello Scott,

    Thank you. There is a function for rest in the package:

    function make_rest_request(
    --
    -- This function invokes a RESTful Web service with the supplied name value pairs, body clob, or body blob
    -- the response as an clob.
    --
    -- Arguments:
    --   p_url                  The url endpoint of the Web service
    --   p_http_method          The HTTP Method to use, PUT, POST, GET, HEAD or DELETE
    --   p_username             The username if basic authentication is required for this service
    --   p_password             The password if basic authentication is required for this service
    --   p_proxy_override       The proxy to use for the request
    --   p_body                 The HTTP payload to be sent as clob
    --   p_body_blob            The HTTP payload to be sent as binary blob (ex., posting a file)
    --   p_parm_name            The name of the parameters to be used in name/value pairs
    --   p_parm_value           The value of the paramters to be used in name/value pairs
    --   p_wallet_path          The filesystem path to a wallet if request is https
    --                          ex., file:/usr/home/oracle/WALLETS
    --   p_wallet_pwd           The password to access the wallet
    --
        p_url               in varchar2,
        p_http_method       in varchar2,
        p_username          in varchar2 default null,
        p_password          in varchar2 default null,
        p_proxy_override    in varchar2 default null,
        p_transfer_timeout  in number default 180,
        p_body              in clob default empty_clob(),
        p_body_blob         in blob default empty_blob(),
        p_parm_name         in wwv_flow_global.vc_arr2 default empty_vc_arr,
        p_parm_value        in wwv_flow_global.vc_arr2 default empty_vc_arr,
        p_wallet_path       in varchar2 default null,
        p_wallet_pwd        in varchar2 default null ) return clob;
    

    My point was that using the API makes things easier if you have to look for a solution.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • The rESTful Web Service authentication

    I work with Apex 4.2 and Apex listener 2.0 (deployed on WebLogic Server).

    The docs mention OAuth2 but the client requires basic http service authentication.

    Whatever it is, I can't find documentation on how to go about setting up any sort of authentication for a RESTful web service. I have to roll my own or is this something to leave to middleware like Weblogic?

    Any help or pointers would be greatly appreciated.

    Greg

    This seems to be the best answer:

    https://forums.Oracle.com/thread/2464977

  • ApEx 4.0 the REST Web Services

    I need to build a URL to pass parameters to query to a RESTful Web Service. Looks like the default in 4.0 is to specify the parameters as a query (http://myservice.com/customer?id=23)... I need build the query a directory (http://myservice.com/customer/id/23) is there a way to do this easily? I think of "Body specified with Substitutions" option sounded promising, but can't find any documentation or examples.

    user11985346:

    Body specified with substitutions is used to DISPLAY or PUT a payload to the service. What you want to do, it is simply not set all the parameters for the query string, but only reference point substitutions in the endpoint URL. So in your example, you should have a URL endpoint:

    http://myService.com/customer/ID/&CUSTOMER_ID.

    Then, your application must contain an element named CUSTOMER_ID, and his session state should be established in function before calling the Web Service.

    Kind regards

    Jason

  • Error in the REST Web Service with the text output Format

    Hi all

    I am referencing a REST web service and can successfully connect to it and retrieve the results with the output XML value Format.

    I don't need the node values, I want to just grab the entire XML string and fill a table with her column.

    When I create a new Rest web service reference, including the text output Format value and then create a form/report to run it, I get the following error when I click on "send":

    ORA-06550: line 1, column 63: PLS-00103: encountered the symbol "end-of-file" when expects it one of the following numbers: (- + new case mod not null to other current County avg exists max min prior sql stddev sum variance execute forall time timestamp interval date fusion pipe)
    Error sending request.

    There is control in the XML characters, but surely, this is handled by the Apex, so I'm not sure what the problem is here.

    Any ideas most welcome.

    Thank you
    Rhodri

    Rhodri:

    Request Express waiting for answer text actually be answer text, delimited by other characters that denotes a new value and a new Recordset. You should leave the response as XML. The XML document will be stored in the column xmltype01 in the collection that you specify. You can then convert this column xmltype01 in a clob, if you like using the. toClobVal().

    Kind regards

    Jason

  • Why short use SOAP based instead of REST web services

    I have a very basic question about why short uses web services SOAP based instead of RESTING the REST is very light?

    Kumar,

    To a large extent, the choice of the web service protocol is orthogonal to how short Server communicates with Studio (aka short discovered Information).  EID has been designed as a set of tightly coupled of capabilites and we not usually expect users to develop a custom front-end that would require a knowledge of the workings of.

    Ryan S. - EID PM

  • 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

Maybe you are looking for