Java REST Services !
hi,
how can we write java REST webservice ? we basically have a wcf rest service and we would like to shift it to java .
any suggestion/tutorials you would suggest .
P.S
we are only familiar with j2se .
any body , who know how to program a service on wcf and java should be an ideal person to answer this post .
I am currently stuck on this issue of conversion . Does Java provide an (Server.Execute and Server.Transfer )implementation like Microsoft does . Server.Execute processes the .aspx file we give as parameter and return the html returned as a response to the incoming request .
and Server.transfer transfer the client to the other page by returning an Http 302 (moved temporarily ) response to the client and thus client gets redirected to the other page . it also takes a page url parameter.
i hope i get the steps as well as answer to the above question soon.
thanks
Jamal.
Similar Messages
-
Want to access RESTful Services through Java Program
We are trying to access RESTful Services exposed by Oracle database cloud through our Java code, with authentication enabled for a particular user.
Till now, we have completed below steps:
1) We have a working account with Oracle database cloud (Username – xxx.xxx)
2) We log in using the credentials for above account, and navigate to Oracle Apex ? SQL Workshop ? RESTful Services
3) We create a new “RESTful Service Module” by filling out the details as below:
Name: SampleTest
URI Prefix: test
URI Template: /getallemp
Pagination Size: 25 (kept to default)
Required Privilege: TestGroupPrivilege
Resource Handler Details:
Method: GET
Source Type: Query
Format: JSON
Source: select * from emp
After creating the above module and testing it, it works fine and the data is retrieved in JSON successfully.
The resulting URL for above RESTful Service Module is: https://<HOST_URL>/apex/test/getallemp
Note that “TestGroupPrivilege” is a privilege assigned to the user group “RESTful Services” and the user “xxx.xxx” is a member of “RESTful Services” user group.
4) We are unable to call the RESTful services from Java program. We are passing username and password in request header as basic authentication. But, we are getting: Error 500--Internal Server Error
5) If we change the “Required Privilege” to default i.e. no privileges present on the module, we can get the response through Java code and everything works perfectly fine.
Please suggest us in: How to access RESTful Services through Java code by passing user credentials in HTTP header for authentication. Also let us know if we have to do any settings through Apex, in case we are missing any.
Message was edited by: NeerajGirolkar
- When we are logging in to Oracle cloud on browser and execute the Oracle cloud RESTful service in another tab of same browser, we are able to get the result. But when executed the same RESTful service from a different browser or java program we get internal server error.
- After investigation, we found that when user logs in to oracle database cloud, a cookie is set in browser with name s “OAMAuthnCookie_cstest-domo.db.us1.oraclecloudapps.com:443” and value as some random token. This cookie is passed in the subsequent requests to the RESTful Service calls when using same browser and as a result, we are able to get the results
- In the Java program, we copied the same cookie with random token in the HTTP Request header and we got the proper response from REST APIs.
- It seems that this cookie is created by an Oracle Middleware tool/server called as OAM – Oracle Accounts Manager, which sends the authentication token after successful authentication and creates the cookie.
- We found that the cookie that OAM creates on authentication is exactly in the same format i.e. ‘OAMAuthnCookie_cstest-domo.db.us1.oraclecloudapps.com:443’. So, we are guessing that Oracle cloud uses OAM for authentication. Please refer to following link for same : http://docs.oracle.com/cd/E14571_01/doc.1111/e15478/sso.htm
Can anyone please suggest:
1. How to provide authentication to Oracle Cloud REST APIs from java program?
2. How to pass the username and password in Java code to OAM (or how to communicate with OAM using Java) so that we can receive the unique token from OAM. We can use the token in the further requests? 3. Also in Oracle cloud white papers , it is mentioned that they support OAuth2.0. But we didn’t find any URLs for same. Can anyone please confirm?
Thanks
~ Neeraj GirolkarHi Nilesh,
We tried to connect to Oracle Cloud Database using the way you suggested above, but unfortunately it is not working as well.
Can you let us know the authentication process with Oracle Cloud Database? We found in documentation that it uses OAM (Oracle Access Manager) for authentication. Can you tell us a bit about that? That will be extremely helpful.
Thanks,
- Neeraj -
Restful service unable to insert data using PL/SQL.
Hi all,
Am running: AL 2.01 standalone mode on OEL 4.8 in VM box A.
Oracle database 10.2.0.4 with Apex 4.2.0.00.27 on OEL4.8 in VM box B.
Able to performed oracle.example.hr Restful services with no problem.
Unable to insert data using AL 2.0.1 but works on AL 1.1.4.
which uses the following table (under schema: scott):
create table json_demo ( title varchar2(20), description varchar2(1000) );
grant all on json_demo to apex_public_user; and below procedure ( scott's schema ):
CREATE OR REPLACE
PROCEDURE post(
p_url IN VARCHAR2,
p_message IN VARCHAR2,
p_response OUT VARCHAR2)
IS
l_end_loop BOOLEAN := false;
l_http_req utl_http.req;
l_http_resp utl_http.resp;
l_buffer CLOB;
l_data VARCHAR2(20000);
C_USER_AGENT CONSTANT VARCHAR2(4000) := 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';
BEGIN
-- source: http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
-- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
-- rather than just returning the text of the error page.
utl_http.set_response_error_check(false);
-- Begin the post request
l_http_req := utl_http.begin_request (p_url, 'POST', utl_http.HTTP_VERSION_1_1);
-- Set the HTTP request headers
utl_http.set_header(l_http_req, 'User-Agent', C_USER_AGENT);
utl_http.set_header(l_http_req, 'content-type', 'application/json;charset=UTF-8');
utl_http.set_header(l_http_req, 'content-length', LENGTH(p_message));
-- Write the data to the body of the HTTP request
utl_http.write_text(l_http_req, p_message);
-- Process the request and get the response.
l_http_resp := utl_http.get_response (l_http_req);
dbms_output.put_line ('status code: ' || l_http_resp.status_code);
dbms_output.put_line ('reason phrase: ' || l_http_resp.reason_phrase);
LOOP
EXIT
WHEN l_end_loop;
BEGIN
utl_http.read_line(l_http_resp, l_buffer, true);
IF(l_buffer IS NOT NULL AND (LENGTH(l_buffer)>0)) THEN
l_data := l_data||l_buffer;
END IF;
EXCEPTION
WHEN utl_http.end_of_body THEN
l_end_loop := true;
END;
END LOOP;
dbms_output.put_line(l_data);
p_response:= l_data;
-- Look for client-side error and report it.
IF (l_http_resp.status_code >= 400) AND (l_http_resp.status_code <= 499) THEN
dbms_output.put_line('Check the URL.');
utl_http.end_response(l_http_resp);
-- Look for server-side error and report it.
elsif (l_http_resp.status_code >= 500) AND (l_http_resp.status_code <= 599) THEN
dbms_output.put_line('Check if the Web site is up.');
utl_http.end_response(l_http_resp);
RETURN;
END IF;
utl_http.end_response (l_http_resp);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line (sqlerrm);
raise;
END; and executing in sqldeveloper 3.2.20.09 when connecting directly to box B as scott:
SET serveroutput ON
DECLARE
l_url VARCHAR2(200) :='http://MY_IP:8585/apex/demo';
l_json VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
l_response VARCHAR2(30000);
BEGIN
post( p_url => l_url, p_message =>l_json, p_response => l_response);
END;which resulted in :
anonymous block completed
status code: 200
reason phrase: OK
with data inserted. Setup using 2.0.1
Workspace : wsdemo
RESTful Service Module: demo/
URI Template: test
Method: POST
Source Type: PL/SQLand executing in sqldeveloper 3.2.20.09 when connecting directly to box B as scott:
SET serveroutput ON
DECLARE
l_url VARCHAR2(200) :='http://MY_IP:8585//apex/wsdemo/demo/test';
l_json VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
l_response VARCHAR2(30000);
BEGIN
post( p_url => l_url, p_message =>l_json, p_response => l_response);
END;which resulted in :
status code: 500
reason phrase: Internal Server Error
Listener's log:
Request Path passes syntax validation
Mapping request to database pool: PoolMap [_poolName=apex, _regex=null, _workspaceIdentifier=WSDEMO, _failed=false, _lastUpdate=1364313600000, _template=/wsdemo/, _type=BASE_PATH]
Applied database connection info
Attempting to process with PL/SQL Gateway
Not processed as PL/SQL Gateway request
Attempting to process as a RESTful Service
demo/test matches: demo/test score: 0
Choosing: oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as current candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true]
Determining if request can be dispatched as a Tenanted RESTful Service
Request path has one path segment, continuing processing
Tenant Principal already established, cannot dispatch
Chose oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as the final candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true] for: POST demo/test
demo/test is a public resource
Using generator: oracle.dbtools.rt.plsql.AnonymousBlockGenerator
Performing JDBC request as: SCOTT
Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
INFO: Error occurred during execution of: [CALL, begin
insert into scott.json_demo values(/*in:title*/?,/*in:description*/?);
end;, [title, in, class oracle.dbtools.common.stmt.UnknownParameterType], [description, in, class oracle.dbtools.common.stmt.UnknownParameterType]]with values: [thetitle, thedescription]
Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
INFO: ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-id
java.sql.SQLException: ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-id
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:242)
at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124)
at oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.invoke(CallableStatementProxyFactory.java:101)
at $Proxy46.execute(Unknown Source)
at oracle.dbtools.common.jdbc.JDBCCallImpl.execute(JDBCCallImpl.java:44)
at oracle.dbtools.rt.plsql.AnonymousBlockGenerator.generate(AnonymousBlockGenerator.java:176)
at oracle.dbtools.rt.resource.templates.v2.ResourceTemplatesDispatcher$HttpResourceGenerator.response(ResourceTemplatesDispatcher.java:309)
at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:88)
at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:412)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1059)
at 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)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Error during evaluation of resource template: ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-idPlease advise.
Regards
ZackZack.L wrote:
Hi Andy,
Sorry, forgot to post the Source that's use by both AL1.1.4 and AL2.0.1.
Source
begin
insert into scott.json_demo values(:title,:description);
end;
it's failing during the insert?
Yes, it failed during insert using AL2.0.1.
So the above statement produces the following error message:
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-idThis suggests to me that an unprintable character (notice how there is nothing between the double quotes - "") has worked its way into your PL/SQL Handler. Note how the error is reported to be a column 74 on line 2, yet line 2 of the above block should only have 58 characters, so at a pure guess somehow there's extra whitespace on line 2, that is confusing the PL/SQL compiler, I suggest re-typing the PL/SQL handler manually and seeing if that cures the problem. -
Can I Include an xml-stylesheet Link in a Java Web-Service?
The ability to easily create a SOAP-based web-service from a Java class using JDev's built in "Java Web Service" wizard is great.
From an "Ajax enablement" perspective, I see tremendous value in having the ability to specify an XSL url in the call to that web-service, so that the server will insert an <?xml-stylesheet .../> link to the specified URL prior to the SOAP message that it returns. That way, different callers to the web-service could render the same SOAP response differently (via an XSL transformation performed on the client-side via the XSL they've specified).
Is there already an undocumented way to do this with an Oracle "Java Web Service" that I am not aware of? If not, adding that capability would be trivial for Oracle, and it would add tremendous value to developers using Oracle's "Java Web Service" capability.Hi Chris,
I take it you are using the RESTful API method to GET the data. In that case you shoul be able to perform a http POST from your js code in order to update the controls.
This could be done as form components are updated, or after a submit button is pressed (I'm sure you are familiar with this part).
Please see here for more information: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/build_web_service/
I hope this helps. -
Getting error while writing JUnit test case for RestFul Services
Hi All,
I have written Restful services in Netbean 6.8.
It's running well...no issues.
{color:#0000ff}While writing JUnit test cases for them, I am getting following error:
{color}{color:#993300}Testcase: testGetAuthenticated(com.ct.services.LoginServicesTest): Caused an ERROR
Implementing class{color}
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:160)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
at com.ct.services.LoginServices.getAuthenticated(LoginServices.java:205)
at com.ct.services.LoginServicesTest.testGetAuthenticated(LoginServicesTest.java:84)
Test com.ct.services.LoginServicesTest FAILED
F:\NetbeanProjectsWorkspace\DemoProject\nbproject\build-impl.xml:972: Some tests failed; see details above.
BUILD FAILED (total time: 11 seconds)
{color:#0000ff}Strange thing is that when I am commenting below lines and its related calls:
{color}
{color:#ff0000}EntityManagerFactory mEmf = Persistence.createEntityManagerFactory("AnyName");
EntityManager mEm = mEmf.createEntityManager();
{color}
{color:#0000ff}from my code, JUnit test cases are working fine.
{color}Anybody having any idea about this ?
Thanks
Avi
Edited by: Avi007 on Aug 28, 2010 5:17 AMHi All,
[http://stackoverflow.com/questions/2778295/test-driven-development-problem]
Please refer the above link for the solution
Thanks
Avi
Edited by: Avi007 on Aug 30, 2010 12:33 AM -
Error when calling simple restful service from SOA 11G
Hi'
I have a URL for simple restful service
http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate}
GET method
I am able to invoke this from IE and This URL is also accessible in UNIX server where SOA server is deployed.
http://xxxxx:857/swift/v2/EMPIDChanges/2012-11-28%2005:57:49
I am using HTTP Binding adapter,
This is what goes in the composite.xml
<reference name="ff" ui:wsdlLocation="ff.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/http/AssetID/Test_AssetID_VL/ff#wsdl.interface(Request_Response_ptt)"/>
<binding.ws port="http://xmlns.oracle.com/pcbpel/adapter/http/AssetID/Test_AssetID_VL/ff#wsdl.endpoint(ff/Request_Response_pt)"
location="ff.wsdl" supports="http">
<property name="http.verb" type="xs:string" many="false">GET</property>
<property name="endpointURI" type="xs:string" many="false">http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate}</property>
<property name="http.payload" type="xs:string" many="false">url-encoded</property>
<property name="oracle.webservices.auth.username" type="xs:string" many="false" override="may">Test1</property>
<property name="oracle.webservices.auth.password" type="xs:string" many="false" override="may">Test1</property>
</binding.ws>
however I am getting error
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
-<part name="summary">
<summary>oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL</summary>
</part>
-<part name="detail">
<detail>Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL</detail>
</part>
-<part name="code">
<code>null</code>
</reference>
Please advice,
Thanks,
YatanWS Binding: exception durign SOAP invocation: java.util.NoSuchElementException
Looks like the error is in the data sent to or expected from the service in your composite. Check that audit logs and composite flow to make sure your soap message when using soapui matches what you are working with in soa suite. -
How to set the HTTP headers in HTTP Binding to call RESTful service
I'm calling a RESTful service from the SOA Composite through a BPEL process. The RESTful service need few values to be set in the HTTP header to authorize the request. I tried several different options like setting the headers in the invoke service etc., but in vain. Apparently, the web service call fails for not having header information.
I have burnt several days on this. Can somebody help me to get through this please?
I'm using SOA composite 11.1.1.4 on WLS 10.3.4.
Thanks in advance.
The exception -
<Oct 19, 2011 1:01:59 PM CDT> <Error> <oracle.webservices.service> <OWS-04086> <javax.xml.rpc.soap.SOAPFaultException: oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): https://txganguat.txd
ps.state.tx.us/TxGang
at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.generateSoapFaultException(WebServiceEntryBindingComponent.java:1053)
at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.processIncomingMessage(WebServiceEntryBindingComponent.java:890)
at oracle.integration.platform.blocks.soap.FabricProvider.processMessage(FabricProvider.java:113)
at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:1187)
at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:1081)
at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:581)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:232)
at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:192)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)any updates on this? Running into the same issue!
Thanks -
Hi,
I'm trying to consume a REST service. It seems that its a problem to set the http:query-parameters or http:query-string. I saw this https://blogs.oracle.com/jeffdavies/entry/enhanced_rest_support_in_oracl article and and the one in the OSB 11G Development cookbook but the http:query-parameters or http:query-string tag doesnt show up in my $outbound. I do make an assign to put the <http:http-method>GET</http:http-method> in there, and that one works........i can see it in $outbound.
Can anyone explain me why the insert of the query parameters doesnt work?
Thanks in advance!Hi,
There's a sample on JSON REST here...
http://java.net/projects/oraclesoasuite11g/downloads/download/OSB/osb-206-JSONREST.zip
For other samples, see this...
http://java.net/projects/oraclesoasuite11g/pages/OSB
Cheers,
Vlad -
Not able to invoke ATG Rest services
Hi,
I'm new ATG Rest service, To just create a dummy rest service I followed the below steps.
1. added REST module in MANIFEST.MF file
ATG-Required: DAS DPS DSS DCS B2CCommerce DAS REST
2. created restSecurityCnfiguration.xml under atg/rest/seurity and following is the content of this file
<programlisting>
<rest-security>
<default-acl value="Profile$login$admin:read,write,execute" />
<resource component="/atg/service/TestComponent" secure="false"/>
</rest-security>
</programlisting>
3. Created a TestComponent in my existing application and created a method testName
public class TestComponent {
public String getTestName(){
return "arvind";
4. Deployed my application on jboss.
Now I'm trying to invoke this from a java class
protected void execute() throws RestClientException {
String mUsername = "admin";
String mPassword = "admin";
String mHost = "localhost";
int mPort = 8080;
RestSession mSession = null;
RestResult result = null;
mSession = RestSession.createSession(mHost, mPort, mUsername, mPassword);
mSession.setUseHttpsForLogin(false);
mSession.setUseInternalProfileForLogin(false);
try {
mSession.login();
println("Login Successful");
result = RestComponentHelper.executeMethod("/atg/service/TestComponent", "testName", new Object[] {}, null, mSession);
catch (Throwable t) {
println(t);
} finally {
try {
mSession.logout();
println("Logout Successful");
} catch (RestClientException e) {
println(e);
----------------------------------------------------------------------out put ---------------------------------------------
Login Successful
atg.rest.client.RestClientException: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/testName
at atg.rest.client.RestSession.createHttpRequest(RestSession.java:755)
at atg.rest.client.RestComponentHelper.executeMethod(RestComponentHelper.java:252)
at com.techm.restclient.RestClientSample.execute(RestClientSample.java:63)
at com.techm.restclient.RestClientSample.main(RestClientSample.java:87)
Caused by: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/testName
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at atg.rest.client.RestSession.createHttpRequest(RestSession.java:745)
... 3 more
Logout Successful
Even if I provide any username and password, which don't even exist, it says login succussful but while invocation it fails. Please help me here,
What is default user I can use? or way to create new user ?
Thanks in Advance,
Arvind
Edited by: Arvind Pal on Oct 4, 2012 10:21 AM
Edited by: Arvind Pal on Oct 4, 2012 10:22 AMI created a user through ACC, and made the following changes.
<programlisting>
<rest-security>
<default-acl value="Profile$login$arvind:read,write,execute" />
<resource component="/atg/service/TestComponent" secure="false"/>
</rest-security>
</programlisting>
and now I'm getting the loginStatus i.e userid of user "arvind".
But while executing the invocation of web service call I'm getting the same exception.
Do we need to give some permission somewhere for this user ? or I'm doing something wrong with restSecurityConfiguration.xml
Login status[390002]
Login Successful
atg.rest.client.RestClientException: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/getTestName
at atg.rest.client.RestSession.createHttpRequest(RestSession.java:755)
at atg.rest.client.RestSession.createHttpRequest(RestSession.java:722)
at atg.rest.client.RestComponentHelper.getPropertyValue(RestComponentHelper.java:182)
at com.techm.restclient.RestClientSample.execute(RestClientSample.java:98)
at com.techm.restclient.RestClientSample.main(RestClientSample.java:128)
Caused by: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/getTestName
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at atg.rest.client.RestSession.createHttpRequest(RestSession.java:745)
... 4 more
Logout Successful
Edited by: Arvind Pal on Oct 4, 2012 12:36 PM -
RESTful service with EJB 3.1 endpoint cannot be found (404)
Hi,
I have a Resource configured as a EJB 3.1 Stateless Bean. I also have an overridden Application class to customize the context root. However, the client just cannot seem to find the Resource. What am I doing wrong? The Resource is packaged and deployed as a war.
Cross posted: http://www.coderanch.com/t/546565/java-Web-Services-SCDJWS/certification/RESTful-service-EJB-endpoint-cannot#2480046
Tests in error:
testSendRequestAndGetGreeting(name.app.abhi.helloworld.ejb.restful.client.HelloWorldEjbRestfulClientTest): GET http://localhost:9090/practice/helloworld?name=Duke returned a response status of 404 Not Found
Resource:
@Path("helloworld")
@Stateless
public class HelloWorldBean {
@GET
@Produces("text/plain")
public String getQuintessentialGreeting(@QueryParam("name") String name) {
if (name == null) {
throw new WebApplicationException(Response.Status.BAD_REQUEST);
return "Say hello to the world, " + name;
Application class:
@ApplicationPath("practice")
public class ApplicationConfig extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> clazzez = super.getClasses();
if (clazzez == null) {
clazzez = new HashSet<Class<?>>();
clazzez.add(name.app.abhi.helloworld.ejb.restful.service.HelloWorldBean.class);
return clazzez;
Client:
public class HelloWorldEjbRestfulClient {
private final static String ENDPOINT_URI = "http://localhost:9090/"
+ "practice/helloworld";
public String sendRequestAndGetGreeting(String name) {
Client client = Client.create();
WebResource webResource = client.resource(ENDPOINT_URI);
webResource.accept(MediaType.TEXT_PLAIN);
return webResource.queryParam("name", name).get(java.lang.String.class);
}Edited by: asarkar on Jul 24, 2011 12:20 PMI figured this out...the context root is NOT the one specified in the @ApplicationPath annotation. The context root has to be specificed in the vendor-specific dd, glassfish-web.xml for example, or the default needs to be accepted.
The endpoint URI is of the form http://hostname:port/contextRoot/applicationPath/path, where applicationPath is specific with @ApplicationPath and path with @Path.
Edited by: asarkar on Jul 24, 2011 2:45 PM -
[OSB1031] how to call a RESTful service from OSB with authentication
Hi all,
I called successfully a RESTful service from OSB.
We have a business service, named OrderTracer, that wraps the call to the RESTful service.
The RESTful service requires an authentication so we are trying to find out how the OSB business service should authenticate itself against the RESTful service.
In addition the RESTful service accepts username/password coded as base64.
So we defined a Service Account with static resource type and we added the reference to this service account in the business service.
But when the OSB business service calls the RESTful service, we got an error:
<fault>
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>Unauthorized</con:reason>
<con:location>
<con:node>RouteNode</con:node>
<con:path>response-pipeline</con:path>
</con:location>
</con:fault>
</fault>
Does anyone have any hint ?
Any clue would be of great help.
Thanks in advance
ferpHi,
There's a sample on JSON REST here...
http://java.net/projects/oraclesoasuite11g/downloads/download/OSB/osb-206-JSONREST.zip
For other samples, see this...
http://java.net/projects/oraclesoasuite11g/pages/OSB
Cheers,
Vlad -
HTTP Adapter and Other Approaches to Call REST services
Hi,
We are coming up with a BPEL process to call the REST service using GET and POST methods. When i tried using HTTP adapter, we have got the error REPLACE_WITH_ACTUAL_URL so we went to another approach given in the blog https://blogs.oracle.com/reynolds/entry/oracle_http_adapter.
This is working fine in BPEL 10g, when we did in the same way in 11g and tried to test we are getting the NullPointerException. Following is the error trace that is shown in the diagnostic log file. Please do let me know if anybody faced this issue and have insight on the same.
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
at java.util.regex.Matcher.reset(Matcher.java:291)
at java.util.regex.Matcher.<init>(Matcher.java:211)
at java.util.regex.Pattern.matcher(Pattern.java:888)
at oracle.integration.platform.blocks.soap.WebServiceExternalBindingComponent.request(WebServiceExternalBindingComponent.java:557)
at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:139)
at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:182)
at oracle.integration.platform.blocks.mesh.MeshImpl.request(MeshImpl.java:154)
at sun.reflect.GeneratedMethodAccessor1172.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy327.request(Unknown Source)
at oracle.fabric.CubeServiceEngine.requestToMesh(CubeServiceEngine.java:820)
at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:263)
at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1059)
at com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalInvoke(InvokeHandler.java:586)
at com.collaxa.cube.engine.ext.common.InvokeHandler.handle(InvokeHandler.java:130)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:74)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:158)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2543)
at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1165)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1071)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:73)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:220)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:328)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4430)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4361)
at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:698)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:555)
at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:673)
at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:293)
at sun.reflect.GeneratedMethodAccessor1166.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:94)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:81)
at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:112)
at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
at sun.reflect.GeneratedMethodAccessor1064.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)I tried using the HTTP adapter which is the straight forward way for calling the REST based services. But when we use XSD complex type we are getting the error REPLACE_WITH_ACTUAL_URL. We have to use GET method. when we tried from the browser it's working fine as expected but erroring out from BPEL.
-
[OSB1031] how to call a RESTful service from OSB
Hi all,
I need to call a RESTful service from OSB.
The RESTful URL service is http://xxx.xxx.xxx.xxx/api/ordertracer and has been implemented in IIS.
The service accepts a xml string message as input and returns an HttpStatusCode.
So I started defining a business service (named OrderTracer):
Service Type: Any XML Service
Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
HTTP Request Method:POST
Or should I define instead a business service (named OrderTracer2) as following ?
Service Type = Messaging Service
Request Message Type = None
Response Message Type = Text
Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
HTTP Request Method:POST
When I try to test the business service (the first one named OrderTracer) from OSB test console I got an error:
<con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
<tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<http:Connection>close</http:Connection>
<http:Content-Length>315</http:Content-Length>
<http:Content-Type>text/html; charset=us-ascii</http:Content-Type>
<http:Date>Wed, 03 Oct 2012 14:26:39 GMT</http:Date>
<http:Server>Microsoft-HTTPAPI/2.0</http:Server>
</tran:headers>
<tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">3</tran:response-code>
<tran:response-message xmlns:tran="http://www.bea.com/wli/sb/transports">Not Found</tran:response-message>
<tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">us-ascii</tran:encoding>
<http:http-response-code xmlns:http="http://www.bea.com/wli/sb/transports/http">404</http:http-response-code>
</con:metadata>
Could I test that RESTful service from business service test console or should I test it from a service callout within a proxy service ?
Thanks in advance for any hints!
ferpHi,
There's a sample on JSON REST here...
http://java.net/projects/oraclesoasuite11g/downloads/download/OSB/osb-206-JSONREST.zip
For other samples, see this...
http://java.net/projects/oraclesoasuite11g/pages/OSB
Cheers,
Vlad -
All,
I'm looking for some advice regarding the consumption of REST services (from the users browser) in an environment that utilizes OAM security and the Oracle Service Bus. Let me set the stage.
We've configured an instance of OAM with OHS acting as a proxy to our applications. One of our apps wants to pull some data (using an AJAX call) from a service directly to the browser. The service is currently protected using HTTP Basic authentication. This works fine for Java apps that want to make those service calls directly, but not so well when it is the browser that wants to make the call.
My assumption (up to this point) had been that I would be able to utilize the OAM Identity Asserter on the service bus in much the same way that we have been using it to propagate identity to our application servers. After speaking with some of the service developers (guys more intimately familiar with the OSB than I am) we haven't tried to do this before and are unsure of the proper implementation to acheive our goal.
So, with all of that being said, am I barking up the wrong tree? Would it be incorrect to have a REST service written that is serviced by two different OSB proxies? One that enforces HTTP Basic, and one that (somehow) uses the OAM_REMOTE_USER and an appropriate identity asserter to pass identity in such a manner that the OSB would be able to enforce security in that manner?
Is there a better way to secure REST services being made from the browser?
Thank you for any help/direction you can provide.
--jamesThere is, but its not great. Publish your Siena app, then turn it into a Visual Studio project per
the links at the top of the forum. On the project's Debugger page, ensure "Allow Local Network Loopback" is set. When you run the app with F5, your app can then hit a server on the same machine via localhost.
This is a Windows restriction for published store apps (eg Siena). By turning your app into a local-deployed app, and enabling the loopback option, you can avoid this policy. See
http://msdn.microsoft.com/en-us/library/windows/apps/Hh780593.aspx -
4.0EA3 RESTful Services
Hi,
I noticed that Kris Rice blogged about the new ability to define APEX Listener RESTful Services in SQL Developer 4.0:
http://krisrice.blogspot.com/2013/08/sql-developer-meets-rest.html
However, I have some trouble connecting to the RESTful Services in 4.0EA3 (same thing in 4.0EA2, didn't try it in 4.0EA1). First of all, I use the same "adminlistener" account that I use to connect to APEX Listener administration from sqldev (I don't know if this is the correct way), and when connecting, I get "500 Internal Server Error". The application server log contains this:
oracle.dbtools.rt.web.WebErrorResponse internalError
SEVERE: null
JDBCException [kind=NO_DATA]
at oracle.dbtools.common.jdbc.JDBCException.wrap(JDBCException.java:99)
at oracle.dbtools.common.jdbc.JDBCQueryProvider.query(JDBCQueryProvider.java:63)
at oracle.dbtools.common.jdbc.JDBCQueryProvider.query(JDBCQueryProvider.java:38)
at oracle.dbtools.rt.jdbc.entity.JDBCEntityProviderBase.query(JDBCEntityProviderBase.java:358)
at oracle.dbtools.rt.oauth.jdbc.JDBCScopesProvider.scopeRoles(JDBCScopesProvider.java:224)
at oracle.dbtools.rt.oauth.jdbc.JDBCScopesProvider.retrieved(JDBCScopesProvider.java:111)
at oracle.dbtools.rt.oauth.jdbc.JDBCScopesProvider.retrieved(JDBCScopesProvider.java:47)
at oracle.dbtools.rt.jdbc.entity.JDBCEntityProviderBase.entity(JDBCEntityProviderBase.java:316)
at oracle.dbtools.rt.jdbc.entity.JDBCEntityProviderBase.entity(JDBCEntityProviderBase.java:328)
at oracle.dbtools.rt.oauth.jdbc.JDBCScopesProvider.byScopeName(JDBCScopesProvider.java:66)
at oracle.dbtools.rt.oauth.scope.Scopes.byScopeName(Scopes.java:33)
at oracle.dbtools.rt.oauth.builtin.jdbc.SQLDeveloperScopePaths.sqlDeveloperScope(SQLDeveloperScopePaths.java:100)
at oracle.dbtools.rt.oauth.builtin.jdbc.SQLDeveloperScopePaths.scopeForPath(SQLDeveloperScopePaths.java:86)
at oracle.dbtools.rt.oauth.ScopeAuthorizationPolicies.scope(ScopeAuthorizationPolicies.java:35)
at oracle.dbtools.rt.oauth.BearerTokens.authenticate(BearerTokens.java:61)
at oracle.dbtools.rt.authentication.AuthenticationService.authenticate(AuthenticationService.java:53)
at oracle.dbtools.rt.authentication.AuthenticationService.verify(AuthenticationService.java:79)
at oracle.dbtools.rt.web.RequestDispatchers.authenticate(RequestDispatchers.java:126)
at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:91)
at oracle.dbtools.rt.web.ETags.checkPrecondition(ETags.java:53)
at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:423)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1288)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3656)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:111)
at $Proxy118.executeQuery(Unknown Source)
at oracle.dbtools.common.jdbc.JDBCQueryImpl.resultSet(JDBCQueryImpl.java:92)
at oracle.dbtools.common.jdbc.JDBCResultRowIterator.<init>(JDBCResultRowIterator.java:29)
at oracle.dbtools.common.jdbc.JDBCQueryImpl.execute(JDBCQueryImpl.java:52)
at oracle.dbtools.common.jdbc.JDBCQueryProvider.query(JDBCQueryProvider.java:60)
... 34 more
Could anyone shed some light on how to make this feature work? I've been unable to find any mention of it, apart from Kris' blog entry.
I use APEX 4.2.2, APEX Listener 2.0.3 and Weblogic 10.3.6.
Thanks,
TobiasThanks Kris, somehow I missed the workspace field in the connection dialog. However, I'm still having problems.
My APEX Listener setup looks like this: I use the routing based on Request Path prefix to define separate databases under /apex: /apex/db_1, /apex/db_2 and so on. For each of these, I've configured a particular workspace which contains the RESTful Services (which means that the workspace isn't included in the URL when calling the services, unlike the default APEX Listener setup). When I include the workspace name (let's call it wspace1) in the connection dialog in sqldev, it automatically transforms the name from wspace1 to /wspace1/, which I assume means it tries to append the workspace to the URL (so the full URL to the RESTful services becomes /apex/db_1/wspace1). When connecting, I get 404 Not Found, because (again, I'm assuming here) it uses /apex/db_1/wspace1 rather than the correct URL /apex/db_1. On the other hand, if I remove the workspace name from the connection dialog, I get "access_denied" (without an HTTP status code).
Is there a way to get the sqldev functionality to work in my case, assuming my understanding of why it doesn't work is correct?
Thanks,
Tobias
Maybe you are looking for
-
Cannot connect to the iTunes store... sorda
A majority of the time I get the "cannot connect to the itunes store" error, and i find that turning the phone off and on fixes it 99% of the time. Or i can keep trying to connect - exiting and entering the itunes application. is there a way/setting
-
Hello. I just performed a clean install of Solaris 10 and Sun Studio 12. Despite this, I cannot compile C99 code. If I try to use c99, I get a message similar to, "c99 utility unavailable SunOS 5.10". Using cc-5.0 with various -xc99 flags, I get an e
-
How to make [Search Mozilla Support] honor specification of a phrase?
Many search facilities will honor a phrase. If I specify "tab character" [including the quote marks!], they will search for the phrase "tab character" and only return links to documents with that phrase. As I discovered when trying to answer a questi
-
How to enable the standard price in the accounting -1 view of material mast
Hi, When i was trying to create a material of material Type: FERT, Iam unable to enter the price of the material in the accounting -1 view-> standard price. The field has been disabled. So please tell me how to enable the standard price. Regards, Rud
-
Messaging between Mac and Windows machines
Hi everyone I am an experienced Windows developer but new to mac development and specially network programming. I have an idea in my mind for a program that needs to somehow make a communication possible between a Mac machine and a Windows machine. I