Stateless Bean - Web Service Context

Is there anyway to specify the root context of a stateless bean that is also annotated as a webservice
Example
@Stateless
@Local(**)
@LocalHome(**)
@WebService(**)
@WLHttpTransports(contextPath="rootPath", serviceUri="uri")
Normally i would expect this to be accessible through http://host:port/rootPath/uri?WSDL
This format does work without the session bean if ran through Weblogics Generators, but is it possible to do the same thing with a bean? Or if it's not possible using WLHttpTransports what would the other method be?
Thank you

user8008029,
The WLS JAX-WS stack does not support all of the proprietary annotations from the JAX-RPC stack. This annotation (@WLHttpTransports) is one example. However, you can still override the context and service mapping using descriptors.
The descriptor is [weblogic-webservices.xml|http://e-docs.bea.com/wls/docs103/webserv_ref/dd.html] ...
Here is a sample:
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-webservices xmlns="http://xmlns.oracle.com/weblogic/weblogic-webservices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-webservices http://xmlns.oracle.com/weblogic/weblogic-webservices/1.0/weblogic-webservices.xsd">
<webservice-description>
<webservice-description-name>YourEJBService</webservice-description-name>
<webservice-type>JAXWS</webservice-type>
<port-component>
<port-component-name>YourPort</port-component-name>
<service-endpoint-address>
<webservice-contextpath>rootPath</webservice-contextpath>
<webservice-serviceuri>/uri</webservice-serviceuri>
</service-endpoint-address>
</port-component>
</webservice-description>
</weblogic-webservices>
Note: you may use the <WLHTTPTransport/> element with the [ jwsc ant task|http://e-docs.bea.com/wls/docs103/webserv_ref/anttasks.html#wp1069899] . This will build your service and automatically create the appropriate descriptors.
Ryan

Similar Messages

  • Registering EJB/Stateless Session Bean Web Service in Registry

    Hi verybody!
    I would like to know how I can register a Web Service in a registry. The web service is implemented as a session bean.
    The problem is not the actual code to register the service, but how and where can I hook this code into the application so that it is started when the application server is started.
    I've read the Sun J2EE tutorial which registered the service in the moment when the context for the servlet for an ordinary web client was created. This is not what I want. I would like to register the service when starting the EJB container, without the need to give it a kick from some external interface.
    Any help or ideas will be greatly welcome
    Regards
    PI

    1. But I thought you were using a 'stateful session bean'?
    2. For stateless session beans, there is no direct link between a remote reference and an instance of the bean. It is safe to hang on to the remote reference as long as you would like, of course it may go stale if the server dies. You will also find that the create() method does not actually contact the server, so doing it each usage costs very little. So, either way you should be fine.
    3. As for memory leaks, make sure that you are closing all statements, result sets, etc. promptly. These are commonly the problem. Also, use hprof or some other profile tool to determine what types of data you are allocating and (with better tools) what types of data you may be holding on to references to.
    Chuck

  • BAPI Web Service Context Mapping Problem

    Hello all,
                 I am developing a process consisting of an automated activity.
    This automated activity uses a logical destination for a web service call to an ECC BAPI.
    The BAPI name is 'BAPI_INQUIRY_CREATEFROMDATA2'
    Now the problem is the Output mapping in the automated activity which calls the web service for the above BAPI has the response name as 'BAPI_INQUIRY_CREATEFROMDATA2.Response'
    So when i try to map the nodes it gives me an error, 'Error at Line 2, Column 29, Found '.' after BAPI_INQUIRY_CREATEFROMDATA2'.
    Since there is no mapping i do not get the process working
    If i remove the '.' from the wsdl file source, mapping is done. But the backend service call gives an error.
    How can i solve this problem?
    Any inputs will be very helpful.

    Hello Martin,
                     thnks a ton for your replies.
    The '.' is a standard thing.
    Its the part of the WSDL file which is a standard WSDL file for a service offered for a standard SAP BAPI. So i haven't changed anything.
    Its what is standardly available. So i cant anything on that.
    And the response element is not below the bapi node.
    The name of the root node of the BAPI return context is
    "BAPI_INQUIRY_CREATEFROMDATA2.Response"
    This is what is causing the problem.
    Please note here that '.' is not responsible for any hierarchy. Its the name of one single root node element.

  • Web services Context

    Hi,
    I need to use a shared context to hold the application session across various web service invocations. I found WS-CTX (http://docs.oasis-open.org/ws-caf/ws-context/v1.0/wsctx.html) supports that. But I am not sure of how to implement it.
    Can anyone help with me the details? (with sample code plz :))
    Does Axis supports WS-CTX?
    Thanks
    Ajay

    no.
    we don't expose ServletContext for now
    regards
    Debu

  • Net beans Web Service call from Sun Creator

    I am new to all of sun studio tools.
    Currently I am using Sun Java Studio Creator early access 2 and Net Beans 4.1 for my development project.
    I could not find tutorial to create web service using Sun Java Studio Creator therefore I am creating using Net Beans 4.1. I am having difficulty calling web service created in Net Beans 4.1 from Sun Java studio Creator. Could someone please help me out. I looked at all tutorial sun have available about Sun Java Studio Creator Early Access 2 and Net Beans 4.1.
    When Net Beans 4.1 is running, the web service can be called from Creator tool but once it's close, web service does not respond. Looks like I need to turn-on the Net Beans 4.1 server but don't know where to go.
    Bassically, I would like to call web service created in Net Beans 4.1 from Sun Java Studio Creator Early access 2.
    If somebody know how to create web service in Sun Java studio creator, please pass me the link would be great help.
    Thanks
    s

    Thanks for your reply.
    I looked at the tutorial link couple days ago but didn't help me.
    Coding is fine, no error. I checked the web service by refrencing URL and local WSDL file, it's responding fine when both Net Beans 4.1 and Sun Java Studio Creator EA 2 are up and running. Looks like to call web service locally, I need to have net beans 4.1 app server running concurrently with sun creator app server.
    I downloaded and installed Net Beans 4.1 bundled with SJS App Server.
    How do I turn on the Net beans 4.1 app server.
    There are some default WSDL file for sample projects in sun java studio creator ea 2.
    Is there a way to deploy the web service created in net beans 4.1 to sun java studio creator's specific directory and consume those WSDL file just like the sample project.
    Is there a way I can use one SJS App Server for both Net Beans 4.1 and Sun Java Studio Creator EA2. If then could you please pass me the tutorial to do so.
    Thanks
    S

  • Create, get and update web service context mapping

    Hello,
    I think I have a pretty common problem. I will explain it with a simple example:
    I have a car object, with the attributes id, name and speed.
    I have three web services: create, get and update
    I have a view with the input fields id, name and speed
    How to do the context mapping?
    When creating a car it would be good if input fields would be mapped to the create service, when getting a car it would be nice if the input fields would be mapped to the get service....
    How to deal with this situation? Do I have to create 3 views?
    Thanks!
    Felix

    Hello Martin,
                     thnks a ton for your replies.
    The '.' is a standard thing.
    Its the part of the WSDL file which is a standard WSDL file for a service offered for a standard SAP BAPI. So i haven't changed anything.
    Its what is standardly available. So i cant anything on that.
    And the response element is not below the bapi node.
    The name of the root node of the BAPI return context is
    "BAPI_INQUIRY_CREATEFROMDATA2.Response"
    This is what is causing the problem.
    Please note here that '.' is not responsible for any hierarchy. Its the name of one single root node element.

  • Authenticating EJB 3 Session Bean Web services

    I have some session beans that I want to expose directly as web services in Glassfish.
    My question is how do I protect them to only be used by authorized people?
    Do I simply use standard role based JEE authentication like normal session beans?
    Is there a client example that talks to an authenticated session bean?
    If this isn't the way it is done, can someone provide an example on how it should be done?
    Thanx!

    The portable way to retrieve an EJB reference in Java EE is to either inject it or look it up via the
    component's private naming environment. The simplest way is :
    @EJB
    private DocumentManager dm;
    The global JNDI name is only used as an implementation specific way to uniquely assign an
    identifier to a specific Remote EJB. It's best for this not to appear directly in the source code.
    There's more on global JNDI names in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    The alternative to annotations is to use an ejb-ref to declare the ejb dependency. The ejb-ref
    is declared in the standard deployment descriptor corresponding to the component doing the
    lookup. Each ejb-ref has an ejb-ref-name, e.g. <ejb-ref-name>DM_ref</ejb-ref-name>
    The code looks up the ejb-ref-name relative to the java:comp/env namespace to retrieve the
    EJB reference.
    DocumentManager dm = (DocumentManager)
    new InitialContext().lookup("java:comp/env/DM_ref");

  • Publishing a stateless java web service

    Hi All,
    Two questions:
    1 - Does Oracle still support publishing java web services (stateless and stateful) just by declaring it in the web.xml file? I see that there are instructions on how to do this in an old whitepaper but any recent programmer documentation does not have it.
    2 - I tried declaring a java class as a web service in the web.xml and it seems to do something (ie., when I go to the URI, there is actually the wsdl, and the various methods that can be invoked). However, when invoking one of the methods (which should just return "Hello World" without any processing at all), I get the following exception. Any ideas?
    javax.servlet.ServletException
         at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:632)
         at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1117)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:292)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:606)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:312)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    Thanks,
    Johnny

    hello Jonathan
    In Jdev903 doc it is given that (pl/sql web service)
    Limitations
    On Oracle9i Database release 2, when a stored procedure or function of the same name and the same package name is accessible in more than one schema, then the SQLJ translator invoked during publication of PL/SQL web services will fail. In order to resolve this problem, ensure that packages to be published are visible only in one schema, and that no other packages in other schemas share the same name.
    The problem u explained come into the same category.Which database version u r using ? .
    regards
    Mangesh

  • EJB 3.0 stateless bean + web client (beginner)

    Hello,
    I've just read the Sun tutorial on EJBs in Java EE 5 and I'm trying to get something nice and simple to work. My code is below:
    Bank.java:
    package beans;
    import javax.ejb.Remote;
    @Remote
    public interface Bank {
         public void transfer(long source, long destination, long amount);
    }BankBean.java:
    package beans;
    import javax.ejb.EJBException;
    import javax.ejb.Stateless;
    @Stateless
    public class BankBean implements Bank {
         public void transfer(long source, long destination, long amount)
              System.out.println("This method is not yet implemented.");
              throw new EJBException("Method not implemented.");
    }index.jsp (web project):
    <%!
    private Bank bank = null;
    public void jspInit()
        try {
            InitialContext ic = new InitialContext();
            bank = (Bank) ic.lookup(Bank.class.getName());
        } catch (Exception ex) {
            System.out.println("Couldn't create bean." + ex.getMessage());
    %>Everything compiles with no errors or warnings, but an exception is thrown. The message is "beans.Bank not found".
    I have not modified any .xml files, I don't recall the tutorial saying I have to.
    I'm using Eclipse 3.2 WTP and it doesn't recognize that I have any Session beans... not 100% sure that EJB 3.0 is supported by it. I ended up creating a basic Java project to store the beans because an EJB project was saying that I need at least one bean.
    Thank you in advance for suggestions.
    Pavel

    While looking up why don't you use the fully
    qualified jndi name"java:/comp/ejb...."?
    What's the benefit of that?It's portable. Any direct access of a global JNDI namespace is not portable.
    Also, it's "java:comp/env", not "java:/comp/env".
    >
    Is it possible to use annotations in JSPs?No, annotations are not supported in JSPs for Java EE 5. In the web tier
    they can be used in certain managed classes such as servlets.
    Regarding your original posting, how exactly did you deploy the ejb? If you
    got a message saying the ejb-jar had no ejbs, that sounds like the root of
    the problem. If the ejb-jar only contains a single EJB 3.0 bean and that
    bean uses EJB 3.0 annotations instead of a deployment descriptor, make
    sure there is no ejb-jar.xml. It's possible that Eclipse packaged an
    EJB 2.1 - based ejb-jar.xml descriptor inside the ejb-jar. In that case,
    the app server will assume it is an EJB 2.1 app and not process any
    annotations.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Stateless EJB expose as web service

    I use JDeveloper 10.1.3.0.4 created the folllowing EJB:
    BMP: ProductEntityEJB
    Stateless session bean: ProductSessionEJB
    After i generated session bean web service via web service wizard and
    deploy the web service by the generated deployment file,
    the error occurred:
    ---- Deployment started. ---- 2006&#24180;3&#26376;29&#26085; &#19979;&#21320;02:41:16
    Target platform is Standalone OC4J 10g 10.1.3 (oc4j).
    Wrote EJB JAR file to C:\JCo\JDeveloper Workspace\JDevFYP\JDevFYPWS\EjbWebServices.jar
    Wrote EAR file to C:\JCo\JDeveloper Workspace\JDevFYP\JDevFYPWS\JDevFYP-JDevFYPWS-EJB-WS.ear
    Uploading file JDevFYP-JDevFYPWS-EJB-WS.ear ...
    Application Deployer for JDevFYP-JDevFYPWS-EJB-WS STARTS.
    Copy the archive to C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear
    Initialize C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear begins...
    Unpacking JDevFYP-JDevFYPWS-EJB-WS.ear
    Done unpacking JDevFYP-JDevFYPWS-EJB-WS.ear
    Initialize C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear ends...
    Starting application : JDevFYP-JDevFYPWS-EJB-WS
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Processing EJB module: EjbWebServices.jar
    application : JDevFYP-JDevFYPWS-EJB-WS is in failed state
    Operation failed with error:
         Missing class: fypws.bean.product.ProductSessionEJBBean
         Dependent class: com.evermind.server.ejb.deployment.BeanDescriptor
         Loader: oc4j:10.1.3
         Code-Source: /C:/SAP/JSF/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\SAP\JSF\jdevstudio1013\j2ee\home\oc4j.jar
    This load was initiated at JDevFYP-JDevFYPWS-EJB-WS.root:0.0.0 using the Class.forName() method.
    The missing class is available from the following locations:
         1. Code-Source: /C:/SAP/JSF/jdevstudio1013/j2ee/home/applications/ejb1/ejb1.jar (from <ejb> in C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\ejb1)
         This code-source is available in loader ejb1.root:0.0.0.
    Deployment failed
    Elapsed time for deployment: 2 seconds
    #### Deployment incomplete. #### 2006&#24180;3&#26376;29&#26085; &#19979;&#21320;02:41:18
    How can i solve it??

    Can you try and see if installing JDeveloper into a directory with no spaces in it (i.e not in \JDeveloper Workspace\) solves the problem?

  • Test web service proxy using EJB session bean client...

    Hello!
    I am following this blog /people/abdelmorhit.elrhazi/blog/2009/10/30/how-to-consume-an-inbound-backend-web-service-in-nwdsjboss-environment to create a EJB session bean client to access the web service proxy...
    The blog is not very clear. Where should I be deploying the web service proxy and the EJB session bean (web service client) ? on the PI 7.1 ?
    How to find out the URL for the wsdl ?
    Thanks

    > The blog is not very clear. Where should I be deploying the web service proxy and the EJB session bean (web service client) ? on the PI 7.1 ?
    "To deploy your web service proxy and session bean, right click on your JBoss server in the Servers view, and click on Add Remove Projects, add you ear file and click finish."
    You need a JBoss server.

  • Error while deploying a web service whose return type is java.util.Date

    Hi
    I have written a simple web service which takes in a date input (java.util.Date) and returns the same date back to the client.
    public interface Ping extends Remote
    * A simple method that pings the server to test the webservice.
    * It sends a datetime to the server which returns the datetime.
    * @param pingDateRequest A datetime sent to the server
    * @returns The original datetime
    public Date ping(Date pingDateRequest) throws RemoteException;
    The generation of the Web service related files goes smoothly in JDeveloper 10g. The problem arises when I try to deploy this web service on the Oracle 10g (10.0.3) OC4J standalone. it gives me the following error on the OC4J console :
    E:\Oracle\oc4j1003\j2ee\home\application-deployments\Sachin-TradingEngineWS-WS\
    WebServices\com\sachin\tradeengine\ws\Ping_Tie.java:57: ping(java.util.Date) in com.sachin.tradeengine.ws.Ping cannot be applied to (java.util.Calendar) _result  = ((com.sachin.tradeengine.ws.Ping) getTarget()).ping
    (myPing_Type.getDate_1());
    ^
    1 error
    04/03/23 17:17:35 Notification ==&gt; Application Deployer for Sachin-TradingEngineWS-WS FAILED: java.lang.InstantiationException: Error compiling :E:\Oracle\oc4j1003\j2ee\home\applications\Sachin-TradingEngineWS-WS\WebServices: Syntax error in source [ 2004-03-23T17:17:35.937GMT+05:30 ]
    I read somewhere that the conversion between java to xml datatype and vice versa fails for java.util.Date, so it is better to use java.util.Calendar. When I change the code to return a java.util.Calendar then the JDeveloper prompts me the following failure:
    Method Ping: the following parameter types do not have an XML Schema mapping and/or serializer specified : java.util.Calendar.
    This forces me to return a String data.
    I would appreciate if someone can help me out.
    Thanks
    Sachin Mathias
    Datamatics Ltd.

    Hi
    I got the web service working with some work around. But I am not sure it this approach would be right and good.
    I started altogether afresh. I did the following step :
    1. Created an Interface (Ping.java) for use in web Service as follows :
    public interface Ping extends Remote{
    public java.util.Date ping(java.util.Date pingDateRequest)
    throws RemoteException;
    2. Implemented the above interface in PingImpl.java as follows :
    public class PingImpl implements Ping
    public java.util.Date ping(java.util.Date pingDateRequest) throws RemoteException {
    System.out.println("PingImpl: ping() return datetime = " + pingDateRequest.toString());
    return pingDateRequest;
    3. Compiled the above 2 java files.
    4. Generated a Stateless Java Web Service with the help of JDeveloper. This time the generation was sucessful.(If I had "java.util.Calendar" in place of "java.util.Date" in the java code of the above mentioned files the web service generation would prompt me for error)
    5. After the generation of Web Service, I made modification to the Ping interface and its implementing class. In both the files I replaced "java.util.Date" with "java.util.Calendar". The modified java will look as follows :
    Ping.Java
    =========
    public interface Ping extends Remote{
    public java.util.Calendar ping(java.util.Calendar pingDateRequest)
    throws RemoteException;
    PingImpl.Java
    ================
    public class PingImpl implements Ping
    public java.util.Calendar ping(java.util.Calendar pingDateRequest) throws RemoteException {
    System.out.println("PingImpl: ping() return datetime = " + pingDateRequest.toString());
    return pingDateRequest;
    6. Now I recompile both the java files.
    7. Withour regenerating the Web Service I deploy the Web Service on OC4j 10.0.3 from JDeveloper. This time the deployment was sucessful.(The Deployment fails if I don't follow the step 5.)
    8. Now I generated a Stub from JDeveloper and accessed the stub from a client. It works fine. Here if you see the Stub code it takes java.util.Date as a parameter and returns a java.util.Date. (Mind you I am accepting a java.util.Calendar and returning the same in my Web Service interface. Step 5)
    The confusing thing is the Serialization and Deserialization of Data from Client java data to Soap message and Soap message to Server java data.
    From Client to SOAP :
    java.util.Date to datetime
    From SOAP to Server :
    datetime to java.util.Calendar
    From Server to SOAP :
    java.util.Calendar to datetime
    From SOAP to Client :
    datetime to java.util.Date (I am not able to understand this part of the conversion)
    Any help or inputs would be appreciated.
    Thanks
    Sachin Mathias

  • How to expose a SOAP web service from HCP

    Hello All,
    Currently I am trying to create a SOAP web service within a HCP Java application to allow backend systems to consume data stored in HCP.
    This is the planned scenario:
    1. Create data in HCP - therefor I am using JPA and a oData Model.
    2. Backend uses web service to consume data from HCP - with this point I do have some problems.. I do want to create a SOAP web service in order to achieve this.
    Is there an easy way to create a SOAP web service in HCP? There are many tutorials in the internet of how to create a SOAP web service in 20 sec´s, but non of these helped me. I do was able to consume a SOAP web service in HCP coming from the ByD, but the other way around seems pretty complicated...
    Can I make use of the Eclipse functions to create a web service? (New --> Other... --> Web Services --> Web Service and than choose the Button up Java bean Web Service type)
    Have any of you some coding snippets that would probably help me out?
    I have unsuccessfully tried to use the @WebService, @SOAPBinding, @WebMethod notation in my java classes...
    Thank you,
    Swen

    Hello Nedelcho,
    Yes. All the required jar files are in the lib directory.
    Currently I am able to create a web service locally.
    But when I deploy that to the cloud server my JPA service is not working any more.
    Receiving the following error message:
    <?xml version='1.0' encoding='UTF-8'?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message xml:lang="en">javax.naming.NamingException: Error while attempting to resolve reference [Root exception is javax.naming.NamingException: Cannot create resource  object instance due to exception in the object factory [Root exception is javax.naming.NamingException: Data source 'jdbc/DefaultDB' not available.]]</message></error>
    The web.xml contains the following:
    Any advice?
    Best regards,
    Swen

  • PL/sql web service error !!!!!!! Help

    I was trying out the PL/SQL webservice example on OTN [http://otn.oracle.com/pub/articles/price_10gws.html]
    My environment is Oracle10G database, which comes with standalone version of oc4j, and I followed all the steps per the article but I still get the following error on invoking the Pl/SQL webservice: [What is the needed to make it work]...Please let me know...Thanks
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/aurora/ncomp/java/ClassNotFound
         at oracle.j2ee.ws.StatelessStoredProcRpcWebService.getGenerator(StatelessStoredProcRpcWebService.java:17)
         at oracle.j2ee.ws.RpcWebService.generateWrapperClass(RpcWebService.java:443)
         at oracle.j2ee.ws.RpcWebService.generate(RpcWebService.java:396)
         at oracle.j2ee.ws.RpcWebService.getWrapper(RpcWebService.java:514)
         at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:613)
         at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1117)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:733)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:484)
    My web.xml is:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
    <servlet>
    <servlet-name>stateless Database web service - /plsqlsample/dbfunc</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessStoredProcRpcWebService</servlet-class>
    <init-param>
    <param-name>class-name</param-name>
    <param-value>db.func.place.order.dbfuncUser</param-value>
    </init-param>
    <init-param>
    <param-name>interface-name</param-name>
    <param-value>db.func.place.order.dbfunc</param-value>
    </init-param>
    <init-param>
    <param-name>datasource-JNDI-name</param-name>
    <param-value>jdbc/OracleDSS</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>stateless Database web service - /plsqlsample/dbfunc</servlet-name>
    <url-pattern>/dbfunc</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <res-ref-name>jdbc/OracleDSS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    And under Directory C:\oracle\product\10.1.0\db01\oc4j\j2ee\home\applications\dbfunc\dbfunc_web\WEB-INF\classes\db\func\place\order
    I have
    08/01/2004 01:03 AM 264 dbfunc.class
    08/01/2004 01:06 AM 2,000 dbfunc.wsdl
    08/01/2004 01:03 AM 3,240 dbfuncBase.class
    08/01/2004 01:03 AM 694 dbfuncUser.class
    4 File(s) 6,198 bytes

    Hello!
    I have a question. You seem to be getting somewhere. In the reference (in your post) there is no mention of web.xml Is it a generated file or a file created by you? I am getting IOException error when generating EAR file. What could be wrong? Please help
    TAI
    habeeb

  • Using the UWL API inside a Web Service

    I wrote a Web Service to get the number of new tasks and the total number of tasks for a user like it is displayed in the UWL in the DefaultView.
    The numbers are retrieved by the following code:
    user = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
    // JNDI lookup for getting the service because we are not in the PRT container
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sapportals.portal.prt.registry.PortalRegistryFactory");
    InitialContext initialContext = new InitialContext(env);
    uwlService = (IUWLService) initialContext.lookup("/broker/services/" + IUWLService.ALIAS_KEY);
    if (uwlService == null) {
         throw new Exception("Cannot get UWL Service");
    context = new UWLContext();
    if (user == null) {
         throw new Exception("No user");
    context.setUser(user);
    context.setLocale(user.getLocale());
    session = uwlService.beginSession(context, 200);
    context.setSession(session);
    context.setAllowBackEndConnections(true);
    itemManager = uwlService.getItemManager(context);
    UWLView view = uwlService.getViewManager(context).getView("DefaultView", context);
    if (view != null) {
         QueryProperties properties = new QueryProperties();
         properties.setMaxNumberOfItemsToFetch(0);
         QueryResult result = itemManager.getItemsForView(context, view, properties, null);
         totals = itemManager.getTotalAndEmphasizedItemCountForView(context, view, "", null);
    In the first step I chose basic authentication. When debugging I see that the web service gets the information about the logged on user. The UWLService, item manager, session and view, all of them are determined resp. created.
    But when calling getItems the UWL exception "Logged in users context or session doesn't exist" is thrown.
    When calling the same functionality from Web Dynpro everything works fine.
    Service and session are determined like this
    uwlService = (IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
    context = new UWLContext();
    IUser user = WDClientUser.getLoggedInClientUser().getSAPUser();
    wdContext.currentUIStateElement().setUserName(user.getFirstName() + " " + user.getLastName());
    context.setUser(user);
    context.setLocale(WDResourceHandler.getCurrentSessionLocale());
    session = uwlService.getUwlSessionForWebDynproClient(context);
    Does anyone know how to work with the UWL API in a web service context?
    Thanks in advance
    Antje

    Hi Experts,
    We are also facing the same issue as of Yomesh.
    The strange part here is that, yesterday, the code was fetching the User and we were able to run the whole web service.
    Suddenly, this doesnt seems to be working today. And after debugging, we found that, the User is not being returned with the below code:
    user = UMFactory.getAuthenticator().getLoggedInUser(wsContext.getHttpServletRequest(), null);
    Any help is highly appreciated.
    Thanks in Advance!!
    BR,
    Uday

Maybe you are looking for

  • How can I get my contacts from iPhone ios5 to my mac osx10.6

    I recently upgraded my late model 2006 iMac to OS Lion. I also updated my iPhone to IOS5. Lion is not really configured to work seamlessly with an older mac, so I reverted back to OSX 10.6. This means I've lost all contacts in my address book. Is the

  • How to make corestorage background encryption progress faster ...

    Accoriding to manual page to corestorage makes encryption in the background, but the process is too slow. Is there a way to make it faster? Rise priory? tell corestorage to go foreground? Any ideas besides formatting the volume as encrypted and copyi

  • Free adobe reader or compatible

    I have Bell fibe internet, windows 7, internet explorer 11 and am unable to open pdf files from the website in adobe free reader.  Could anyone explain this.  I was able to view pdf files before i got fibe internet.  Do you know any free readers that

  • Apps used in the "alive" TV add ?

    Can someone tell me which apps used in the "alive" TV add?

  • Analytics Report Suite Not working

    Hello: I'd like to setup an analytics report suite for an application account I've created. I don't have an Omniture Site Catalyst so I want to use the basic analytics suite included in the DPS Pro. But, when I try to write a name for the Report Suit