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

Let 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

Similar Messages

  • Issue generating java from pl/sql package

    Hi,
    In JDeveloper (11.1.1.6) I am having an issue generating java from a pl/sql package. When I am in the database navigator I right click on the package and select "generate java". This produces some java files, some sqlj files and a <package_name>.javatmp file. When a collegue does the same all files are generated with a .java extension. Can anyone tell me what I can do to generate all java files?
    Thanks,
    Graeme

    It turns out that I was running against a 64-bit JDK. (1.6.0_41.)
    When I changed this to run against a 32 bit JDK (also 1.6.0_41) my problem went away.
    It might be worth noting that my machine is 64 bit.

  • 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

  • Problems to generate JAVA from SQLJ

    Hi, i work with Developer 10.1.3, and I try to generate files .java from files .sqlj. I generate java files from de packages in data base, but don´t generate me files .java from the .sqlj generated. Can anyone help me?
    Regards.

    Hi,
    Does it happen for a particular work area or any workarea?
    Can you give the detail of the Designer client you are using?
    The following steps should be follwed:
    Select Database as "Source of Design Capture"
    Give the correct database connection detail
    Give the correct Target Container, Capture Implementation Info and User.
    Select the object(s) to be captured
    Click the Start button

  • Generating reports from PL/SQL

    I'm new to the world of BI Publisher - so far I'm impressed with what I've seen. I've managed to create a report and an RTF template and generate some nice looking PDF's :)
    What I need to do now is to have a nightly job that produces PDF shipment reports using my template for all new shipments generated during the day and I'm having a little difficulty putting it all together.
    I've looked at the BI Publisher API's that allow me to generate an XSL from my RTF template and the using the FO engine merge the XSL and XML data to produce the PDF. Then using the delivery manager API's I can send these reports out via email.
    I'm a little unsure of how to get the XML source - I've played around with the DataEngine API to generate XML from a SQL query so I think that's where I should be heading.
    Does this all sounds right ? Ideally, I want to be able to do all of this from within a scheduled PL/SQL job every night but all the interaction with the BI server seems to be via Java.
    Is there an easy(ish) way to run all of this from within PL/SQL ?
    And should I be going about this by:
    1/ generate XML data using dataengine API
    2/ create an RTF template using word and the xml data generated above
    3/ use the RTF processor to generate an XSL-FO from my RTF template
    (1-3 will only need to be done once)
    4/ Then my nightly job will use the dataengine to generate new shipment XML data
    5/ use FO processor to generate PDF's from each
    6/ use delivery manager API's to email out
    All sounds very cumbersome and intense -is there no easier way ?! :) Also, I'm thinking i should be using the bursting engine to split one query containing all the new shipment data and generate/mail a PDF for each shipment ? Is that necessary if all going to the same email address ?
    Help/guidance/suggestions greatly appreciated !
    Many thanks,
    Brent

    repost .... Has anyone successfully called BIP web services from within the database using Java stored procedures ?
    Still struggling to work out how to generate my reports from PL/SQL ! :((

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

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

  • IWAB0399E Error in generating Java from WSDL:  java.lang.RuntimeException:

    Hi,
    I did try to create web service client using eclipse. Imported wsdl to eclipse project and tried to create java client but I am getting following exception :
    IWAB0399E Error in generating Java from WSDL: java.lang.RuntimeException: Unknown element _value
    java.lang.RuntimeException: Unknown element _value
    at org.apache.axis.wsdl.toJava.JavaBeanWriter.getBinaryTypeEncoderName(JavaBeanWriter.java:490)
    at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeSimpleTypeGetter(JavaBeanWriter.java:928)
    at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeAccessMethods(JavaBeanWriter.java:1102)
    at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeFileBody(JavaBeanWriter.java:238)
    at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
    at org.apache.axis.wsdl.toJava.JavaBeanWriter.generate(JavaBeanWriter.java:1405)
    at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
    at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
    at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:547)
    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:432)
    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
    at java.lang.Thread.run(Unknown Source)
    This works just fine in SoapUI. Also can access this from other clients.
    You can access the wsdl fine from http://unit7165.oracleads.com:9008/opptyMgmtOpportunities/OpportunityService?wsdl
    Does anybody know why this does not work in Eclipse?
    Thanks.

    Hi Team,
    I am too getting same exception when trying to create client side code from wsdl.
    Below is what I am using :
    wsdl link :
    https://fap0607-crm.oracleads.com/mklLeads/SalesleadService?wsdl
    Tools I used : Apache Axis 1.4 jars and used command - wsdl2java
    I guess, it's a bug already reported here :
    https:/issues.apache.org/jira/browse/AXIS-1828
    Any pointer to this will help.
    Regards,
    Sumit

  • Advantages and Disadvantages of calling java from PL/SQL

    Hi,
    I have one doubt. What are all the advantages and disadvantages of the calling java from PL/SQL?
    In actual scenario the java program will be in the Application server side. It will do the operation and it will store the result in Data base. But in this case (calling java from PL/SQL), we are loading the java program in the Data base and it is doing the operations.
    I have seen many posts are coming regarding loading jar files into the database. Actually the jar will deploy in to Application server. Is there any difference instead of keeping in the Application server side?
    Then I have read,
    advantages:
    -> java having lot API's. so PL/SQL can use that API's.
    -> if we can not do anything in PL/SQL. we can do it using this mtd(calling java from PL/SQL).
    My questions:
    -> could you explain what are all the things we can not do but we can do using "calling java from PL/SQL" method?
    -> is there any other advantages?
    Disadvantages:
    -> the performance is very slow in calling java from PL/SQL.
    My questions:
    -> Then why others are loading java files and jar files into database?
    -> is there any other disadvantages?
    Could you explain about this one? It will be more helpful to others also…
    Regards,
    kk

    Hi,
    You can read the free first chapter of my book @ http://www.amazon.com/gp/product/1555583296/ (see details then Excerpt)
    Kuassi http://db360.blogspot.com

  • Generating Java wrappers for PL/SQL Packages in JDeveloper 3.1

    I have not been successful in using JD3.1 to generate java classes for use in calling PL/SQL packages from a Java Servlet I am developing. I have followed the directions under the 'Generating Java Code for Oracle Objects and PL/SQL Packages' help topic: I display the package in the database browser window, right click on the package, select 'Generate Java', and click 'OK' on the pop-up JPublisher window that appears. The wizard clocks out for a few moments, then the JPublisher window disappears, but the java class is not added to JDeveloper's Navigation pane for the Project and Package I specified in the wizard.
    Any idea where the generated class is going to?

    should be, but isn't... JDeveloper3.1
    (build 681) default install... Is it in
    a custom package I didn't install? Or
    am I just a dumb nut?Hmm.. I thought it was in there.. JPub is a java based tool. You can invoke it as such.
    1st, use setvars.bat from your jdeveloper/bin directory.
    2nd, run java oracle.jpub.java.Main (pass it the same arguments as you would the jpub.exe)
    Here's the output from my machine here:
    D:\JDeveloper31\bin>setvars D:\JDeveloper31
    Setting JDeveloper 1.2 runtime environment to "D:\JDeveloper31"
    Setting JDK version 1.2 in "D:\JDeveloper31\java1.2"
    D:\JDeveloper31\bin>java oracle.jpub.java.Main
    JPub: Java Object Type Publisher, version 8.1.6.0.0 Production
    (and the rest of the help)
    Take Care,
    Rob
    null

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

    Hi,
    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 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

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

    Eric,
    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

  • Passing / parsing XML String IN / OUT from PL / SQL package

    Hello, People !
    I am wondering where can I find exact info (with code sample) about following :
    We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
    and the return some kind of cursor thru I can loop and insert data into
    different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
    I looked online many site for related info - can't find what I am looking
    for - seems like should be a common question.
    Thanx a lot !

    Hello, People !
    I am wondering where can I find exact info (with code sample) about following :
    We use Oracle 8.1.6 and 8.1.7. I need to pass an XML String (could be from VARCHAR2 to CLOB) from VB 6.0 to PL/SQL package. Then I need to use built in PL/SQL XML parser to parse given string (could be large hierarchy of nodes)
    and the return some kind of cursor thru I can loop and insert data into
    different db Tables. (The return value may have complex parent/child data relationship - so I am not sure If this should be a cursor)
    I looked online many site for related info - can't find what I am looking
    for - seems like should be a common question.
    Thanx a lot !

  • Re-Generate java from wsdl

    Hello. I have a WSDL that I have generated some Java classes for. In the generated classes I code some helper methods. Then I do a change in the WSDL. Then I need to generate new Java classes(?). How about my helper methods then? I don't want to re-implement them in the newly generated classes.
    And BTW, if I try to run "Regenerate Web Service from WSDL" (right-click the web service in jDeveloper project), I get a message "The return type xxx.yyy.Zzz of method getZzz cannot be serialized into XML, and no custom serializer has been defined for it". What does this message mean, and how can I be able to "Regenerate Web Service from WSDL" (if the WSDL changes).
    I'll be happy for any articles about this topics.

    Hi,
    when you say that you generate Java classes for a WSDL file, I assume you generate a Web Service proxy - am I right? In this case I suggest to create wrapper classes for those that you want to add your custom code in. E.g the proxy class is re-generated, whereby all custom code gets lost. Instead of working with the proxy class directly, you create a Java Bean that accesses the proxy class. This then never changes.
    Frank

