Web Service from stateful Session Bean deleted after server restart

Hi,
i created a stateful session bean and from this a web service.
I am able to deploy it and it works really fine.
My problem is: after a server restart the web service is gone and i
have to deploy it again.
I have some other web services (but these are web services from stateless session beans)
but they "survive" the server restart.
I don't want to deploy the web service after every server restart, did I forget something or
is it a general problem of stateful session beans or web services?
Thanks in advance
Jens

Hello Björn,
I am not quite sure what your problem is but did you have a look at these articles:
http://help.sap.com/saphelp_nw04/helpdata/en/4d/993441c73cef23e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/be/2e2c4142aef623e10000000a155106/frameset.htm
I hope they can give you some idea.
Regads
Vyara

Similar Messages

  • Error while calling a Web Service from a Session Bean

    I am trying to call a Web Service from a Session Bean using an Axis client, but I am getting the next exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: org/apache/axis/client/Service
         at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:364)
         at javax.rmi.CORBA.Util.wrapException(Util.java:277)
         at com.ing.mx.seguros.siniestros.litigios.ejb._SisaServiceRemote_Stub.invocarWebSericeProveedorLegal(Unknown Source)
         at com.ing.mx.seguros.siniestros.litigios.proxy.SisaWsProxy.solicitarApoyoLegal(SisaWsProxy.java:132)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
         at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
         at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)Thanks for any help provided.
    Does any one have insights about it?

    Hi Swapna,
    from your screenshot it seems that you actually try to call the service in your Data Source Expression field. You should set path to the WSDL file here actually - this could be either URL to SAP or to filesystem, as Anton suggested (this could be faster). Have you created endpoint binding for your service in transaction SOAMANAGER? If yes, then simply download the corresponding WSDL with binding or copy the URL which leads to it. But also test whether you are able to retrieve the WSDL without logging into SAP (close all browser windows and then open a new one otherwise session ID from other browser windows can be reused).
    If you have to give username and password, then setup anonymous alias in transaction SICF, for example.
    Pleas, check my previous post on the same subject here: Re: BCM7 IVR : SOAP request for client identification in CRM .
    Maybe it could help.
    Regards,
    Dawood.

  • How to call a web service from a session bean's business method???

    Hi Experts,
    Can anybody help in calling a web serivce frm a session bean's business method??
    Hw do we do that?
    I have one requirement where i want to send emails to set of users for which i have email sending web service ready.. How can i call it thru a session bean's business method???
    Pls help,
    Regards,
    Amey

    Hi Amey,
    You can achieve this using the followin 2 Step implementation:
    1. [Creating a Deployable Proxy|http://help.sap.com/saphelp_nw70/helpdata/EN/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm]
    2. [Create a Client Bean|http://help.sap.com/saphelp_nw70/helpdata/EN/45/029840cf43495195da923f32262911/frameset.htm]
    Hope it helps.
    Regards,
    Alka.

  • Calling an external web service from a session bean

    We're integrating our Weblogic EJB application with a third party JBoss-based product that exposes a web service API. I thought that Weblogic should have all of the libraries available that I would need in order to make this connection. However, when I bundle the web service client jar and attempt to call the web service from within Weblogic, I get:
    java.lang.NoClassDefFoundError: com/sun/xml/rpc/client/BasicService
    If I bundle jaxrpc-api, jaxrpc-impl, and jaxrpc-spi in the EAR, I instead get:
    java.lang.IncompatibleClassChangeError at com.sun.xml.rpc.streaming.XmlTreeWriter.addNewNode(XmlTreeWriter.java:102)
    ...which isn't any better, and makes me think there's a competing jaxrpc somewhere.
    What am I doing wrong?

    Hello,
    Can you indicate the classpath that you use to run your client, version of weblogic and the version of jaxrpc api that you are using.
    As a quick experiment adding the jaxrpc jar files to your classpath one at a time.
    This [url http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=Enterprisejava&Number=3801&page=12&view=collapsed&sb=9&o=&fpart=1]chap seemed to have a similar problem to you and solved it by adding the jaxprc-spi jar file to his class path. It may be that the jaxrpc-impl is causing you greif.
    Also see this thread:
    http://forums.bea.com/bea/message.jspa?messageID=200612003&tstart=0
    Hussein Badakhchani
    www.orbism.com

  • Best way to call web service from Message Driven Bean

    I'm q'ing msgs up and would like to use a message driven bean to forward them to
    an external web service. Weblogic workshop does not seem to support web service
    controls in an EJB project. Any suggestions?
    Thanks,
    Paul

    Paul,
    A non-trivial alternative, since you have the WSDL, would be to forget about trying
    to use generated client code and just use JAX-RPC dynamic invocation instead.
    That's how I call external web services from within an EJB in situations in which
    generated client code cannot be incorporated prior to deployment. Minimally all
    that is required is the WSDL and the service name, port name, and operation name,
    although if non-builtin parameter types are used then you will have to manipulate
    the service's type mapping registry.
    Mark
    "Paul" <[email protected]> wrote:
    >
    I've taken our wsdl and generated a web service in Workshop 8.1 using
    XMLBeans.
    This produces a web page that contains a link"Java Proxy" for downloading
    generated
    client code. I assume this is the same as clientgen. It's interesting
    that
    it does not
    use XMLBeans like the web service that generated it. It uses a different
    serialization
    method.
    I've used this generated code to call the web service. Although the
    client seems
    to run
    successfully to completion, I get the following error in the weblogic
    server console:
    <Sep 29, 2003 7:46:24 AM EDT> <Error> <WLW> <000000> <Failure=com.bea.wlw.runtim
    e.core.request.ResponseValidationException: java.lang.RuntimeException:
    Protocol
    'http-soap' not available on this operation. [ServiceException]>
    <Sep 29, 2003 7:46:24 AM EDT> <Warning> <WLW> <000000> <Returning HTTP
    500 due
    t
    o SOAP fault occurring on DispFile=pjm.srcm.webservices.face.Receptor>
    Frustrating...
    Bruce Stephens <[email protected]> wrote:
    Hi Paul,
    Could you not first use clientgen on the external webservice, then take
    the stubs it created, then add these to your code along with the
    onMessage(Message msg) and roll it into the MBean?
    We don't have exactly that example, but you might take a look at this
    one to get some ideas:
    http://webservice.bea.com/message.zip
    Hope this helps,
    Bruce
    Paul wrote:
    Bruce,
    Don't think this will work for us. We are receiving data internallythrough
    a JMS queue. We need to pull it off the queue (MDB), massage it alittle and
    send it to an external web service. The link you sent me was howto implement
    a web service with JMS.
    I started out by trying to use the Web Service and JMS controls butit doesn't
    seem like I can use a JMS control because that requires a conversationID,
    which we don't have because nothing is comming in through a web services.
    Paul
    Bruce Stephens <[email protected]> wrote:
    Hi Paul,
    There is a chapter in the docs on this. See if this helps,
    http://edocs.bea.com/wls/docs81/webserv/jms.html#1067060
    Thanks,
    Bruce
    Paul wrote:
    I'm q'ing msgs up and would like to use a message driven bean to
    forward
    them to
    an external web service. Weblogic workshop does not seem to supportweb service
    controls in an EJB project. Any suggestions?
    Thanks,
    Paul

  • Error execute query from stateful session bean

    Hi,
    I created a stateful session bean, it's flow are as following:
    - client invoke open()
    - client "iterate" using method next()
    - client invoke close()
    In open, I get Connection to db-source, create a PreparedStatement, and execeute the query, store in a resultset.
    In next(), I traverse the resultSet using next().
    In close(), I close both resultset, statemtn, and connection.
    Here's the snippet of my code:public SynchCatalogBean implements SessionBean {
        private Connection conn;
        private PreparedStatement stmt;
        private ResultSet rs;
        private static final String = "SELECT ? FROM ?";
        public void openCategory() throws RemoteException {
            DataSource dataSource =
                (DataSource)jndiContext.lookup(DATASOURCE);
            con = dataSource.getConnection();
            stmt = con.prepareStatement(QUERY);
            stmt.setString(1, "id");
            stmt.setString(2, "category");
            rs = stmt.executeQuery(); //this throws exception
        public String next() throws ... {
            if (rs.next())
        public void close() throws ... {
            rs.close();
            stmt.close();
            conn.close();
    }Well, the problem is, once I test with a simple client, the line rs = stmt.executeQuery() produce exception like this:[SynchCatalog] TRANSACTION ROLLBACK EXCEPTION:Error opening category; nested exception is:
        java.rmi.RemoteException: Error opening category
    [SynchCatalog] java.rmi.RemoteException: Error opening category
    [SynchCatalog]  at matashop.product.ejb.SynchCatalogBean.openCategory(SynchCatalogBean.java:66)
    [SynchCatalog]  at java.lang.reflect.Method.invoke(Native Method)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:570)
    [SynchCatalog]  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
    [SynchCatalog]  at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
    [SynchCatalog]  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
    [SynchCatalog]  at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
    ...My stateful-bean is "read-only" bean, it just execute a select statement, so why Jboss complain about transaction exception? Can anyone help me?
    -- Verdi March --

    agree, you cannot pass tablenames as ? parameters. Instead you should generate your SQL statement dynamically
    private static final String = "SELECT ? FROM ";
    public void openCategory() throws RemoteException {
    stmt = con.prepareStatement(QUERY + "category");
    stmt.setString(1, "id");

  • Rolling back the transaction from stateful session bean

    Hi,
    How can I mark the transaction to be rolled back in a stateful session bean implementation?.
    Should I call setRollbackOnly method or throw a RemoteException or throw an EJBException, etc.?
    the configuration is :
    OC4J 9.0.4
    Stateful session bean
    Related method has transaction attribute - "Required"
    thanks & regards.
    ps : I couldn't find a related topic even if this has been discussed before (too many topics). if so, excuses.
    Erdem.

    Tried using Bean managed transactions but with the same result. Given below is the sample code.
    UserTransaction uts = null;
    try {
    uts = (UserTransaction)(ctx.getUserTransaction());
    uts.begin();
    Connection con = null;
    con = getCountConnection();
    PreparedStatement ps = con.prepareStatement(sqlselectUserId);
    ps.executeUpdate();
    PreparedStatement ps1 = con.prepareStatement(sqlselectUserDetails);
    ps1.executeUpdate();
    uts.commit();
    catch(SQLException e) {
         uts.rollback();

  • Can anybody tell how to access web service from Message Driven bean

    Can anybody tell how to access web service from Message Driven bean

    Can anybody tell how to access web service from Message Driven bean

  • Implementing Web Service with Stateless Session Bean

    I have a web service that I've built using the WorkSpace Studio tools (create a WSDL, generate the Java code from the WSDL, fill in the skeleton methods in the service implementation class). This service is deployed as a web module within an EAR to WebLogic Server 10.0 and is working great as a web service.
    I'd like to be able to also call the operations on this service via an EJB interface (from a different application on the same server). I followed the guidelines for adding EJB annotations to the web service implementation class (from [http://edocs.bea.com/wls/docs100/webserv/jws.html#wp215790]). I added the @Session annotation to the class, implemented javax.ejb.SessionBean, and added the ejbXXX() methods. This all makes perfect sense, and looked like it was going to work. However, WorkSpace Studio now gives me a compile error on the class that says "EJB backed WebServices are not supported."
    A few internet searches for that error didn't return anything relevant.
    It seems like I followed the instructions correctly. Is there a better way to build a service like this that is both a web service endpoint and a stateless session bean?
    Thanks!
    -Eric

    Having separate EJB and web modules certainly makes things easier, but I have non-trivial (i.e. not feasible to copy) application logic that I'd like to expose with both a bean interface (for intra-application usage) and a web service interface (for public consumption).
    I've tried starting with a "web application" WorkSpace Studio project and adding bean annotations. This produces the error I originally described. I also tried starting with an "EJB" WorkSpace Studio project and adding web service annotations. This fails at deployment time with errors about missing web service descriptors (the error is correct - the web-service-related descriptor elements are missing from the deployment descriptors).
    The documentation explicitly presents this as an option (annotating a class with both web service and session bean annotations), but how does one actually make this work?

  • Invoking Web Service from JSF Managed Bean

    Hi all,
    I am trying to invoke a webservice from Managed Bean and getting an exception.
    Server : WAS 6.1.0.2
    Version :JSF 1.2
    Type of WS Invocation : JAX-WS web services
    IDE : RAD 7.0.0
    I have set up the class path correctly and added relevant WS Client in EAR ....
    Following is the exception am receiving :
    [8/31/11 7:59:25:335 EDT] 0000002d WebApp E [Servlet Error]-[Faces Servlet]: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:170)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:123)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:84)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:204)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:171)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:754)
    at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:627)
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:550)
    at com.sun.faces.taglib.html_basic.InputTextareaTag.doEndTag(InputTextareaTag.java:651)
    at com.ibm._jsp._sample._jspx_meth_h_inputTextarea_0(_sample.java:107)
    at com.ibm._jsp._sample._jspx_meth_h_form_0(_sample.java:149)
    at com.ibm._jsp._sample._jspx_meth_f_view_0(_sample.java:180)
    at com.ibm._jsp._sample._jspService(_sample.java:77)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:239)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
    at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1263)
    at java.beans.Beans.instantiate(Beans.java:219)
    at java.beans.Beans.instantiate(Beans.java:63)
    at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:226)
    at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:291)
    at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:81)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:249)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:140)
    Thanks in advance ..
    Steve Bob

    No you haven't, because
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType a relevant class can still not be found and Java really is not going to lie to you; this class is not on your application's classpath so it is either missing or put in the wrong place. Note that missing classes can be caused by you forgetting to properly redeploying your application - its usually something silly like that. Figure out what you did wrong and correct your mistake.
    The fact that you have to mention that you "setup the classpath" is questionable; in web applications you don't touch the classpath at all. So what exactly did you do?

  • Access web service from Message Driven bean

    Can anybody give code to to access webservice from Message Driven Bean

    Can anybody give code to to access webservice from Message Driven Bean

  • Any difference in creating a web service from a java class or session bean?

    Hi,
    The JDeveloper tutorial at http://www.oracle.com/technology/obe/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm demonstrates creating a web service from a plain java class. I'm wondering:
    - Is it possible to create a web service from a stateless session bean instead of a java class? If so, what's the proper way to do this in JDeveloper? When I tried doing so in JDeveloper 10.1.3.0.4 (SU5) using the J2EE Web Service wizard, the wizard did not list the session bean in the Component To Publish dropdown (it does list any java classes available in the project). I can proceed by manually typing in the name of the session bean. After the wizard completes though, the @Stateless annotation that had been in my session bean class code is removed and replaced by a @WebService annotation. The end result is that it looks like it made no difference whether I had tried to create the web service from a session bean or plain java class as the annotations in the resulting web service code are the same (although if I had started from a session bean, the class for the web service still implements the Local/Remote EJB interface that the session bean originally implemented).
    - Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean? I'm creating the web service from scratch so I also need to either build the java class or stateless session bean the web service would be based on from scratch too.
    Thanks for any ideas about this.

    Hi,
    EJB Session beans (EJB 3.0) are deployed as WebServices by annotating the class with @WebService and the methds with @WebMethod (both tags require you to add the JSR-181 library to your project (available in the JDeveloper list of libraries)). Unlike the J2E WebService, the EJB session bean service is turned into a WebService upon deployment. This means you obtain teh WSDL file after deployment
    - Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean?
    The difference is that EJB Session bean based web services are integrated with the J2EE container, which means that they can leverage container services like transaction handling, data sources, security, JMS etc.
    Frank

  • Create a web service from java bean and map exceptions to SOAP faults

    Hi,
    We have to expose our Session stateless EJB3 as web services. I've tried to use annotations and jdev wizard "java bean to web service" and it works fine.
    Our problem now is that our methods can throw a business exception that contains a list of error message strings to be presented on the client.
    I did not find any way to use annotations to make it build a wsdl with soap fault mapped to our exception class. Neither I could to make the wizard to create wsdl with faults.
    As we are exposing already designed and implemented classes as web services, I think the bottom-top (java->wsdl) approach is better that top->botton (wsdl->java). Therefore, I'm looking for a possibility to generate the web services from the java beans and have the exception be mapped to a soap fault message.
    We are using jdev 10.1.3.1 and OAS 10.1.3.1., is there a way to map exceptions to soap faults using bottom->top approach?
    thank you

    A couple of links that may be of help:
    http://www.netbeans.org/servlets/ReadMsg?listName=nbj2ee&msgNo=1218
    My last question concerning web services:
    I have already written a session bean and I'd like to add some methods
    as a web service to it, how do I do that?
    Or I can only create another bean for a webservice and cannot modify the
    original one?You might create web service with existing sources and select you bean. New web services with appropriate lookup method will be generated.
    All web service method, that will be exposed in web service, you
    should add itself (Pop-up menu Web Service -> Add operation)
    http://usersguide.netbeans.org/files/documents/40/73/Chapter9-WebServices.pdf

  • Error while invoking a WS-Security secured web service from Oracle BPEL..

    Hi ,
    We are facing some error while invoking a WS-Security secured web service from our BPEL Process on the windows platform(SOA 10.1.3.3.0).
    For the BPEL process we are following the same steps as given in an AMIS blog : - [http://technology.amis.nl/blog/1607/how-to-call-a-ws-security-secured-web-service-from-oracle-bpel]
    but sttill,after deploying it and passing values in it,we are getting the following error on the console :-
    &ldquo;Header [http://schemas.xmlsoap.org/ws/2004/08/addressing:Action] for ultimate recipient is required but not present in the message&rdquo;
    Any pointers in this regard will be highly appreciated.
    Thanks,
    Saurabh

    Hi James,
    Thanks for the quick reply.
    We've tried to call that web service from an HTML designed in Visual Studios with the same username and password and its working fine.
    But on the BPEL console, we are getting the error as mentioned.
    Also if you can tell me how to set the user name and password in the header of the parter link.I could not find how to do it.
    Thanks,
    Saurabh

  • Generating web service from session bean

    Hi
    I have a session bean in one project which has a service-endpoint defined.
    My web services are in another project entirely, within the same workspace if that helps any.
    When I generate the web service from the EJB JDev turns the business tier project into a web project,
    I don't see any options to include the web service in the web project.
    I've reversed all of the changes, but wonder if I shouldn't redo it and copy the mapping file and configuration
    across to the web project and reverse the changes in the business tier.
    This is a workaround that I'm hoping to avoid, as I'm doing the "howto" for this in our project.
    How is this normally done?

    I tried generating the web servioce from WSDL, in the web project.
    I tested and the web service works fine.
    Then I changed the config file to point to the ejb, but the server won't start up....
    *08/09/17 10:58:40 WARNING: Application.setConfig Application: current-workspace-app is in failed state as initialization failed.*
    This is the webservices.xml bit I updated...
         <ejb-link>SomeOrOtherEjbName</ejb-link> The bit I found in webservices.xml when the service is in the business tier.
    <!-- <servlet-link>SomeOrOtherWebServiceSoapHttpPort</servlet-link> --> The service that works in the web tier.

Maybe you are looking for

  • How to compare the no. items in an order i ERP and CRM?

    Hi SAP Experts, We are facing an issue where the number of line  items in an order(same order) in ERP and CRM are different , properly not synchronized.e.g., one order in ERP is having 5 line items but in CRM for the same order has 7 line items. How

  • PDFMaker can't produce pdf's in MS Office 2007 after upgrade to Acrobate Standard 8.1.7

    I get an error message saying PDFMaker cannot locate the Adobe PDF Printer's printer driver. Please re-install Adobe Acrobat 8.0. I can still print to the Acrobat printer using the print out menus in Office 2007, so there IS working printer drivers,

  • How to add canvas to the background of a form in j2me

    I am new to j2me. I am developing a mobile application in j2me. Is there a way of adding a canvas object to the background of a form? I tried searching in net with few people suggesting to use "jmepolish". I have no idea what jmepolish is..Is there a

  • Vchatter problem

    I use an application on fa cebook called vchatter (its a video chat application) and every time I use it I get a message saying a script in this movie is causing adobe flash player to run slowly do you want to abort the script yes or no, after I rece

  • How to change engine's name in Oracle BPM 10.3.2?

    I want to change the engine's name in Oracle BPM 10.3.2 Standalone. I don't see how to do it inside the Process Administrator. Is it possible to change an engine's name? Thanks.