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

Tags: Database

Similar Questions

  • 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
    -------------------------------------------------------------------

  • Computer does not start up___Can I download this file from the Microsoft Web site. I put the XP CD in and it starts downloading files but it asks what windows installation I want to and don't gives me one option other than press "Enter" to abandon.

    My laptop does not start at the top. It indicates that the following file is missing or damaged WINDOWS\SYSTEM32\CONFIG\SYSTEM.

    Download this file from the Microsoft Web site. I put the XP CD in and it starts downloading files but it asks what windows installation I want to and don't gives me one option other than press "Enter" to abandon.

    See if anything here helps-

    How to recover a corrupted registry that prevents Windows XP startup
    http://support.Microsoft.com/kb/307545

    Install and use the Recovery Console in Windows XP
    http://support.Microsoft.com/kb/307654

    See also

    How to Troubleshoot Registry Corruption issues
    http://support.Microsoft.com/kb/822705

    How to fix a missing or corrupt Windows\System32\Config\System file
    http://xphelpandsupport.MVPs.org/how_do_i_repair_a_missing_or_cor1.htm

    TaurArian [MVP] 2005-2010 - Update Services

  • Integration with the secure web service IS deployed on EBS

    Hello experts,

    I have a REST webservice deployed to an Instance of the EBS. I try to call the web service using a mobile application in the ADF. However, the web service is secure and requires security settings to be sent in the request header.

    Anyone can recall or explain how I can add a custom header to the object of the application for the REST web service? Any help will be appreciated.

    Thank you

    Abhishek

    Hi Abhishek,

    You can do the following:

    String theUsername = "abc";

    String thePassword = "pass";

    String userPassword = theUsername + ': ' + thePassword.

    String encoding = new sun.misc.BASE64Encoder () .encode (userPassword.getBytes ());

    restServiceAdapter.addRequestProperty ("Authorization", "Basic" + coding);

    If you use Webservice DataControl, then automatically the connection information in the login form is injected into the webservice framework.

    Kind regards

    Deepak

  • 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.

  • 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

  • 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

  • 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.

  • 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 ?

  • 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

  • InDesign server web service - where is the support to download a file with the script and download the result?

    Hello

    I'm working on a VINE which is supposed to convert indd files in pdf format (that is, using of course the indesign server). Basically, I want to call the Web Service of IDS (located on another machine, perhaps), spend in the input file, the conversion script and retrieve the result under the WebService call?

    Navigation on the documentation, examples, etc. in the SDK, I couldn't see how the above can be achieved unless the client manages the transfer of files. Surely I must be missing something...

    Thank you

    Chris

    What do you mean by POC?

    InDesign Server is too valuable (i.e. cost of the license) to waste his time with file transfers.

    For a smaller scale, letting a separate process (http or smb server) on the same server hardware files - InDesign Server providing access on the local volume faster.

    If you are planning for bigger, use a dedicated server for file sharing (at the choice of the SMB, NFS, or other), when the input files are prepared by the process of the client, so that your load balancing program can immediately point the next free instance of the InDesign Server farm to the file. In this case, be prepared for some trial and error - high-speed file sharing can be tricky with files written on one side not yet visible or incomplete on the other side, locking problems, filename Unicode trouble, unexpected time and so on.

    BTW, there is also a forum of InDesign Server which would be more suitable for these discussions.

    Dirk

  • opening a binary file with the right extension

    Hello world

    I developed a real simple VI which allows me to read the first five bytes of a binary file for signature (ASCII) and check if its signature match with planned extensions. If Yes, another VI is called and that not one 2 button error message appears: If the user selects OK, a new dialog box opens to choose another file. and if the user chooses cancel, the same dialog box opens instead of escape from the VI.

    This is because while loop (VI below), but I don't see how I can handle this without him. Until the user has not chosen the right extension, he cannot escape from what is a problem! The real case is to call one another VI, and the first step of the stacked sequence is to display an error of two buttons.

    If you have any ideas, I'm a bit new! Thank you!!

    Hi..., christoph

    See the image as an attachment.

    The case of false contains only a true constant connected to any State.

    Mike

  • WSDL to code generation. AS - code does not work with the simple web service

    Hello
    I tried to get a very simple web service to work in Flex 3 with AS classes that are generated through the new feature "import WSDL (Web Service)" and for the life of me, I can't make it work. I have attached the WSDL and the little bit of action script code that I use to call my web service.
    I don't get any errors during the process of "Import Web Service" and or make mistakes when my web service call. In fact, I printlns on the side server, and I see that my web service method is called. But he is not the only argument that I'm moving to ActionScript and my ActionScript receives either the return value.

    Can someone please tell me what I'm doing wrong.

    Thank you very much

    Jason Sapp

    Hi Jason,

    It seems that you have a hot from our known issues. You use a literal document unveiled what I see in the code pasted above wsdl. According to the bug [ http://bugs.adobe.com/jira/browse/FB-11388 the code generator does not correctly determine what kind of doc-literal wsdl you and sets the isWrapped and wrappedQName on the request and response of the incorrect operation messages.]

    To resolve this problem, go to the class BaseEchoService.as and comment out these two lines:
    requestMessage.isWrapped = true;
    responseMessage.isWrapped = true;

    Then, everything should work fine.

    Hope this helps,
    Cristian

  • With Json REST Web services only accepts objects?

    Hello

    With the help of JDEV 12.1.3.0.0 is it possible to send webservice one list and receive it in the client side?

    I wanted to just this:

    @Stateless

    @Path ("/costumer")

    public class CostumerImpl {}

    @EJB

    SessionEJBnameLocal myBean;

    @GET

    @Produces (value = {"application/json", "application/xml"})

    @Path ("/ list")

    public list < CostumerEO > lista() {}

    Return myBean.getCostumerEOFindAll ();

    }

    }

    The only way I found was to create an object with a list, as showned below, send this object and this way has worked:

    @XmlRootElement

    public class {CustomerList

    List < Customer > customerList = new ArrayList < customer > ();

    {} public void setCustomerList (List < Customer > customerList)

    this.customerList = list of customers;

    }

    @XmlElement (name = "allcustomers")

    public List < Customer > getCustomerList() {}

    return list of customers;

    }

    }

    But I want is not to create this object.

    Is this possible?

    JDev 12.1.3.0.0

    Any help would be appreciated.

    Concerning

    Carlos

    I got it to work.

    I went to andrejus apllication lib, got jackson jars, add to my library and the class paths and the test.

    She returned to the country of my comic.

    Now, I can have a class webservice producing json from the BC model without the need for other java classes to parse json or lists.

    Thank you all.

Maybe you are looking for