WebServices in EJBs

Hi,
Is it possible to deploy a standard EJB into the NetWeaver AS and then host a Web Service from this EJB.
After this, Is it possible to call this WebService from outside (EG: A Java APP outside the context of the Server?)
Cheers,
Earlence

Is it possible to deploy a standard EJB into the NetWeaver AS and then host a Web Service from this EJB.
Yes, see [Creating an Inside-Out Web Service from an Enterprise Java Bean|http://help.sap.com/saphelp_nwpi711/helpdata/en/46/78955dcb496ef0e10000000a1553f6/frameset.htm]
After this, Is it possible to call this WebService from outside
Yes, [deploy the Web service|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/f3e0e6e8ce6c30e10000000a114a6b/frameset.htm] and then [create an endpoint|http://help.sap.com/saphelp_nwpi711/helpdata/en/4a/16934f06441b40e10000000a42189c/frameset.htm] for it. Now you will be able to call the Web service.
Hope this helps,
Rossen

Similar Messages

  • Error while calling PI webservice from EJB

    Hi Experts,
    We are getting exception while calling PI webservice from EJB which is deployed in CE 7.2. Earlier we used to call the same webservice but from different PI system at that it worked fine. Now we have changed the consumer proxies required in CE and tried to call from CE and it is throwing error. We have checked usernames and passwords that we are using to call the service and that is working fine. PI team tested from their side and li is also fine. We have also restarted the CE system but invain. Can somebody help on this.  The below is the trace that we got.
    Location: com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding
    Text: Connection IO Exception. Check nested exception for details. (Connection reset).
    [EXCEPTION]
    com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection reset).
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:419)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1364)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:990)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:944)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
    at $Proxy780.mioaRDMDataDistribution(Unknown Source)
    at com.MDMEventListener.callToPIWS(MDMEventListener.java:100)
    at com.MDMEventListener.ListenerMethod(MDMEventListener.java:173)
    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:597)
    at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:39)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:23)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
    at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:682)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:324)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
    at com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:404)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:204)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:440)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:429)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:82)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:950)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:414)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:319)
    at com.sap.engine.services.webservices.espbase.client.bindings.ClientHTTPTransport.getResponseCode(ClientHTTPTransport.java:209)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:385)
    ... 78 more
    Regards,
    Pradeep

    Hi Pradeep,
    this looks like if the server is not reachable. Have you checked if both server are able to communicate? Maybe firewall rules block the request.
    Regards,
    Tobias

  • I am using webservice in ejb but it is giving Naming exception in NetWeaver

    hai
    this Guru.
    i am working as javadeveloper .
    in my project i am using webservices in ejbs.
    i am using netweaverdeveloper .
    my problem is whlie accessing webservices in ejbs it is giving Namingexception .
    please tell me the procedure for accesing WEBSERVICES IN EJB BY USING NETWEAVER DEVELOPER STUDIO.
                              THANQQQQQ
                       GURU FROM MOBILEONE PTV LIMITED
                              HYDERABAD
                              INDIA

    Hi Guru,
    Refer these links
    Accessing the Web Services Context from a WS-EJB -> 
    http://help.sap.com/saphelp_webas630/helpdata/en/a6/835f3e1e7d7937e10000000a114084/content.htm
    Accessing the web service from webdynpro ->
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9fc0e990-0201-0010-199c-e38fc6dafb5d
    Regards,
    Uma

  • Procedure  for  Accessing  WebService in ejb By using NetWeaver,

    hai,
    This is Guru.
    please tell me the procedure for accessing a webservice in ejb .
    my mean is.
    i have one Session Beab,And there is one webservice.
    How can i  call and using  that webservice in netweaverdeveloperstudio tool.please send me code,if u have.
                                        thanqq
                                         Guru

    Hi Guru,
    the procedure to use a WS is as follow
    1. Use the SAP xmltoolkit and generate client binding for your WS, which is the stub class, parameter and return type classes of the WS methods, if any.
    2.Import the created WS client jar from step 1 to your EJB module project
    3. In your session bean: instantiate the stub and call a WS method on this stub
    That's all there is to it.
    Best Regards
    Gregor
    Ps. The NWDS Help has also tutorial regarding WS usage.

  • @WebService in EJB 3.0 ? Error on deployment

    Hi,
    I have implemented a stateless Session EJB with a @WebService Annotation. The EJB Modul can be deployed on a Glassfish Server with out errors.
    When I try to deploy the EJB Modul on Weblogic 10.0 I got the following Error:
    <23.10.2007 15.03 Uhr GMT+01:00> <Error> <HTTP> <BEA-101216> <Servlet: "WSEE_SERVLET" failed to preload on startup in Web application: "/ix_workflow/WorkflowModelService".
    class: org.imixs.workflow.jee.ejb.jaxws.GetEnvironmentList could not be found
         at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:272)
         at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:566)
         at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:513)
         at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:358)
         at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:245)
         Truncated. see log file for complete stacktrace
    >
    <23.10.2007 15.03 Uhr GMT+01:00> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1193148199315' for task '35'. Error is: 'weblogic.application.ModuleException: Exception activating module: EJBModule(BEA_Test1.jar)
    Unable to deploy EJB: WorkflowManagerImplementation from BEA_Test1.jar:
    My code dose not include a Class
    org.imixs.workflow.jee.ejb.jaxws.GetEnvironmentList
    nor the package org.imixs.workflow.jee.ejb.jaxws
    Can anybody help me or give me a hint what this error message means?
    Thanks a lot
    Ralph

    Hi, Rick
    Thanks for your help.
    I deleted de application-client.xml file, added the following lines to the web.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
         </ejb-ref>
    and now I´m using oracle.j2ee.rmi.RMIInitialContextFactory
    there is no error, and it doesn´t throw any exception but the following line returns null.
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    Its seems the lookup method finds the remote ejb because it doesn´t fail, but it returns null.
    Any idea what is wrong?
    Mauricio.

  • Consuming XI WebService in EJB

    Hi,
    I want to consume a XI webService , for that I have created the client proxy from the WSDL file. I have created the EJB project to consume the XI webService but when I right click on the EJB project the  "Add client web Service API Library"
    option in the context menu is not enabled which i have to use. I am not getting why it is happening?
    It will be great if anyone can guide me regarding this.
    Thanks,
    Samir

    Hi,
    You have to create your WS proxy of type "Deployable Proxy" to use this functionality.
    Regrads,
    daniel

  • Unable to create webservice from EJB due to wrong wizard configuration

    Hi All,
           I was trying to create a webservice from a EJB(session bean).I executed following steps :
    1. I created the bean in one EJB project.
    2. Then created another Enterprise Project in whichEJB projects .jar file is included.
    3. Now when i right click "ejb-jar.xml" to create a webservice ,webservice wizard
       appears in which Server and WS runtime configuration are set properly.
       But it displays following error message on the top : "Select a service Project Type".
       If i click on the link on the wizard to select a "service Project type" the drop down for the same comes empty.The value for 'Service Project' is already defaulted
    as "Webservice Project ".If i go to windows->preferrences->Webservcies->ProjectTopology i found two entries in the service project type list :
                         1.Dynamic Web project
                         2.SAP Web Project
         But there is no entry for Webservice Type project.Can any one help me out
    how to solve this issue ?
    Thanks and Regards
    Ashis

    Hi
    <a href="/people/baris.buyuktanir2/blog/2007/02/12/how-to-create-dynamic-configurable-web-services-easily-with-netweaver-development-components-part-i 1</a>
    <a href="/people/baris.buyuktanir2/blog/2007/02/12/how-to-create-dynamic-configurable-web-services-easily-with-netweaver-development-components-part-ii 2</a>
    Regards
    Abhijith Ys

  • Webservices for EJB How to go about it

    HI
    Here is my situation please advice me how to go about it...
    I have to expose EJB as a webservices...That EJB is already packed in jar file it has nearly 20 methods or so and the application server that i need to use is weblogic....The problem is many of the methods return java.util.Map and java.util.Collection...and the contents of the all the Maps are not of the same type all the time i mean if Method1 returns Map whose key is String and Values is user defined data type (for instance dataType1)...Method2 also returns a Map whose key is a String and values is another User Defined data type(for instance dataType2)..
    I tried with weblogic servicegen and WSEE 109 manually building it but that did not work out....Right now my idea is to write wrapper class which has all the 20 methods but return user defined data type(which i have to write).Internally each method will be calling the corresponding method in EJB..If this is the case for each method i have to create different User defined data type....Is this feasible or is there better way of doing it....
    Thanks for sparing some time to go through my problem

    This question is also posted in the BEA forums, I've replied to it here: http://forums.bea.com/bea/thread.jspa?threadID=600004366&tstart=0
    -Tim West

  • How does Webservices and EJB's differ?

    I have to call some of the api's from the remote application.I just wanted to know which would be better approach to call those methods?Should i do with EJB or webservices?

    The main advantage of using webservices is to decouple the client and endpoint as much as
    possible. This gives you the flexibility of coding the client with a variety of technologies, not
    just Java. It is also a better choice if the client is being developed by either another organization
    or is running outside your firewall.
    However, with loose coupling comes some disadvantages. The development model is
    a bit more complex than using Remote EJB. It is also more difficult to portably
    support transaction and security propagation.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Webservice for EJB DC

    I'm trying to create a webservice for an EJB with the Webservice Creation Wizard of NDS. While this is no problem for an "old fashioned" EJB, it does not seem to work for an EJB DC. The context menu "New -> Virtual Interface / Webservice" appears, just as described in the <a href="http://help.sap.com/saphelp_nw04s/helpdata/de/f7/af60f2e04d0848888675a800623a81/frameset.htm">Java Development Manual</a>, but nothing happenes when I select one of this options. No error message, no dialog, nothing...
    I have created an Enterprise Application DC with an EJB Module DC as Child DC. The EJB Project contains a Stateless Session Bean with a Business Method. Is there anything else I have to do, so that the Wizard works?
    Thanks for your help,
    Frank

    Hi,
    Which version of Studio are you using? Mine is SP18 and it works fine. I'm able to create a virtual interface for an ejb in ejb dc with no problems.
    You might consider re-installing your studio.
    Hope that helps,
    Thanks,
    Rajit S

  • Call WebService through EJB

    Hi friends,
    I have created one web service , how can i call that web service through ejb . Is this possible ?.. can anybody help me....
    Thanks and Regards,
    Krish

    Hi Krish,
    This recent [thread|How to Call webservice by another webservice; deals with the same question. See the answers / links there.
    Hope it helps!
    -- Vladimir

  • Issue with IDE configuration for creating Webservice from EJB

    Hi All,
           I was trying to create a webservice from a EJB(session bean).I executed following steps :
    1. I created the bean in one EJB project.
    2. Then created another Enterprise Project in whichEJB projects .jar file is included.
    3. Now when i right click "ejb-jar.xml" to create a webservice ,webservice wizard
       appears in which Server and WS runtime configuration are set properly.
       But it displays following error message on the top : "Select a service Project Type".
       If i click on the link on the wizard to select a "service Project type" the drop down for the same comes empty.The value for 'Service Project' is already defaulted
    as "Webservice Project ".If i go to windows->preferrences->Webservcies->ProjectTopology i found two entries in the service project type list :
                         1.Dynamic Web project
                         2.SAP Web Project
         But there is no entry for Webservice Type project.Can any one help me out
    how to solve this issue ?
    Thanks and Regards
    Ashis

    Hi Ashish,
    perhaps you launch the Web service wizard from the wrong location (i.e. not selecting the SEI you want to use). Did you strictly follow the steps described in the <a href="http://help.sap.com/saphelp_nwce10/helpdata/en/44/f36fa8fd1d41aae10000000a114a6b/frameset.htm">documentation</a> for creating the web service?

  • Deployment Issue with MDM Java API exposed as Webservice using EJBS

    Hi Experts,
    I am implementing MDM Java APIS in Stateless session bean.Exposed that bean as Webservice and using that webservice in
    Webdynpro through Adaptive Webservice Model.
    I am facing following issue:
    Webservice works fine after deployment,after some number of execution webservice stops working and gives exception.After
    Redeployment of the Webservice, it starts working again works fine some number of execution.
    I am Using new MDMJava API.
    MDM Server Details: MDM 5.5 SP06
    I am using following code for connetion
    //////////////*************Getting Connection************///////
              ConnectionPool pool = null;
              String sessionId = null;
              try {
                   pool = ConnectionPoolFactory.getInstance("Server Ip");
              } catch (ConnectionException e1) {
                   System.out.println(e1.getMessage());
    //////////////*************Repository Session************///////
    CreateRepositorySessionCommand repSeession =
                   new CreateRepositorySessionCommand(p_pool);
              repSeession.setRepositoryIdentifier(p_repId);
              try {
                   repSeession.execute();
              } catch (CommandException e2) {
                   System.out.println(e2.getMessage().toString());
              String repIID = repSeession.getRepositorySession();
              //     Authenticate Repository
              AuthenticateRepositorySessionCommand autRepSeesion =
                   new AuthenticateRepositorySessionCommand(p_pool);
              try {
                   autRepSeesion.setSession(repSeession.getRepositorySession());
                   autRepSeesion.setUserName(p_user);
                   autRepSeesion.setUserPassword(p_Password);
                   autRepSeesion.execute();
              } catch (CommandException e3) {
                   System.out.println(
                        "RepSession Seesion" + e3.getMessage().toString());
              return autRepSeesion.getSession();
    //////////////*************user Session************///////
    GetRepositoryRegionListCommand regionListCommand =
                   new GetRepositoryRegionListCommand(p_pool);
              regionListCommand.setRepositoryIdentifier(p_repId);
              try {
                   regionListCommand.execute();
              } catch (CommandException e) {
                   System.out.println(e.getMessage().toString());
              RegionProperties[] regions = regionListCommand.getRegions();
              //                                 create a user session
              CreateUserSessionCommand UsersessionCommand =
                   new CreateUserSessionCommand(p_pool);
              UsersessionCommand.setRepositoryIdentifier(p_repId);
              UsersessionCommand.setDataRegion(regions[0]);
              // use the first region
              try {
                   UsersessionCommand.execute();
              } catch (CommandException e) {
                   System.out.println("UserSession" + e.getMessage().toString());
              String UsersessionId2 = UsersessionCommand.getUserSession();
    AuthenticateUserSessionCommand authUserCommand =
                   new AuthenticateUserSessionCommand(p_pool);
              authUserCommand.setSession(UsersessionCommand.getUserSession());
              authUserCommand.setUserName(p_userId);
              authUserCommand.setUserPassword(p_password);
              try {
                   authUserCommand.execute();
              } catch (CommandException e) {
                   System.out.println("User Seesion" + e.getMessage().toString());
              return authUserCommand.getSession();
    //////////////*************Destroy Session************///////
         DestroySessionCommand destroySessionCommand =
                   new DestroySessionCommand(p_pool);
              destroySessionCommand.setSession(p_repsession);
              try {
                   destroySessionCommand.execute();
              } catch (CommandException e) {
                   e.printStackTrace();
              destroySessionCommand.setSession(p_Uesrsession);
                   try {
                        destroySessionCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
    Do we need to relase the connection pool object also?
    Can anyone help me with the code how that can be achived?
    Please Reply if anyone has come accross similar issue or know what can be the solution.
    Thanks in Advance.
    Regards Shruti
    Edited by: Shruti Shah on Dec 18, 2008 12:52 PM

    Hi Nitin,
    Thanks for the prompt Response.
    Even I am guessing that its becose of Connection pool.
    I am destroying session as follows
                   DestroySessionCommand destroySessionCommand =
                   new DestroySessionCommand(p_pool);
              destroySessionCommand.setSession(p_repsession);
              try {
                   destroySessionCommand.execute();
              } catch (CommandException e) {
                   e.printStackTrace();
              destroySessionCommand.setSession(p_Uesrsession);
                   try {
                        destroySessionCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
    But I didnot find any method by which i can close realsse connection from connection pool.
    It would be great if you can help me how close or realese those connection.In MDM Console i am able to see those sessions even after destroying them.
    Regards Shruti.

  • Webservices lookup EJB error

    This are the sever log .
    ejb ref resolution error for remote business interfacetest.session.Hello [Root exception is java.lang.RuntimeException: Could not invoke defineClass!]
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:350)
         at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at my.sample.server.ServiceImpl.hello(ServiceImpl.java:24)
         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:589)
         at com.sun.xml.ws.server.PeptTie._invoke(PeptTie.java:58)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.invokeEndpoint(SOAPMessageDispatcher.java:278)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:586)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
         at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
         at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:333)
         at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:288)
         at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: java.lang.RuntimeException: Could not invoke defineClass!
         at com.sun.corba.ee.impl.codegen.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:69)
         at com.sun.corba.ee.spi.codegen.Wrapper._generate(Wrapper.java:933)
         at com.sun.ejb.EJBUtils$2.run(EJBUtils.java:507)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.ejb.EJBUtils.generateAndLoad(EJBUtils.java:504)
         at com.sun.ejb.EJBUtils.loadGeneratedGenericEJBHomeClass(EJBUtils.java:441)
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:323)
         ... 43 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:589)
         at com.sun.corba.ee.impl.codegen.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:66)
         ... 49 more
    Caused by: java.lang.NoClassDefFoundError: com/sun/ejb/containers/GenericEJBHome
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         ... 53 more
    Message was edited by:
    JDigest

    dude, if you check the profile of the original poster you'll see that the last time he/she posted was in 2006, so you can wait a long time for a response.
    Start a new thread, describe your problem well (what do you do, post relevant code, post your exception stacktrace). In the mean time, you could also try a google search for the search terms "ejb ref resolution error for remote business interface".

  • Exposing WebServices Using EJB Module

    Hi,
    I am facing problems in exposing Web Services using EJB module. But the same is working fine when i am using webDynpro to expose the services.
    I am using the following code which gives error. 
                                                                     IUser user = UMFactory.getUserFactory().getUserByLogonID(userID);                                    UWLContext uwlContext = null;
                   IUWLService service = null;
                   uwlContext = new UWLContext();
                   service = UWLServiceHelper.findService();
                   uwlContext.setUser(user);
                   uwlContext.setLocale(user.getLocale());
    any suggestion how to go about it??
    Thanks
    Utsav

    Hello Utsav
    I see that you have not been able to find a solution for this.
    Can you provide some more information which may help the other SDN posters to assist you?
    Thanks
    Kenny

Maybe you are looking for