Maybe you are looking for

  • Disc image file & CSS encoding?

    I originally exported a project with CSS encoding from DVDSP to a DLT tape for replication. (DDP 2.0 with CSS) I then created a disc image file of this project and don't remember if I had checked CSS format. Is there a way to determine this by lookin

  • What do you enter for a Carriage Return in Find&Replace?

    I'm using TextEdit to find and replace all instances of a string in an exported .txt with Carriage Returns (CRs). Only, I can't figure what to press in the 'Replace with:' field to tell TextEdit that I want the CR to go in there. Obviously, if I just

  • Why have deleted iCal events suddenly reappeared in my calender?

    Assistance needed please for an iCal issue on Snow Leopard (iMac). A bunch of formerly deleted iCal events have suddenly reappeared in iCal. I thought this would be easily resolved by using Time Machine (external HD) to restore the calendar files to

  • Getting back up after disc crash

    The hard drive died on my ibook, so I had to have a new one installed and completely reload the software. I had my itunes library backed up on another computer on the network, so was able to import it. Now when I attach my ipod to the ibook, the ipod

  • IMAP support is ON in GMAIL even if you cannot see it in preferences!

    I was pleasantly surprised to find that IMAP support is fully enabled in my gmail account, even though I cannot see it in the settings page! Try it....your mileage may vary! QUESTION: Having now synchronised my entire Gmail account on one computer I