Creating a webservice from PL/SQL Package in JDev 11g
Hi All...
I have a PL/SQl package and I am using JDEv 11g. I want to create it as a webservice. I want to deploy it in a remote server. Can I deploy it from my client machine. In server Weblogic already started. What are the prerequisites, that we need to deploy a wbservice. I done the following steps.
1. Create an application.
2. Right click the package and select Generate Java option.
3. It create a Java class in the Application sources.
4. Double click the class and select Create Web Service. It created the web service.
5. When I select the webservice and click Run it shows the following error. It going to the Default \server. Actually I need it in a remote server.
[Running application NewWebService on Server Instance DefaultServer...]
---- Deployment started. ---- Apr 20, 2009 1:15:40 PM
Target platform is (Weblogic 10.3).
Running dependency analysis...
2009-04-20 13:15:40.205: Writing WAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService\NewWebService-LastNoWebService-webapp
2009-04-20 13:15:40.222: Wrote WAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService\NewWebService-LastNoWebService-webapp
2009-04-20 13:15:40.357: Writing EAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService
2009-04-20 13:15:40.374: Wrote EAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService
Deploying Application...
<Apr 20, 2009 1:15:40 PM IST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application NewWebService is not versioned.>
<Apr 20, 2009 1:15:40 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1240213540593' for task '3'. Error is: 'java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext'
java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Truncated. see log file for complete stacktrace
>
<Apr 20, 2009 1:15:40 PM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'NewWebService'.>
<Apr 20, 2009 1:15:40 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Truncated. see log file for complete stacktrace
>
[Deployer:149034]An exception occurred for task [Deployer:149026]deploy application NewWebService on DefaultServer.: sqlj.runtime.ref.DefaultContext.
weblogic.application.WrappedDeploymentException: sqlj.runtime.ref.DefaultContext
#### Deployment incomplete. #### Apr 20, 2009 1:15:40 PM
oracle.jdeveloper.deploy.DeployException
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
Caused by: oracle.jdeveloper.deploy.DeployException
at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
... 11 more
Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
... 12 more
#### Cannot run application NewWebService due to error deploying to DefaultServer.
[Application NewWebService stopped and undeployed from Server Instance DefaultServer]
6. when i goto the consoleof weblogic server, already an instance created. But nothing displayed under WebServices.
7. Select the instance and press 'Start'. While deploying an error came.
java.lang.Exception: [DeploymentService:290049]Deploy failed for id '1,240,213,727,265' since no targets are reachable.
Please help me..
its very urgent...
Regards,
Resmi.
Oh, no - another very urgent question. The world must be about to end ;)
Resmi, Have a read of [url http://forums.oracle.com/forums/thread.jspa?threadID=883293]this - JDeveloper 11g, as of today, doesn't (at least is not supposed to) support publishing PL/SQL procedures/packages as a web service.
John
Similar Messages
-
Support for Creating Web Service from pl/sql package in JDeveloper 11
We have been creating all of our web services from pl/sql packages in our Oracle database using JDeveloper 10.1.3.1. I understand that this capability is not supported in Jdev 11. We have been mandated to either move up to JDeveloper 11, or consider switching to eclipse, or even VS2008 and run .NET services from IIS. I have seen work-around solutions using TopLink and Jdev 11. Are there plans to revive this feature in the near future? We're now looking at switching to .NET since we could scrap our OAS instances and use IIS to publish web services. The only reason we were sticking with Oracle was the ease in converting all our existing package to web services with Jdev.
Is anyone else in the same situation. If so, what solutions are you considering?Hi,
there are a lot of option to make plsql web services .
First you can stay with jdev 10.1.3
Use the xmldb servlets
use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
thanks Edwin -
Developing Webservice from PL/SQL package
Oracle 10.2.0.1.0
Oracle JDeveloper 10.1.3.1.0
Oracle APEX 3.2
Oracle HTTP server w/ mod_plsql
Hello! I'm not sure if this is the right forum for this post, if not please direct me to the more appropriate forum...
I have a need to create a webservice for packaged procs in our database. The purpose is to allow other systems to be able to utilize this webservice in order to pass information to our Oracle APEX application. I have attempted to follow the example provided in the following link:
http://st-curriculum.oracle.com/obe/jdev/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
However, being new to webservices, I'm having trouble understanding what needs to be done in order to publish the webservice. I'm not sure what steps our DBA needs to perform in order to install and configure OC4J. Any suggestions or references on how to get started with this?
Your help and guidance is appreciated!
-- ChirayuYou need to have an instance of OC4J running on a server. Then you can deploy to it directly from insider JDeveloper.
A basic how-to that show deployment with 10.1.3 is here:
http://www.oracle.com/technetwork/testcontent/deployment-100609.html
The Oracle Application Server documentation library will have instructions about installing OC4J on the server and configuring it. -
Problem in generate Java from PL SQL package in Jdeveloper
Hi
i have problem in create java class from PL SQL package in JDeveloper.
I use Database navigator of jdeveloper and right click on a package and choose Generate Java then in Jpublisher window choose my view Controller and accept other default values.
I call methods of generated class in the Action of a button in my JSP page, but when I click the button it throw null pointer exception !!! i fund one of generated method return null and it lead to this exception.
protected DefaultContext __tx = null;
public DefaultContext getConnectionContext() throws SQLException {
if (__tx==null){
__tx = (getConnection()==null) ? DefaultContext.getDefaultContext() : new DefaultContext(getConnection());
return __tx;
public Connection getConnection() throws SQLException
if (__onn!=null) return __onn;
else if (__tx!=null) return __tx.getConnection();
else if (__dataSource!=null) __onn= __dataSource.getConnection();
return __onn;
i try to generate class in Model project and create DataControl for that and use method action but noting change and i get null pointer again!!
Jdeveloper Versino = 11.1.1.7.0Let me ask you another question: Why do you generate java from the package at all?
Where do you want to call the package?
Back to your question: you should see code like
public void setDataSourceLocation(String dataSourceLocation) throws SQLException {
javax.sql.DataSource dataSource;
try {
Class cls = Class.forName("javax.naming.InitialContext");
Object ctx = cls.newInstance();
java.lang.reflect.Method meth = cls.getMethod("lookup", new Class[] { String.class });
dataSource = (javax.sql.DataSource) meth.invoke(ctx, new Object[] { "java:comp/env/" + dataSourceLocation });
setDataSource(dataSource);
} catch (Exception e) {
throw new java.sql.SQLException("Error initializing DataSource at " + dataSourceLocation + ": " + e.getMessage());
in the generated code. This code look up a datasource (which you have defined e.g. on the Weblogic Server) by calling the method
setDataSourceLocaltion("jdbc/HRConnDS");
This look up the datasource nad stores it in the class variable.
Timo -
How to generate WebServices for PL/SQL Packages
I have the following issue trying to generate WS for a selected set of operations within a PL/SQL package
If I use the option -sql PKG_TEST then I am getting all operations within a package.
I just want to expose a certain number of procedures ( e.g. PROC1 and PROC2 )
It works only if I specify
-sql PKG_TEST(PROC1)
when I use -sql PKG_TEST(PROC1, PROC2) it gives me errors.
I have Oracle JDeveloper (10.1.3.2) (Build 4066) .
I used wsa with an plsqlAssemble option
java -jar wsa.jar -plsqlAssemble
-appName myApp
-packageName myPckg
-sql PKG_TEST(PROC1)
-dataSource jdbc/ds
-dbConnection jdbc:oracle:thin:@zzzz:1521:mydb -dbUser user/passw
-style rpc
-use literal
Thanks,
Michael HitrikEric,
Thanks a lot for your help.
I was able to follow all of your recommendations
I was able to produce the single ear file for multiple PL/SQL packages .
Now I have the last step ( I hope :-) - WS-SECURITY
What is your recomendation for Security - specifically for WebServices for PL/SQL Packages ?
I would like to do the following:
CLIENT CODE:
* Create a XML element with user name, password, &
* datasource as child elements.
* Element will look like this:
* <credetials>
* <username>scott</username>
* <password>tiger</password>
* <datasource>jdbc/OracleCoreDS</datasource>
* </credentials>
Document doc = new XMLDocument();
Element elAdd = doc.createElement( "credentials");
Element elA = doc.createElement( "username");
Element elB = doc.createElement("password");
Element elC = doc.createElement("datasource");
elA.appendChild(doc.createTextNode("scott"));
elB.appendChild(doc.createTextNode("tiger"));
elC.appendChild(doc.createTextNode("jdbc/OracleCoreDS"));;
elAdd.appendChild(elA);
elAdd.appendChild(elB);
elAdd.appendChild(elC);
doc.appendChild(elAdd);
Element e = doc.getDocumentElement();
// Create an intance of the proxy
EmployeeProxy proxy = new EmployeeProxy();
// Create a Header objecy
Vector v = new Vector();
v.add (e);
Header hdr = new Header();
hdr.setHeaderEntries(v);
// Set the Header
proxy._setSOAPRequestHeaders(hdr);
SERVER CODE:
public void processHeaders(Header header)
throws java.io.IOException,
oracle.xml.parser.v2.XSLException
// Get all the Elements
Vector entries = header.getHeaderEntries();
Element e = (Element) entries.firstElement();
System.out.println("Element received from SOAP header is: " );
((XMLElement)e).print(System.out);
// Get independent nodes and retrieve node values.
Node userNode;
userNode = ((XMLNode)e).selectSingleNode("username");
userName = ((XMLElement)userNode).getText();
Node passwordNode;
passwordNode = ((XMLNode)e).selectSingleNode("password");
password = ((XMLElement)passwordNode).getText();
Node dsNode;
dsNode = ((XMLNode)e).selectSingleNode("datasource");
datasourceName = ((XMLElement)dsNode).getText();
System.out.println("User name is: " + userName);
System.out.println("Password is: " + password);
System.out.println("Datasource is: " + datasourceName);
How can this be done with the generated code using wsa tool ?
Any other suggestions ?
Thanks,
Michael -
Invoking Web Service From PL SQL package
Below is the sample code to invoke web service from pl/sql package using UTL_HTTP:
Declare
http_req UTL_HTTP.req;
http_resp UTL_HTTP.resp;
Begin
http_req :=
UTL_HTTP.begin_request
'http://'
|| lv_hosturl
-- || '.net/soa-infra/services/finance_rt/Payments/paymentsprocess_client_ep',
--new url
|| '.net/soa-infra/services/finance_rt/PaymentsReq/paymentsprocess_client_ep?WSDL',
'POST',
'HTTP/1.1'
UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
-- since we are dealing with plain text in XML documents
UTL_HTTP.set_header (http_req,
'Content-Length',
LENGTH (lv_soap_request)
UTL_HTTP.set_header (http_req, 'SOAPAction', '');
-- required to specify this is a SOAP communication
UTL_HTTP.write_text (http_req, lv_soap_request);
http_resp := UTL_HTTP.get_response (http_req);
UTL_HTTP.read_text (http_resp, lv_soap_respond);
UTL_HTTP.end_response (http_resp);
resp := XMLTYPE.createxml (lv_soap_respond);
End;Hi,
there are a lot of option to make plsql web services .
First you can stay with jdev 10.1.3
Use the xmldb servlets
use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
thanks Edwin -
Call a unix script from pl/sql package
Hi,
Using 11.2.0.3 on AIX.
Is it possible to call unix script from pl/sql package?
I am cretaing a file in a directory but would like this to automatically be written to an archive directory as well.
Could either use 2 utl_file.put_lines to 2 separate directories or 1 utl_file and cal script to archive file in another directory.?
Thoughts?
Thanksuser5716448 wrote:
What am I doing wrong?think how file name will look like:
SQL> select 'file_name' || to_char(sysdate,'DD/MM/YYYY HH24:MI:SS') from dual;
'FILE_NAME'||TO_CHAR(SYSDATE
file_name15/08/2012 11:47:51Will AIX swallow such name? Obviously not. And, unfortunately, UTL_FILE.FCOPY doesn't raise an error in such case. So use someting like:
UTL_FILE.FCOPY ('SOURCE_DIR',v_FILE_NAME,'DEST_DIR',v_file_name||to_char(sysdate,'DD_MM_YYYY_HH24_MI_SS'));SY. -
Hi,
We have an application which is wrapped in a DC which retrive data from the R\3 system.
We would like to create a webservice from this DC. Is it possible? How?
Thanks,
AviadHi AVIAD,
Check this links
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11669cea-0c01-0010-63b2-b98c35b1b370">Using a Web Service as External Service</a>
Adaptive WebService and 1:n relation in the response
Regards,
Mithu -
How do I migrate views from MS SQL 2008 to Oracle 11g through SQL Developer
Is there any way to migrate the views from MS SQL 2008 to Oracle 11g through SQL Developer? Please give me some detail steps. Thanks for your help.
KevinHi Kevin,
user13531850 wrote:
Hi Turloch,
When I use migrate to oracle, I got a problem, the migrate tool create a new schema for me in my case (AZTECA_KSMMS), it migrates all the stuffs under that schema (AZTECA_KSMMS). However my application need the all the Oracle data under schema AZTECA instead of AZTECA_KSMMS. Is there any way to specify specific schema (AZTECA) for target oracle database? Schema remapping is available:
First Capture (separately) then during right click convert on the captured model there is a Specify the conversion options with a Object Naming tab where the schema (and other) name changes are editable.
I have not used this recently.
Also during the migration process, when I choose repository, there is a check box for truncate to reset repository to empty state, Do I need to check that truncate Check Box so the repository will be cleared from last migration?The repository can hold multple migration attempts. Check truncate to get rid of previous attempts information. This cleans up the repository - not the destination database.
There are also online database and offline database options during the migration process, what are the difference between these two choices? After I migrated to Oracle, all my views has a red cross icon next to it. Does that mean the view migration is failed or not? Please give me your comments. Thanks for your help.offline: for big (amount of data) databases with simple data types,
uses bcp + files + scripts + sqlldr.
online: for small (amount of data) databases (easier),
uses (Java) jdbc.
The view is likely to be broken - recompiling it may help.
The Oracle schema is created using a .sql file - see under generated in the directory you gave originally in the wizard. There is a .out file that contains the result of running this script including any errors. During conversion there are also likely to be warnings displayed on the UI.
There may be a single issue that is causing multiple issues - if viewa depends on functionb, and functionb is broken, viewa will also fail.
>
Kevin-Turloch
SQLDeveloper Team -
Trouble when creating webservice from PL/SQL via jdeveloper
Hi,I'm new comer of this world,
I've a pl/sql like this:
package MY_WS_API is
type record_set is ref cursor;
PROCEDURE Get_User_Info(p_user_id VARCHAR2,
p_rep_id VARCHAR2,
p_flag out number,
p_msg out varchar2,
p_recordset out record_set);
end MY_WS_API;
when I using jdeveloper trying to publish it as a webservice, in the step 4 of the wizzard poping me choose the program unit to expose, the PROCEDURE Get_User_Info is not available and told me "Ref cursor Type is not supported due to a jdbc limitation and Ref Cursor Types are only supported for use of return type".
THE QUESTION is:
1.the cursor I used is of return type,I'm not very understanding the "why not" message upon.
2.in such case , need I trans the return cursor into Object[] if have to?
3.any other limitation for generating WS from PL/SQL using jdeveloper?
Thanks!I had the same problem and found that JDeveloper uses the thin driver to connect to oracle, this driver doesn't support ref cursors or xmltypes etc. You have to assemble your own web service using the webservicesassembler command line utility (i.e. wsa.jar). This link should provide you with all you need:
http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14434/wsassemble.htm -
Rest based webservices from plsql procedures/packages
Guyz.
Please let me know How to create Rest based webservices in jdeveloper tool from plsql procedures/packages.
Im very much in need
Thanks,Hi User ,
Welcome to OTN !!
You can refer to these links and figure out -
http://docs.oracle.com/cd/E16162_01/user.1112/e17455/dev_web_services.htm#CHDJIFAE
http://theblasfrompas.blogspot.com/2011/03/developing-restful-web-services-from.html
Also for calling pl/sql packages from Java , use soemthing like this - http://www.coderanch.com/t/302171/JDBC/databases/execute-PL-SQL-program-Java -
Generating Webservices from PL/SQL Problem
Hello,
when I try to automatically generate a webservice from my pl/sql package, I cannot choose a specific procedure.
The "why not" button tells me, that there is no xml schema mapping or serializer available.
my question:
The pl/sql procedures output parameter are tables, like:
Spec:
TYPE my_type IS TABLE OF t_my_table.id%TYPE
INDEX BY NATURAL;
Body:
procedure .... (
out_param OUT my_type;
Is it generally possible to autogenerate this kind of output parameter as webservice or have I missed something ?
Do I have to use java instead ?
Thank you for your help,
FrankHi,
Within the package dbms_xmlquery there is a procedure called setDateFormat which you can use to set a format mask.
But the format mask must be one recognised by the java.text.SimpleDateFormat class. an example would be.
dbms_xmlquery.setDateFormat(lc_xmlgen_contex, 'dd.MM. yyyy');
Hope this helps -
Creating Excel Workbook from PL/SQL Procedure
I am trying to create Excel Workbook with two worksheets from PL/SQL procedure. I created one worksheet. Can I create a separate sheet from same procedure. I used OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE)
command to create the spreadsheet.
Any help would be helpful.
Thanks
Yagna ShahFurther to my previous post here is how I will develop a typical master details excel report.
by using the package,
It will also show sum of salary at each department.
Note : When I paste the code here I loose the indentation. So the code below is not indented properly.
DECLARE
r NUMBER := 0 ; --- r IS the ROW NUMBER IN this excel file
l_sum NUMBER ;
BEGIN
--- Generate the styles that we need
gen_xl_xml.create_excel( 'UTL_DIR','master_Detail.xls') ;
gen_xl_xml.create_style( 'dept_title' , 'Arial', 'Red',14, p_backcolor => 'LightGray' );
gen_xl_xml.create_style( 'sgs2' , 'Arial', NULL ,10, p_bold => TRUE );
gen_xl_xml.create_style( 'sgs3' , 'Arial', 'blue',14 );
gen_xl_xml.create_style( 'sgs4' , 'Arial', 'green',14 );
gen_xl_xml.create_style( 'emp_title' , 'Arial', 'Black',9, p_backcolor => 'LightBlue' );
gen_xl_xml.create_style( 'sal_tot' , 'Arial', 'Brown',13, p_backcolor => 'Yellow' );
-- SET ANY COLUMN AND ROW changes
gen_xl_xml.set_column_width( 3, 145 );
gen_xl_xml.set_column_width( 4, 145 );
l_sum := 0 ;
FOR recd IN ( SELECT department_id, department_name FROM departments ) LOOP
IF l_sum <> 0 THEN
r := r +1 ;
gen_xl_xml.write_cell_char( r, 4, 'Department Total ->' , 'sal_tot' );
gen_xl_xml.write_cell_num( r, 5, l_sum , 'sal_tot' );
l_sum := 0;
END if ;
r := r+1 ;
gen_xl_xml.write_cell_CHAR( r,1, 'Department : '|| recd.department_name , 'dept_title' );
-- As we need same style applied till the above data flows use write_cell_null
gen_xl_xml.write_cell_NULL( r,2 , null );
gen_xl_xml.write_cell_NULL( r,3, 'dept_title' );
gen_xl_xml.write_cell_NULL( r,4, 'dept_title' );
gen_xl_xml.write_cell_NULL( r,5, 'dept_title' );
--- Add employee heading
r := r+1 ;
gen_xl_xml.write_cell_CHAR( r,2, 'EmployeeID' , 'emp_title' );
gen_xl_xml.write_cell_CHAR( r,3, 'First Name' , 'emp_title' );
gen_xl_xml.write_cell_CHAR( r,4, 'Last Name' , 'emp_title' );
gen_xl_xml.write_cell_CHAR( r,5, 'Salary' , 'emp_title' );
FOR rec IN (SELECT employee_id , first_name , last_name, salary FROM employees WHERE department_id = recd.department_id ) LOOP
r := r+1 ;
gen_xl_xml.write_cell_num( r,2, rec.employee_id, 'sgs2' );
gen_xl_xml.write_cell_char( r,3, rec.first_name, 'sgs3' );
gen_xl_xml.write_cell_char( r,4, rec.last_name , 'sgs4' );
gen_xl_xml.write_cell_num( r,5, rec.salary );
l_sum := l_sum + rec.salary ;
END LOOP ;
END LOOP ;
gen_xl_xml.close_file ;
END ;
----------------------------------------------------------------------------------------------------------------- -
Creating web service from pl/sql procedure
Hello.
I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
But I have several troubles:
1. All element names have lower case letters.
2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
3. And operation name has tail like "Element".
I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
But for point 3 i have no ideas.
This task is very important for me. Can somebody help me?
JDeveloper 10.1.3.3
Regards,
Alekseyhttp://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
Frank -
What are the steps to create a webservice from java
i followed the doc. of weblogic 10.3 but something is missing..i am using ubuntu
1)
i created a webservice ping.java which placed in myproject/HelloWorld directory
package HelloWorld;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.BindingType;
@WebService(name="SimplePortType", serviceName="SimpleService",
targetNamespace="http://example.org")
@SOAPBinding
@BindingType
public class ping {
@WebMethod
public String main(String p){
System.out.println("sayHello:" + p);
return "Here is the message: '" + p + "'";
2) and created a build.xml and placed it in myproject folder
<project default="all">
<target name="all"
depends="clean,build-service,deploy" />
<target name="clean">
<delete dir="output" />
</target>
<path id="*my.path*">
<pathelement path="/home/suresh/bea/jdk160_05/lib/tools.jar"/>
<pathelement path="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar"/>
</path>
<taskdef name="jwsc"
classname="weblogic.wsee.tools.anttasks.JwscTask" classpath="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar" />
<target name="build-service">
<jwsc srcdir="HelloWorld" destdir="output/helloWorldEar">
<jws file="ping.java" type="JAXWS"/>
</jwsc>
</target>
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" classpath="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar"/>
<target name="deploy">
<wldeploy action="deploy"
name="myproject"
source="output/helloworldEar" user="weblogic"
password="weblogic"
adminurl="t3://${wls.hostname}:${wls.port}"
targets="${wls.server.name}"/>
</target>
</project>
3) after that how to start weblogic and how to set any needed env or domain properties.How to publish it to server?
4) how to configure security
can i use netbeans to do all the above things?
Thanks
Sureshwhat my.path indicates in the above wsdl?
or which path i have to give there?
Maybe you are looking for
-
The iPad could not be restored. An unknown error occurred (1)
As a lot of people had last night the Apple servers were very busy with iPads and iPhones upgrading to iOS5... So I waited until this morning to upgrade. iPhone 4 no issues at all and now using iOS5 iPad (version 1) backed up but not is coming up wit
-
Re: Lumia 520 - Opening a video sent from WhatsApp...
My Lumia 520 takes at least 10 mnts to open up a video sent via WhatsApp. It is too long. I got dis phone via flipkart. Photo uploading to my profile in many sites wil not happen. Occasionally it uploads. What is the solution? (Someone said me phone
-
hi i make a widget in flex for Captivate5.5, now i want to get my Object Name(widget->Animation->ObjectName) in flex , how can i get that name how can i get Object Name in Flex Dynamically....
-
hi Friends, we have posted 2 invoices with a wong date on it future date 23 July. but the payment dates for these invoices were on 9th July. now the paymnets are already cleared by the payment run and the amount is already debited from the account. w
-
Parsing field data into mailto:
Is there any way to pull field data, like with a variable %TextField2%, so it can be used somewhere else in the form? What I'm trying to setup is a form that will take the data from TextField2 so I can use it to prepopulate the subject of the mailto