New to Web Services - need to call a HTTPS web service from PL/SQL
I am new to Web Services and need to call HTTPS web service from PL/SQL program. I am using 10g Database.
I have been reading there are 2 options -
1. UTL_HTTP - with this package its possible to call HTTPS web services
2. UTL_DBWS
Questions -
1. Is it possible to call a HTTPS web service using UTL_DBWS ? I have not been able to find any information on it.
2. Can someone point me to UTL_HTTP and UTL_DBWS examples calling a HTTPS web service ?
3. The HTTPS web service that I need to call needs username/password to connect - how will I incorporate this in the pl/sql code ?
Appreciate the help.
Cheers,
newWebServicesUser
Hi,
1. UTL_DBWS not work for https from what I understand
2. Here is a sample example:
[http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php#]
Be careful, you must change http/1.0 IN 1.1 inside package SOAP_API.
Here is an example for a prime number where the SOAP message is already construct:
CREATE OR REPLACE procedure test_ws_2
IS
http_req utl_http.req;
http_resp utl_http.resp;
request_env varchar2(32767);
response_env varchar2(32767);
begin
-- Set proxy details if no direct net connection.
UTL_HTTP.set_proxy('http://<USER>:<PASS>@10.0.2.21:8070', NULL);
UTL_HTTP.set_persistent_conn_support(TRUE);
request_env:='<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">'||
'<SOAP-ENV:Body><GetPrimeNumbers xmlns="http://microsoft.com/webservices/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
'<max xsi:type="xsd:int">10</max>'||
'</GetPrimeNumbers></SOAP-ENV:Body></SOAP-ENV:Envelope>';
dbms_output.put_line('Length of Request:' || length(request_env));
dbms_output.put_line ('Request: ' || request_env);
http_req := utl_http.begin_request('http://www50.brinkster.com/vbfacileinpt/np.asmx','POST', utl_http.HTTP_VERSION_1_1);
utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
utl_http.set_header(http_req, 'Content-Length', length(request_env));
utl_http.set_header(http_req, 'SOAPAction', '"http://microsoft.com/webservices/GetPrimeNumbers"');
utl_http.write_text(http_req, request_env);
dbms_output.put_line('');
http_resp := utl_http.get_response(http_req);
dbms_output.put_line('Response Received');
dbms_output.put_line('--------------------------');
dbms_output.put_line ( 'Status code: ' || http_resp.status_code );
dbms_output.put_line ( 'Reason phrase: ' || http_resp.reason_phrase );
utl_http.read_text(http_resp, response_env);
dbms_output.put_line('Response: ');
dbms_output.put_line(response_env);
utl_http.end_response(http_resp);
end test_ws_2;
Otherwice for testing url, i recommand you to use that function: Re: Error using UTL_HTTP over HTTPS
it's a verry helpful function when you have an error.
wrote:
When testing using UTL_HTTP, you MUST ensure that you open a new session after importing the SSL certificates into your Wallet,
as I've learned (the hard way) that existing sessions point to the wallet contents that were present when the session was opened.
If you don't realise/know this, it can cause a lot of additional frustration during testing, when you keep getting the ORA-29024 exception AFTER
you've imported the SSL certificates................. ;) 3. i think you can use that after the begin_request but not sure :
UTL_HTTP.set_authentication(r => http_req,
username => ,
password => ,
scheme => ,
for_proxy => );
Edited by: Malebodja on Oct 22, 2009 6:53 AM
Edited by: Malebodja on Oct 22, 2009 6:55 AM
Similar Messages
-
How to call a Https Web service client (partner link)
Hi,
I am trying to call a https web service and having issues with it. I have copied the server certificate into my JDeveloper truststore as well as into OC4J truststore. I have successfully deployed the application but when I initiate the process and enter input values, it throws the following exception 'Security Requirements not met - No Security header in message'
<fault>
- <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
- <part name="code">
<code>
Server
</code>
</part>
- <part name="summary">
<summary>
Security Requirements not met - No Security header in message
</summary>
</part>
- <part name="detail">
<detail>
<detail>
<ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.XWSSecurityException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
<message xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">Security Requirements not met - No Security header in message</message>
<ns2:stackTrace xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient" file="SecurityRecipient.java" line="738" method="createMessage"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient" file="SecurityRecipient.java" line="226" method="validateMessage"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.provider.wsit.WSITServerAuthContext" file="WSITServerAuthContext.java" line="471" method="verifyInboundMessage"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.provider.wsit.WSITServerAuthContext" file="WSITServerAuthContext.java" line="297" method="validateRequest"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.wss.provider.wsit.WSITServerAuthContext" file="WSITServerAuthContext.java" line="211" method="validateRequest"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.webservice.CommonServerSecurityPipe" file="CommonServerSecurityPipe.java" line="168" method="processRequest"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.webservice.CommonServerSecurityPipe" file="CommonServerSecurityPipe.java" line="129" method="process"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.helper.PipeAdapter" file="PipeAdapter.java" line="115" method="processRequest"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="595" method="__doRun"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="554" method="_doRun"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="539" method="doRun"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="436" method="runSync"/
>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="444" method="handle"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.transport.http.HttpAdapter" file="HttpAdapter.java" line="244" method="handle"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" file="ServletAdapter.java" line="135" method="handle"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.webservice.JAXWSServlet" file="JAXWSServlet.java" line="159" method="doPost"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="738" method="service"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="831" method="service"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="411" method="servletService"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardWrapperValve" file="StandardWrapperValve.java" line="290" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardContextValve" file="StandardContextValve.java" line="271" method="invokeInternal"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardContextValve" file="StandardContextValve.java" line="202" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="632" method="doInvoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="577" method="doInvoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.WebPipeline" file="WebPipeline.java" line="94" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardHostValve" file="StandardHostValve.java" line="206" method="invok
e"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="632" method="doInvoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="577" method="doInvoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="571" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.ContainerBase" file="ContainerBase.java" line="1080" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardEngineValve" file="StandardEngineValve.java" line="150" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="632" method="doInvoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="577" method="doInvoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.StandardPipeline" file="StandardPipeline.java" line="571" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.catalina.core.ContainerBase" file="ContainerBase.java" line="1080" method="invoke"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="org.apache.coyote.tomcat5.CoyoteAdapter" file="CoyoteAdapter.java" line="272" method="service"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask" file="DefaultProcessorTask.java" line="637" method="invokeAdapter"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask" file="DefaultProcessorTask.java" line="568" method="doProcess"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask" file="DefaultProcessorTask.java" line="813" method="process"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.DefaultReadTask" file="DefaultReadTask.java" line="341" method="executeProcessorTask"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="c
om.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask" file="SSLReadTask.java" line="440" method="process"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask" file="SSLReadTask.java" line="228" method="doTask"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.TaskBase" file="TaskBase.java" line="265" method="run"/>
<ns2:frame xmlns:ns2="http://jax-ws.dev.java.net/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" class="com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread" file="SSLWorkerThread.java" line="106" method="run"/>
</ns2:stackTrace>
</ns2:exception>
</detail>
</detail>
</part>
</remoteFault>
</fault>
Any help will be appreciated. I am using JDeveloper 10.1.3.3.0.
ThanksHmm, based on error it looks like service provider expecting some security headers. Are you able to test from other utility soapUI or browser?
Regards,
Chintan -
Calling an https web service fro Oracle 9i database
I have seen in OTN as well metalink how to call an external web service
From inside PL/SQL functions. Examples use http URL.
My requirements are however to call a web service using https.
Is it possible to do that in Oracle9i. If yes, how? Any pointers
Will be appreciated.
I have read utl_http package can call https. It seems to require Oracle Wallets (I guess that requires Oracle advanced security option).
I will like to get any pointers to call an https web service within Oracle9i.
I will also like to know options in Oracle10g. Right now, I am only interested in calling an external service and not developing one of my own.
Thanks,With 10g database, the basic steps were posted in
Re: howto callout with https -
Is it possible to call a windows batch file from PL/SQL
Hi gurus,
Would require your help.Is it possible to call a windows batch file from PL/SQL??If yes can you give an example for the same or any workaround for the same.
Regards
VijayHi!
Youn need some extproc related entries in you listener.ora and tnsnames.ora file.
*1. In the listener.ora:*
Defining the listener process is done in two parts.
The information contained in each listener differs!!!
The first part is as follows:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc)) <--- *ADD THIS LINE
(ADDRESS = (PROTOCOL = TCP)(HOST = yourhostname)(PORT = 1521))
)The seoncd part is as follows:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = YOUR_GLOBAL_DBNAME)
(ORACLE_HOME = c:\oracle\product\10.2.0) <-- THIS IS YOUR ORACLE_HOME
(SID_NAME = YOUR_SID) <-- SID
(SID_DESC = <--- ADD THIS LINE
(SID_NAME = PLSExtProc) <--- ADD THIS LINE
(ORACLE_HOME = c:\oracle\product\10.2.0) <--- ADD THIS LINE AND EDIT TO YOUR ORACLE_HOME
(PROGRAM = extproc) <--- ADD THIS LINE
(ENV = "EXTPROC_DLLS=ANY") <--- ADD THIS LINE
) <--- ADD THIS LINE
)*2. In the tnsnames.ora you need to add the following entry:*
*(The KEY value entered must be match to the KEY value entered int the listener.ora file!)*
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)Finally you need to restart your listiner. After restarting there will be a service called "PLSExtProc" in your listener.
This are only examples for extproc configuration, your tnsnames.ora and listener.ora can be differs.
FIRST MAKE MAKE A BACKUP OF YOUR ORIGINAL tnsnames.ora AND listener.ora FILES
For more information please check metalink note 68061.1 "EXTPROC: Creating External Procedures on Windows NT"
Bestr Regards
Norbert -
Is it possible to call a windows batch file from PL/SQL block ??
Hi gurus,
Would require your help.Is it possible to call a windows batch file from PL/SQL block ??If yes can you give an example for the same or any workaround for the same.
Regards
VijayYou didn't specify a database version, but if you are 10g or higher, it's quite straightforward using an external job type in DBMS_SCHEDULER. Funnily enough i'm looking at something similar myself at the moment.
Useful guide to some of the issues here Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files -
Need to call custom version of RSNAST00 from VF03 output type
I have created a customized version of the RSNAST00 program which is valid for two existing ouptut types for billing condition "V3". This new program (ZRSNAST00) works fine when called directly (i.e. se38). However, when issuing output type via VF03, the old program is called (RSNAST00). Is there a setting to tell the output type to use ZRSNAST00?
FYI, I have checked NACE, and the output type references the print program (which is the same for both versions of the driver program.
Thanks for any help!
jeffThere is some special sort I had to include for printing. Client needed to have page-number order (single page first, 2-page next, etc.) in the spool.
I may need to create new output type for the ZRSNAST00 version to run, and leave RSNAST00 for the "normal" single processing via VF03. -
Calling BI Publisher API's from pl/sql
Hi,
We are currently in Oracle Applications : 12.0.4, RDBMS : 10.2.0.3.0 and have a requirement to generate a pdf report using BI Publisher from pl/sql.
We do not want to go to Concurrent Manager because this report will be generated every minute and should be real time.
So my questions are:
1) Can I load the bi publisher jar files into the database and try generating the report using the api's. Is this approach correct?
2) Can someone help me with the jar files that i need to load. I don't have Java experience and hence need to know this.
3) With this approach can I directly print to the users printer. The user doesn't want to see the report output on the screen.
Please let me know how should i go about with this.
Thanks.Hi Ike,
Tim has suggested to use Web services and I have few questions about it. see below.
We are currently in Oracle Applications : 12.0.4. We are using BI Publisher that comes with Oracle Applications. I had few questions :
Do we need to install BI Product separately to use the Web Service Feature ?
Do we need to install some components for BI to use the Web Service Feature ?
How do we integrate BI Web services with Oracle Applications?
I went through the guide and found an example to call a report . I tried the url for bipEndpoint variable and it doesn't return anything.
My report is defined in Oracle applications as a Concurrent Program. What do we need to pass in xdofile variable.
Please let me know how to proceed with this.
Thanks.
--- Sample Code from guide Oracle® Business Intelligence New Features Guide Release 10.1.3.4.1
public static void runReport() throws Exception {
final String bipEndpoint =
"http://mycompany.com:9999/xmlpserver/services/PublicReportService?wsdl";
final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
final String xdofile ="/HR Manager/Employee Salary Report/Employee Salary Report.xdo";;;
// set up the call object
service = new Service();
call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(bipEndpoint));
// TEST Run Report
System.out.println("TESTING runReport Service BEGIN");
// register the ReportRequest class
QName reportReq = new QName(bipNamespace, "ReportRequest");
call.registerTypeMapping(ReportRequest.class, reportReq,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
// register the ParamNameValue class
QName nmvals = new QName(bipNamespace, "ParamNameValue");
call.registerTypeMapping(ParamNameValue.class, nmvals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
// register the BIPReportResponse class
QName reportRespqn = new QName(bipNamespace, "ReportResponse");
call.registerTypeMapping(ReportResponse.class, reportRespqn,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
// Default return type based on what we expect
call.setOperationName( new QName(bipNamespace, "runReport" ));
call.addParameter( "ReportRequest", reportReq, ParameterMode.IN );
call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnClass(ReportResponse.class);
ParamNameValue[] paramNmVals = new ParamNameValue[2];
paramNmVals[0] = new ParamNameValue(false, "dept", null) ;
paramNmVals {"*"}) ;
ReportRequest req = new ReportRequest("pdf", "en-US", "Simple", paramNmVals, xdofile);
// issue the reques
ReportResponse reportResp = (ReportResponse) call.invoke(
new Object[] {req, "Administrator", "Administrator"} );
System.out.println("Return ReportResponse: ContentType = " + reportResp.getReportContentType());
// Save the report
byte[] binaryBytes = reportResp.getReportBytes();
OutputStream out = new FileOutputStream("D:\\temp
out.pdf";;);
out.write(binaryBytes);
out.close();
System.out.println("Success for Run Report");
Thanks. -
Calling schema specific packe/function from PL/SQL
From PL/SQL I am trying to call a package function in a specific schema (see below). When I try it gives me this error:
Invalid function body condition: ORA-06550: line 3, column 15: PLS-00201: identifier 'SCHEMA1.SIS_EXPRESS' must be declared ORA-06550: line 3, column 1: PL/SQL: Statement ignored
Am I missing something as I thought this was the correct syntax?
DECLARE button_ok boolean := FALSE;
BEGIN
button_ok := my_schema.SIS_express.ok_to_add (:APP_USER,:P0_LOGIN_SCHOOL_YEAR,:P0_LOGIN_SCHOOL,:APP_ID,:APP_PAGE_ID);
<<end_of_trigger>>
return button_ok;
END;An Apex workspace is associated with one or more schemas.
An Apex application in that workspace needs to select one of these schemas as its parsing schema.
This means that all application code (PL/SQL and SQL code you write in that Apex app) will be parsed (using the DBMS_SYS_SQL package) as the parsing schema.
Note that the current and acual schema for the Apex database session will the anonymous schema account as configured for connectivity for that database access descriptor (DAD) on the Apache server. You do not connect (via Apex) as your parsing schema. You connect to an anonymous schema. It runs trusted Apex code (that executes with the Apex schema's privs). This code parses your Apex app code via the system package to be executed as your parsing schema.
So you need to make sure that your parsing schema has the appropriate rights to execute the PL/SQL and SQL application code you put into your Apex application.
Also be aware that if you use that DAD to directly execute your PL/SQL code in the database (procedures or functions), the call will be made from the anonymous database schema used by that Apache DAD connection - thus that schema will then need to have exec rights on your code.
In the case of the Apex flow engine - public exec rights exist on it and thus that DAD session from Apache can logon as the anonymous schema and execute the Apex run-time to run an Apex application. -
Call a remote Java API from PL/SQL
Hi
I want to call a remote Java API from my PL/SQL. Can someone please provide me the steps to do this?
Thanks in advance
-GHello
thanks for the link. But is not telling me what I want.
I dont have java in my computer. I will be supplied with a java API name which I have to call by connecting to remote server. I will be have the username and password to connect and call the remote API. I need to get the return value from the remote Java API in my PL/SQL. I hope I have explained the issue clearly.
Thanks again.
-G -
Can we call OS commands and SQLLOADER from pl/sql
Hi,
Please provide me a solution for calling OS commands and SQLLOADER from pl/sqlSee http://www.oracle-base.com/articles/10g/Scheduler10g.php for OS Commands.
Another option for your SQLLoader question would be the use of external tables,
http://www.oracle-base.com/articles/9i/ExternalTables9i.php
C. -
Web services Connection_Operations.Logon call fails on Data Services 4.0
Hello,
We recently installed Data Services 4.0. We have a custom Java app which makes use of the web services interface. We had previously used Axis to generate the java class. With DS 4, it looks like the Logon method did change as it now requires the cms system and authentication. We manually updated the java classes to includes these, which has been our general approach in the past for newer releases. However DS 4 uses Axis2 and I'm not sure that this approach would work.
My problem is that the "Logon" call fails with very little details.
In viewing both the webadmin.log and WebService.log it only reports the following:
11/02/2011 18:42:17 [ SEVERE ] Logon failed. Error: null
I understand that I can control the logging detail . The Integrator Guide for DS 4.0, has the following instruction, yet there is no log4j.properties file on my system?
"To control the level of detail in the webadmin.log file, you must edit the log4j.properties file.
The properties file is located in:
LINK_DIR\ext\webserver\webapps\acta_web_admin\WEB-INF
To obtain a debug trace of events, change the log level from the default of INFO to DEBUG. For example,
log4j.rootLogger=DEBUG, A"
Any advise would be greatly appreciated
ThanksHello,
Unfortunately, stdout.log below doesn't show anything possibly due to some mis-configuaration of log4j.properties. In my previous post I requested info on which log4j.properties should be modified as the documentation in the DS 4.0 Integrator's guide mentions a none-existent path?
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
log4j:WARN Please initialize the log4j system properly.
com.businessobjects.webpath.rebean3ws.Activator
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
null -
Calling a HTTPS Web Service through a proxy
Hi All,
I am trying to make a web service proxy for a service runnig on the weblogic server over https connection. While I am configuring the proxy I am getting an error saying that Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Tunnel or SSL Forbidden"
Any ideas why I am getting this or how it can be resolved?
Thanks in advanceHi Sandeep,
I will add some more details here to add clarity,
My web service is running over SSL (one-way) on SOA server managed by weblogic server. I am trying to create a proxy for it in jdeveloper. I can access the WSDL document through the browser at the following link:
https://10.227.32.125:8002/soa-infra/services/default/Test_OWSM_11g/bpelprocess1_client?WSDL
Now in the second step of creating of proxy (in jdeveloper) i am mentioning the above URL but getting an error saying that no WSDL document found at this location.
Any ideas where I might be goin wrong -
Since updating to the new iOS7, I receive a call several times a day listed as "unknown" and nobody is on the line. Any advise as to why this is happening and how I can block this call?
Update - made an appointment at Genius bar today (chadstone, Victoria, Australia).
Genius examined phone, replicated the issue and identified a malfunctioning main microphone. He noted that the reason I could still talk to the other party when I activated the 'speakerphone' function is that the speakerphone has a (second) noise cancelling microphone/speaker at the top of the handset. He replaced the phone under warranty, and offered to help me to set up the new phone. In and out in less than 15 minutes, with new phone operational.
Very knowledgable, very polite and just great service.. Thank you Apple team at Chadstone. -
Upgrade new phone process. 4s to 5s
Connect the 4S to iTunes. Backup the device.
Connect the 5S to iTunes, then do a Restore. Restore to the 4S backup when prompted. -
Calling a java loaded API from PL/SQL
HI,
I have a java program loaded in the Database.
For sake of clarity I am posting the java Program also.
package mypackage1;
public class WriteClob extends CLOB
public static void main(String[] args) {
Connection conn = null;
String url = null;
String user = null;
String password = null;
Properties props = new Properties();
String fileName = null;
String xml_test ="KINGSTON";
StringBuffer s_xml = new StringBuffer();
// PreparedStatement ps = null;
OraclePreparedStatement ps=null;
int ret_int=0;
props.put("user", "apps" );
props.put("password", "apps");
long len=0;
int temp;
ResultSet rs = null;
SimpleDateFormat fSDateFormat = null;
props.put("SetBigStringTryClob", "true");
long first=System.currentTimeMillis();
url = "jdbc:oracle:thin:@ap619sdb:4115:owf12dev";
user = "apps";
password = "apps";
try
DriverManager.registerDriver(new OracleDriver()); // Get the database connection
conn = DriverManager.getConnection( url, props );
long second=System.currentTimeMillis();
System.out.println("Time between conn. "+(second-first));
first=System.currentTimeMillis();
for (int i =0;i<1000;i++){
s_xml.append(xml_test);
second=System.currentTimeMillis();
System.out.println("Time between loop "+(second-first));
first=System.currentTimeMillis();
ps =(OraclePreparedStatement) conn.prepareStatement("insert into xml_clob_temp1 values(:1)");
ps.setString(1,s_xml.toString());
ps.executeUpdate();
second=System.currentTimeMillis();
System.out.println("Time between loop "+(second-first));
} catch(SQLException sqlexp){ sqlexp.printStackTrace(); }
Now i am trying to create a procedure to call this Java API.
create or replace package load_perf as
procedure WriteClob ;
end;
create or replace package body load_perf as
procedure WriteClob
is
language java name 'mypackage1.WriteClob.main(java.lang.String)';
end;
I have tried debugging this a lot and am not able to overcome this error while creating the procedure.
LINE/COL ERROR
3/1 PL/SQL: Item ignored
5/15 PLS-00311: the declaration of
"mypackage1.WriteClob.main(java.lang.String)" is incomplete or
malformed
I have earlier created Java APIs which have returned some value and have been able to load them in the DB and call through a PL/SQL function wrapper.
But I am unable to create a procedure for this.
I have tried all sorts of debugging but always am getting error around this.
Can someone Please take a look at this Pronblem.
Thanks In Advance,
GauravA proper designed application in the database tier is far more scalable and performs better than using a separate middle tier for the application.
This should be self evident.
A middle tier requires more moving parts between the application and data. There now sits a network pipe between application and data. There are more software layers that slows down the interaction of the application with the data - more stuff that can go wrong. More stuff that needs to be maintained and configured and secured.
What's more, the database tier is a lot more scalable than the middle tier. Oracle Real Application Clusters. Oracle Parallel Processing. Oracle Shared Server. Etc.
These are robust and mature technologies.
One major fact that seems to be missed by so-called IS architects favouring a middle tier is that the middle tier cannot make a single database query or transaction go faster.
Scaling the middle tier is done by throwing more hardware at it. But not a single additional mid-tier h/w platform will make the database tier any faster. Will make the database tier scale.
Then there is also the issue of costs. A middle tier requires additional hardware. It requires support and maintenance agreements with the vendors. It requires middle tier software to be purchased. It requires a new set of skills to do middle tier development. It deals with different technology and different programming languages.
Why? How can this approach be sensible when:
- Oracle scales exceedingly well (and this scalability is not dependent on more h/w purchasing)
- Oracle deals with a single programming language (PL/SQL)
- Oracle supports high availability
- Oracle supports redudancy
- Oracle supports the complete application tier inside the database
If you have problems now leveraging Oracle (as an application tier), then you will have more problems when doing it a middle layer. Why?
Because the lack of experience/skill/knowledge required to make Oracle work for you, is not now suddenly negated and not needed when moving the application tier to Java.
Maybe you are looking for
-
I have researched similar questions for this issue, but none of the solved answers seem to apply for me! This is what shows up when I click on 'music' on 'my device' (which is an iPhone 4s ios 8) it looks fine, but as you can see- some recently purc
-
How can we bind Two Static Lists to a single Column.
Hi All, My requirement is 1) I have two different Static List's. 2) These two static list's are saved to the same column in the database table. 3) In the UI, I will be having different dropdown's. And each dropdown is bound to this column. Say if I h
-
Hi everyone, hope you can help. My iphone was stood on and broken and i hadnt backed it up to itunes, i have had it repaired, it looks brand new but it has no audio at all, i have very important voice recordings that i need off the phone i can see t
-
How to install OS X 10.5 on iBook G4?
I am having trouble installing OS X 10.5 on my iBook G4 it currently runs OS X 10.4.11 I put the disc for Leopard in my external cd/DVD drive and the window comes up to install, I click that then the window comes to to restart to start the installati
-
Enable Block Change Tracking in 11gr2
Hi Team, If my database file system is in ASM..Can I enable blk change tracking in local filesystem? Or IS it better to do in ASM? Any new features in 11gr2? Regards, Manohar