Basic questions about PL/SQL web services and datasource names

Hi there,
I successfully generated a web service for a PL/SQL packaged procedure in JDeveloper 11.1.1.3.0).
In the web service base class the following code was generated:
__dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/dbconnectionDS");However in the weblogic server the datasource name is jdbc/somethingelse so the deployment fails at first.
What is the recommended procedure to solve this issue? The obvious solution is to manually edit the source -- that is what I did and it worked fine. However if I re-generate the web service I will lose my change. Is there a better way to do this?
Another question -- in the generated web.xml file, there is a resource-ref for the datasource. I was hoping that changing the datasource name there would help but it didn't work. What is it used for in this context?
Thanks
Luis

Hi Vishal,
I did as you suggested but it didn't work... see below more details.
Thanks
Luis
1 - I re-generated the web service from the PL/SQL package. The constructor in CFBTestWSBase class looks likes this:
public CFBTestWSBase() throws SQLException
  {  try {
javax.naming.InitialContext __initCtx = new javax.naming.InitialContext();
__dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/custfeedbackDS");
} catch (Exception __jndie) {
throw new java.sql.SQLException("Error looking up <java:comp/env/jdbc/custfeedbackDS>: " + __jndie.getMessage());
}2 - I added the following section to weblogic.xml:
  <resource-description>
    <res-ref-name>comp/env/jdbc/custfeedbackDS</res-ref-name>
    <jndi-name>jdbc/DataSource</jndi-name>
  </resource-description>3 - I got the following error when during deployment to weblogic server:
[HTTP:101216]Servlet: "CFBTestWSPort" failed to preload on startup in Web application: "CustFeedbackTestWS.war".
java.sql.SQLException: Error looking up <java:comp/env/jdbc/custfeedbackDS>: While trying to look up comp/env/jdbc/custfeedbackDS in /app/webapp/CustFeedbackTestWS.war/346617503.
at cfbtestws.CFBTestWSBase.<init>(CFBTestWSBase.java:33)
at cfbtestws.CFBTestWSUser.<init>(CFBTestWSUser.java:11)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
...

Similar Messages

  • Question about document/literal web service

    Hello every body.
    I have some question about document/literal web service.
    I’ve been working with Axis before.
    Axis has four valid signatures for your message-style service methods:
    public Element [] method(Element [] bodies);
    public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
    public Document method(Document body);
    public void method(SOAPEnvelope req, SOAPEnvelope resp);
    The same I am trying to do with WebLogic API for webservices.
    But when I am trying to test web service (public Document method (Document body); )
    I have serialized exceptions for org.w3c.dom.Document.
    Do I have to write a custom class for org.w3c.dom.Document serialization?
    If yes can you give me some idea or example?
    The all idea behind this web service is. I have just one web service and mane classes for XML processing. Depends what xml document will be during runtime, web service will be using different class for xml processing. It works fine with Axis, but in case of WebLogic I have some problem.
    One more question… How I have to call this web service from java client?
    I have seen this example http://www.manojc.com/?sample31 ,
    but this web service looks like (Document helloDom()). I need to send Document.
    This example works for Dynamic Proxy, but does not work for static call.
    Any ideas?? Thank in advance.

    Hi,
    I am getting a similar issue. I created a Document-style/literal webservice and deployed on Weblogic 9.2 . Then I generated client stubs using clientgen. I get the following exception stack trace:
    java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SOAPException:
    failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on
    class=class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl TypeMapping=TYPEMAPPING SIZE=3
    ENTRY 1:
    class: java.lang.Object
    xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocumentResponse
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@1125127
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@18dfef8
    ENTRY 2:
    class: java.lang.Object
    xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocument
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@15e83f9
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@2a5330
    ENTRY 3:
    class: java.lang.Object
    xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
    ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@bb7465
    deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@d6c16c

  • Here's a very basic question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    Ihave a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2ndinternal drive.  My current external drive is too small so I'll begetting a 1.5 TB or 2 TB drive.
    Obviouslythe new larger 2 TB drive will backup everything on the Mac Prointernal drive with Time Machine.  But there will be 1 TB of space leftover going to waste.
    ShouldI partition the external drive so that the TM portion will be 1 TB andthe use the remaining extra partition for additional file backups withCarbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    The problem with terabyte drives is that that a 3 TB is about as big as you can get without going into RAID territory. Ideally, a Time Machine drive should be 3 times as large as all the drives you are backing up. So, if you have 2.75 TB of internal storage, you should have 8 TB of Time Machine space.
    Of course, that is "should". If your TB drives are mostly empty, then you can get away with something 3 times the size of your used disk space. Just remember that you are pushing it. Linc is right about Time Machine needing space to work.
    It is unlikely that you have regular churn on 2.75 TB of disk. I suggest identifying which drives and folders have the most activity and excluding those drives and directories that don't change much. It would be better to archive the data that doesn't change often and keep it out of Time Machine. Then you may be able to get away with a 2 TB Time Machine drive.

  • Pl/Sql web service and collections not working

    Hello
    I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
    WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
    but I don't think this is the source of the problem.
    When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    In the DOS window for the OC4J I get the following error :
    2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
    Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
    ng target: pxWsLang.WsLangUser.
    The PL/SQL code is as follows :
    Object:
    CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
    NR NUMBER(3),
    SYMBOL VARCHAR2(2)
    Collection:
    CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
    Package body :
    create or replace package body PAM_TEST is
    function CursorTest return Pam_LanguageTable is
    Res_LangTable PAM_LanguageTable;
    cursor cur is select * from stc_languages;
    begin
    Res_LangTable := new PAM_LanguageTable();
    for Rec in cur loop
    Res_LangTable.Extend(1);
    Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
    (Rec.NR,
    Rec.SYMBOL
    end loop;
    Return Res_LangTable;
    end;
    end;
    I'm using JDeveloper version 10.1.3.1.0.3984
    How can I get this to work ? (without using Apache Axis or other tools :-)
    Is it supposed to work ?
    Many Thanks
    Paul

    Hi,
    for the "error creating target" problem I found the solution here:
    [WS from a PL/SQL package]: Error creating target
    Hope this helps.
    Regards,
    Patrik

  • PL/SQL Web Service altered method names

    Using JDev 10.1.3 production, creating a web service from a PL/.SQL procedure results in 3 names for the service. Why is this? Will it change in a future release?
    PL/SQL parameter list:
    procedure calc_slots(pdrive in out varchar2,
    pName in varchar2,
    pfunc in number,
    pstart in date,
    pend in date,
    pwbslots in number,
    pbkst in date,
    pbkend in date,
    pOutval out varchar2,
    pautoequip in number := 0,
    pautoslots in number := 0) is
    Method 1:
    calcSlots
    parameters
    xsd:string pdrive_inout =
    xsd:string pname =
    xsd:decimal pfunc =
    xsd:dateTime pstart =
    xsd:dateTime pend =
    xsd:decimal pwbslots =
    xsd:dateTime pbkst =
    xsd:dateTime pbkend =
    Method2:
    calcSlotsvSSBTTBTTSB
    parameters
    xsd:string pdrive_inout =
    xsd:string pname =
    xsd:decimal pfunc =
    xsd:dateTime pstart =
    xsd:dateTime pend =
    xsd:decimal pwbslots =
    xsd:dateTime pbkst =
    xsd:dateTime pbkend =
    xsd:decimal pautoequip =
    Method3:
    calcSlotsvSSBTTBTTSBB
    [parameters
    xsd:string pdrive_inout =
    xsd:string pname =
    xsd:decimal pfunc =
    xsd:dateTime pstart =
    xsd:dateTime pend =
    xsd:decimal pwbslots =
    xsd:dateTime pbkst =
    xsd:dateTime pbkend =
    xsd:decimal pautoequip =
    xsd:decimal pautoslots =
    }

    Yes, we tried with databse adapter with out any problem. we want specifically with the PL/SQL Web service using the web service wizard.
    Thanks in advance.

  • Question about MBeans for web service metrics and configuration

    Hi,
    I'm new to JMX and trying to figure out how to create a MBean structure that captures a tree similar to the following for some web services I'm working on. All the operations will have the same set of metrics I'm collecting, so I'd like to reuse as much of the MBean structure as possible. In addition, the service will have various config parameters that need to be able to be modified during runtime via JMX. Below is an example of something similar to what I'd like to be able to do:
    user
    +-com.example.ws.CalculatorService
      +-Attributes
        +-ServiceName
        +-ServiceVersion
        +ServiceConfigParam1
        +ServiceConfigParam2
      +Operations
        +-SetServiceConfigParam1()
        +-SetServiceConfigParam2()
      +-AddOperationMethod
        +-Attributes
          +-RequestCounter
          +-ResponseCounter
        +-Operations
          +-ResetAllCounters()
          +-ResetRequestCounter()
          +-ResetResponseCounter()
      +-SubtractOperationMethod
        +Attributes
          +-RequestCounter
          +-ResponseCounter
        +-Operations
          +-ResetAllCounters()
          +-ResetRequestCounter()
          +-ResetResponseCounter()Where the counters are a variety of metrics to collect for each web service operation. Is there a standard/commonly accepted way to implement this? What type of MBean is best suited, standard, or do I need to use dynamic MBeans? Thank you for any pointers to useful references.
    /Paul Kuykendall

    I ended up finding the answer after more digging. The page [http://java.sun.com/developer/technicalArticles/J2SE/mxbeans|http://java.sun.com/developer/technicalArticles/J2SE/mxbeans] had a section about handling inter-MXBean references that turned out to be exactly what I was looking for.
    This reply is just to help anyone else that stumbles through with a similar problem to mine and point them in the right direction.
    /Paul

  • Question about Using PAPI Web Service in PowerBuilder 9

    Hi, all.
    I Have a simple question about using papiws in power builder 9.
    In pb9, I created a new Web Service Proxy Wizard and I input a url for papiws(ex. http://seraphpernote:7001/papiws/PapiWebService) and click next.
    But I couldn't get any Service List.
    In Eclipse, I used this url for using papiws well.
    Does anybody know about this case??
    help me plz.

    IIRC you must activate PAPI-WS for the engine. In Studio you do it by right-clicking on the project, then "engine preferences". In enterprise/standalone you must activate PAPI-WS in the Admin Center.

  • Some basic questions about rmi registry  context  "bind" and "lookup"

    We have more processing to do than can be accomplished with a single computer. To solve the problem I've implemented a distributed computing solution using RMI. (The first time I saw RMI was about 2 weeks ago, so please bear with me!)
    The implementation is a proof of concept not a fully fleshed out system. I have one "Workunit Distributor" computer and any number of "Data Processor" computers all on the same lan segment. "Workunit Distributor" and "Data Processor" computers are both RMI client and server to each other. The "Data Processor" computers are given the ip address and name of the "Data Distributor" on the commandline when they start. They communicate their willingness to receive and process a workunit to the ""Workunit Distributor" via a RMI call. Work units are sent to available "DataProcessors" and results are eventually returned to the "WorkunitDistributor" (minutes or hours later). The model program works quite well, and appears to be capable of doing the processing we need to get done.
    But now that it seems viable, I've been asked to make it a little more scalable, flexible and self configuring. In particular, instead of one "Workunit Distributor", any number of "Workunit Distributors" should be allowed to show up or disappear from the lan at any time and the system should continue to function. I've worked out a good scheme for how this can be done, but I have a couple of questions about the RMI registry (registries?). I'm trying to keep from implementing some functionality that may already be available as a library or subsystem.
    With my current model design, each computer binds to its own registry with a unique name. For instance:
    CRDataProcessorImpl crdpi = new CRDataProcessorImpl(svr);
    Context crDataProcessingContext = new InitialContext();
    crDataProcessingContext.bind("rmi:"+hostName, crdpi);
    Currently the "Data Processors" get the info they need for a Context lookup() of the one and only "Workunit Distributor" from the commandline. And the info the "Workunit Distributor" needs to do a Context lookup() of a "DataProcessor" is passed to it from each "DataProcessor" via a RMI call.
    But in the newer (yet to be implemented) scheme where any and all "Workunit Distributors" show up and disappear whenever they feel like, the naming bootstrapping scheme described above won't work.
    I can imagine a few ways of solving this problem. For instance, having "Workunit Distributors" multicast their contact information on the lan and have a worker thread on each "Data Processor" keep track of the naming information that was multicast. Another alternative (more organized, but more complex) might be to have a dedicated host with a "well known" address and port that "Workunit Distributors" and "Data Processors" could all go to, to register or look up at an application level. Sort of a "domain name service" for RMI. But both these schemes look like a lot of work to implement , debug and maintain.
    The BEST thing would be if there was one plain vanilla RMI registry that was usable by all RMI enabled computers instead of having each computer have its own local name registry. In volume 2 of the Core Java2 book it says that every registry must be local. I'm only hoping there's been progress since the book was published and now a central rmi registry is available.
    If you have any ideas about this I'd like to hear what you know.
    Thanks in advance for any advice.
    Lenny Wintfeld
    ps - I don't believe web services, as full featured as it is, is a useful alternative. I'm moving 100's (in the future possibly 1000's) of megabytes back an forth for processing.

    The local bind/rebind/unbind restriction is still there and it will always be there.
    I would look at
    (a) RMI/IIOP, where you use COSNaming as a registry, which doesn't have that registriction, and which also has location-independent object identifiers
    (b) Jini.

  • Question about "top-down" web services development

    I tried to follow the Oracle "RPC literal top-down web services how-to" to develop a web service with a top-down approach but I have error when I try to compile with Ant the provided example.
    This howto is located at: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/rpc-lit/index.html
    The error I have is:
    D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit&gt;ant
    Buildfile: build.xml
    env-check:
    check-oracle-home:
    check-j2ee-home:
    init:
    sub-init:
    gen-service:
    [echo] Generating service artifacts
    env-check:
    check-oracle-home:
    check-j2ee-home:
    init:
    wsa:
    [java] java.util.zip.ZipException: The system cannot find the file specified
    [java] at java.util.zip.ZipFile.open(Native Method)
    [java] at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:112)
    [java] at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:127)
    [java] at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:65)
    [java] Exception in thread "main"
    BUILD FAILED
    D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\build.xml:21: The following error occurred while executing this line:
    D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\config\common.xml:63: Java returned: 1
    Total time: 1 second
    When I look at the common.xml file which is used by the build.xml one I have a class like:
    &lt;pathelement location="${ws.lib.dir}/orasaaj.jar"/&gt;
    The problem is that I do not have this jar file on my disk and I can't find it on the net. Maybe it is one of the root cause of my build failed.
    Does anyone experience this howto successfully and if someone can tell me where to find this jar file it would be great.
    Thanks

    I tried to follow the Oracle "RPC literal top-down web services how-to" to develop a web service with a top-down approach but I have error when I try to compile with Ant the provided example.
    This howto is located at: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/rpc-lit/index.html
    The error I have is:
    D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit&gt;ant
    Buildfile: build.xml
    env-check:
    check-oracle-home:
    check-j2ee-home:
    init:
    sub-init:
    gen-service:
    [echo] Generating service artifacts
    env-check:
    check-oracle-home:
    check-j2ee-home:
    init:
    wsa:
    [java] java.util.zip.ZipException: The system cannot find the file specified
    [java] at java.util.zip.ZipFile.open(Native Method)
    [java] at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:112)
    [java] at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:127)
    [java] at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:65)
    [java] Exception in thread "main"
    BUILD FAILED
    D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\build.xml:21: The following error occurred while executing this line:
    D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\config\common.xml:63: Java returned: 1
    Total time: 1 second
    When I look at the common.xml file which is used by the build.xml one I have a class like:
    &lt;pathelement location="${ws.lib.dir}/orasaaj.jar"/&gt;
    The problem is that I do not have this jar file on my disk and I can't find it on the net. Maybe it is one of the root cause of my build failed.
    Does anyone experience this howto successfully and if someone can tell me where to find this jar file it would be great.
    Thanks

  • Question about configuring REST web service in EBS instance

    I am from EBS SCM team. From one wiki page, it says OA Framework provides REST framework to expose OAF BC4J objects as web services. Can you provide more details about how to configure REST web service for one EBS instance? Any related information is also helpful.
    Edited by: 936859 on Sep 7, 2012 5:45 PM

    IIRC you must activate PAPI-WS for the engine. In Studio you do it by right-clicking on the project, then "engine preferences". In enterprise/standalone you must activate PAPI-WS in the Admin Center.

  • PL/SQL Web Service Optional Parameters

    I have created a PL/SQL web service and deployed successfully using Jdeveloper 10.1.3.5. The database is 9.2.0.8.
    When the web service request is made, all is well if all parameters are passed.
    I have been told that the request might come with some but not necessarily all of the parameters expected by the PL/SQL procedure.
    Is it possible when deploying through JDeveloper to indicate that all parameters might not be present?
    This is my first web service. Thanks in advance for your assistance.

    Parameters relate to procedures. Web Services require XML messages.
    Where are the parameters coming from? You cannot pass a dynamic number of parameters into a procedure, but you can pass a structured type as a parameter which can contain multiple values, whether that is an array/collection type or an XML document itself.
    Just package up the values into the XML and pass it to the web service.
    If this doesn't answer your question, please post more information, with some example data and code. Read the FAQ: {message:id=9360002}

  • PL SQL Web Service Authentication through LDAP

    I have created one PL SQL Web Service and I would like to provide token security through LDAP.
    I have configured LDAP for deployed webservice in oracle IAS 10.1.3 Service.
    Problem Description: <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://dbconnection1/MobileWebService.wsdl/types/"><env:Body><env:Fault><faultcode>env:MustUnderstand</faultcode><faultstring>SOAP must understand error: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security</faultstring></env:Fault></env:Body></env:Envelope>
    I have provided LDAP authentication through oracle iAS Setup.
    Please help

    Hi I am looking out for a good friend of mine, Rajeev Dave from Vijaywada, if your the one, please email me [email protected]
    thanks,

  • Question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    I have a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2nd internal drive.  My current external drive is too small so I'll be getting a 1.5 TB or 2 TB drive.
    Obviously the new larger 2 TB drive will backup everything on the Mac Pro internal drive with Time Machine.  But there will be 1 TB of space left over going to waste.
    Should I partition the external drive so that the TM portion will be 1 TB and the use the remaining extra partition for additional file backups with Carbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    John,
    I'm not sure why you posted in the iMac forum so I'm going to attempt to get you to the correct spot. I would recommend reposting in the Time Machine Forum, this is part of the OS X forums (Leopard or Snow Leopard) because you are using Snow Leopard (your profile indicates you are) please click Apple Support Communities and type Snow Leopard. Then you can narrow the search down by clicking Refine this List.
    Roger

  • PL/SQL web service: question about stub

    hello,
    I'm currently learning how to work with PL/SQL Web Services.
    I have a question about stubs. The point is, I can deploy a web service to the OC4J server and it works. It also works when I create a stub following the WSDL I made with creating the PL/SQL web service. If I go to the endpoint in my webbrowser, the functionality is the same, with or without using a stub.
    My question is: what is the function of the stub?

    A stub is leveraged by a client application to communicate with a corresponding server side object (in this case, the web service implementation). If you think back to CORBA or RMI applications they follow a similar pattern.
    In the case of a web service you would use the stub to write a client application that could invoke the methods of the remote service and return the responses as java data types. The methods the stub class offers are the same as the methods of the web service interface. It's a common way for providing RPC like functionality.

  • Quick questions on the topic of Web Services and EJB POJOs

    I have been reading about Web Services and the data types that are aloud as operation parameters and return types. I was wondering what the standard practice for return types; is it to use the Entity classes straight and customize the WSDL instead of letting the EE container do it (avoid cyclic problems in the schema that can occur when using entity 1-to-many and many-to-1 mappings) or; is it to off load the data into a DTO/VO/Bean and let the EE container take care of all the schema mapping for the WSDL? I look at the EE tutorial and bought a EE book both use very basic examples that do not include connecting to a database or using EJB3 for the data store.
    Thanks for any information

    bump

Maybe you are looking for