Multiple references to web services in EJBs

Hi
Would like to know if its possible to reference EJB web services dynamically from fields in a database. Basically, I would have the EJB installed on multiple servers and need to be able to invoke it after looking up the address of the server in the database. Currently I'm using a NetBeans Web Service Reference in a JSP project to call the EJB.
Regards
Lionel

Here [it is|http://blog.vinodsingh.com/2008/09/building-jax-ws-web-service.html] with source code.

Similar Messages

  • HOW TO CALL A WEB SERVICE OR EJB FROM BPEL

    HI
    i want to call java web service or ejb from my bpel process. how can i do this.
    i am using oracle soa10.1.3.1.0 and jdeveloper 10.1.3.1.0 and oracle database xe 10g.
    thanks in advance K ROY

    You could deploy your EJB or Java under a web service into your OC4J, after that, you invoke a partnerlink from BPEL to the destination of wsdl will do. Also don't forget to add in your XSD schema as well.
    Thanks,
    Jyno

  • Web service from ejb

    Hi All,
    I am new to java web services.
    I made web services from ejb with netbeans.
    I like only some people to have access to this services with user and pass stored in database.
    In other words I need authentication and authorization.
    How can I do this?
    Regards

    Well it depends also on application server you are using.
    It depends also on web service stack you are using.
    For example here is the hint for glassfish (Metro):
    http://java.sun.com/javaee/5/docs/tutorial/doc/bncbe.html#bncbn
    Miro.

  • Adaptative web service or EJB ?

    Hi everybody,
    I want consume a web service from  a system SAP R/3.
    Apparently, we can consume with component EJB ...
    What is the difference between a adaptative web service and EJB ?
    More security with EJB ?
    Thanks
    Rodolphe.

    Hi,
    We use for ejbs when we have to store data in database..
    if ejbs r like a medium for data transfer..where session bean contain ur business logic..
    u cn use webdynpro interface as well as jsp interface wid ejb..
    if u r using ejb u'll have to create an ejb projct first then u'll hav to create java proct which will contain ur wrapper class for fields.later on u'll have to create one application project tht wud b an Ear projct.nw u create a web service for session bean ..aftr doin this all u can test webservice which will b executed for ur business method.
    for more security u can use ejb security model :[http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Security.html]
    Web services r created for session bean..so that u cn directly access ur methods via url..
    for a detailed description of web service go through :- [http://help.sap.com/saphelp_nw04/helpdata/en/d6/f9bc3d52f39d33e10000000a11405a/content.htm]
    for ejb project go through this1 :[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ca4a9c90-0201-0010-c389-8738cd51a88e]
    Regards,
    Khushboo

  • Consume Web Service in EJB Application

    Hi Experts,
    I have EJB Application with some Java Classes.My Requirement is to Consume Web Service in EJB Application.
    I am new to EJB Application.Please share if have any ideas regarding the same.
    Thanks & Regards,
    SatheshKumar R

    Hi Vijay,
    Thanks for the Reply.
    Please provide the JAR Files i need to add.
    I had tried to consume the web service by using the java class in Java Project ie EJB.
    After creating the Project i will import the WSDL file in that Project and create the Client Application.
    The Request and Response java class is created by importing the WSDL file.
    The Client Java Class is created to access the Request and Response objects.
    After this Main class is created and I have run the application to execute the Client Java Class. During this time its shows some error.
    The Error Message are:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/engine/interfaces/sca/logtrace/CallEntry$TraceLevel
    at com.sap.engine.services.webservices.espbase.client.bindings.ConfigurationUtil.getTransportBinding(ConfigurationUtil.java:249)
    at com.sap.engine.services.webservices.espbase.client.bindings.ConfigurationUtil.createClientConfiguration(ConfigurationUtil.java:109)
    at com.sap.engine.services.webservices.espbase.client.jaxws.metadata.InterfaceMetadata.createClientConfigurationContext(InterfaceMetadata.java:178)
    at com.sap.engine.services.webservices.espbase.client.jaxws.metadata.InterfaceMetadata.getProxy(InterfaceMetadata.java:70)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.getPort(SAPServiceDelegate.java:258)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at com.sap.tutorial.testwebser1ejb.TestAddService.getTestAddPort(TestAddService.java:38)
    at com.sap.tutorial.testwebser1ejb.TestAddClient.testAdd(TestAddClient.java:12)
    at com.sap.tutorial.testwebser1ejb.MainClass.main(MainClass.java:12)
    Caused by: java.lang.ClassNotFoundException: com.sap.engine.interfaces.sca.logtrace.CallEntry$TraceLevel
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 9 more
    Thanks & Regards,
    SatheshKumar R

  • WEB DYNPRO AND WEB SERVICE MODEL: ejb remove doesn't work

    Hi guru,
    this is my scenario:
    J2EE-7.00 SP14-> PORTAL ->7 sp14  ->WEB DYNPRO FOR JAVA ->Web Service Model ->  WS Custom with MDM API JAVA
    The my WS is a Stateless Session Bean and i have this code:
         public void ejbCreate() throws CreateException {
              loc.setMinimumSeverity(Severity.INFO);
              loc.addLog(new ConsoleLog());
              this.plug = (MdmPlug) new MdmPlug(true);
              try {
                   this.loadProperties();
                   this.plug.connect(
                        hostname,
                        repository,
                        language,
                        username,
                        password);
                   loc.fatalT(msgLog+"[ ejbCreate ] START....");
              } catch (Exception e) {
                   if (e.getMessage()!=null)this.error=e.getMessage();
                   loc.fatalT(msgLog, this.error);
    public void ejbRemove() {
              try {
                   loc.fatalT(msgLog+"[ ejbRemove ] STOP....");
                   this.plug.close();
                   loc.fatalT(msgLog+"[ ejbRemove ] ...OK");
              } catch (ControlException e) {
                   loc.fatalT(msgLog+"[ ejbRemove ] ...K O !!!!");
    The my problem is:
    When open the IE and open my WD  the new EJB's instance is created (I see my log +"[ ejbCreate ] START....in LOG VIEWER).
    But, when I do log-off or I close IE, I don't see "[ ejbRemove ] STOP...." in LOG.
    Result:
    I open the MDM connection but not close it.
    Where is the problem?
    In Web Dynpro?
    In Web services?
    I have to create another WS's type?

    Hi Max,
    You can't run an EJBControl from a simple java class using either @Control or programmatic instantiation.
    The EJBControl implementation relies on Resource Context events so it "needs" a container context to run.
    You can use the ControlTestCase to unit test an EJB via EJB Control. You will need to configure the JNDIContextEnv annotation to bind to the server where the EJB is deployed. Note that this only works with EJBs that have a remote interface and a global JNDI name.
    The test case would look something like this (I've seen this example run as long as the JUnit classpath includes weblogic.jar)
    public class SimpleClient extends ControlTestCase {
    public void setUp() throws Exception { super.setUp(); }
    public void tearDown() throws Exception { super.tearDown(); }
    @Control
    @EchoEjbControl.JNDIContextEnv(
    contextFactory="weblogic.jndi.WLInitialContextFactory",
    providerURL="t3://localhost:7001",
    principal="weblogic",
    credentials="weblogic"
    public EchoEjbControl echoEjb;
    public void testXXX() {} // ... test methods that reference echoEjb
    Thanks
    Vimala

  • SocketTimeout Exception while calling a Web Service from EJB

    Hi All,
    I am consuming a Web Service defined from the WSDL received from a PI system
    in a Stateless EJB.
    The input of the Service can be a range of records 100 - 10,000, with a furture plan to exceed the range as 100 - 15,000.
    The Web Service Call goes perfect with 100 - 3500 number of records.
    As the number of records exceed 3500, we started getting the following exception:
    Service call exception; nested exception is: java.net.SocketTimeoutException: Read timed out
    Along with a call happenning to the PI system after some seconds.
    Referring to various help.sap.com pages, I came across the following code snippet:
    client._setProperty("socketTimeOut","200000");
    This thing works great!!!, and now we have set the the socketTimeout proggramatically to a satisfactory level which supports the current requirement.
    I would like to know, if we can tune some Visual Administrator Parameter for this, instead of maintaining the "Socket TimeOut" in the code.
    Any help will be appreciated.
    Best Regards,
    Alka.
    Edited by: Alka Panday on Apr 23, 2008 9:17 AM

    Hi Alka,
    Please refer to SAP Note 962114. This is specifically for Web Service clients.
    Description-->
    This note can be applied for 6.40 SP 12+. If the customer has a lower SP, an upgrade of the whole engine is recommended. The other alternative to set the timeout is to set it programmatically.
    If running a 7.0 installation, the functionality has been integrated in SP8 onwards
    When you go to the Visual Administrator -> Server -> Services -> Web Services Container on the Settings tab page you should be able to see the socket timeout input field next to the HTTP Proxy settings. You can change the default value there and it will be automatically applied to all WS client proxies and logical ports deployed on the system.
    Hope this helps.
    regards,
    Piyush

  • Invoking a Web Service from EJB

    Hi
    I need to invoke a web serice from existing EJB(stateless session bean) deployed
    in J2EE SDK 1.3.1.
    I have downloaded Java WSDP but I have no idea where to start.
    Can any one briefly explain to me how to do this ?
    Thanks.

    Hello,
    look in the tutorial from the JWSDP under 'Java API for XML-based RPC' there is a section 'JAX-RPC on the J2EE SDK 1.3.1'. There is explained how to setup the the j2ee server for web services. It is the easiest way to learn it.
    Andr�

  • Calling Web Service from EJB using HTTP Client

    Hi,
    Scenario:
    I need to Call a Web Service from an EJB Application.I used HttpClient for calling the Web Service in the EJB Application. When i call the execute method of the HttpCLient it throws an exception
    The element type "META" must be terminated by the matching end-tag "</META>"
    The input XML does not have a node called META.
    When i call the Web Service using Http Client form an Java Application it is working fine.
    Kindly Suggest me the changes/steps that needs to be done
    Regards,
    S.V.Satish Kumar

    Hi Manish,
    SOAP adapter does pass the message to XI (this message contains SOAP envelope although XI expects to get message without it), and during the mapping step i get "Runtime Exception in Message-Mapping transformatio~".
    I suppose it's because i created proxy manually. I did so because when i imported WSDL, and tried to generate proxy in CRM, i got an error message that said that proxy couldn't be generated because external definitions are only allowed in XI 3. But my XI version is 3.0! And when I generate the same proxy in my R/3 system that is installed on WAS 640, it works.
    What can I do?
    Cheers,
    Anya.

  • Web Services with EJB ( Urgent )

    Hi,
    Can any help me??
    I have a Web Services that uses a Java Control ( EJB ) and my EJB Control call Hibernate......
    My problem is caused
    "The transaction is no longer active - status:'Committed'. No further JDBC access is allowed within this transaction".
    What do I do ??
    Thanks....

    Maybe you set the transaction attribute to some too restrictive 'RequiresNew' for the EJB method you are invoking. Try to change it to 'Supports' and leave transaction management to Hibernate if there is no reason for that.

  • Creating Web Services From EJBs In WorkShop

    Is there a way to create webservices by exposing local stateless session jbs from
    within Workshop 8.1? I have read BEA documentation that states that you should
    use the ant task to do this. I find this rather inconvenient that I had to run
    an additional ant build file outside of the one generated by Workshop (along with
    another ant script I had to write in order to get javadocs to look somewhat readable
    by excluding the weblogic generated classes.)
    What is the best solution path to take when I want to expose a few stateless session
    ejbs via webservices for a .NET client application?

    You're right. More expert them I am I guess. :) I should have gone through the
    workshop help guide in more detail.
    Thanks
    Pete <[email protected]> wrote:
    I may have misunderstood as I'm not an expert, but don't you just
    create an ejb control in workshop, which exposes the methods in the
    ejb. Then that ejb control can be dropped into the web service?
    Pete

  • Is there any script in S1AS which generates Web services from ejbs in jar?

    I'm porting a J2EE app from WebLogic to S1AS7. The ISV uses Ant/XDoclet to do some code generation and build. One of targets in the build scripts is to take as input an EJB JAR file and create all the needed web service components and package them into a deployable EAR file using WebLogic's servicegen Ant task
    (http://edocs.bea.com/wls/docs81/webserv/assemble.html#1052126).
    Is there anything similar in S1AS?
    A quick response is greatly appreciated.
    Thanks
    Kishore

    We had looked into doing something similar, and this post is the closest we found.
    https://community.qualys.com/thread/11816
    Basically you will need a middle-man between Qualys and ConfigMgr to house the data. This may be a new database, or a whole seperate platform. I expect this could easily be done with SQL and SSRS.
    Also note, database edits to the ConfigMgr database are
    not supported  by Microsoft, I would recommend using a central system to pull data from Qualys and ConfigMgr without modifying either.
    Daniel Ratliff | http://www.PotentEngineer.com

  • Cant add Web Reference for web service

    Hi all.
    I cant seem to add a web reference to an outside web service.
    I have tested some code in Visual Studio and it all works fine, but
    now Im importing the code into my dreamweaver website.
    I have went to "Window" menu and then "Components", and along
    the right hand side the components tab opens. It has a drop down
    list with "Web Services" in it. Underneath it, it says press the
    "+" button to add the service. But there is no plus button! I have
    looked at manuals, and it does show a "+" sign beside the drop down
    box, but its not on my Dreamweaver!
    I am using dreamweaver 8. This is a full product as it is at
    my work.
    Any help would be great.
    Thanks, Paul.

    Hi all.
    Further to my previous post, I have noticed that my
    colleagues install of dreamweaver seems to have this "+" sign in
    the components panel, so I have tried to add the web service to the
    page using his machine.
    But I now come up with a different problem! I click on the
    "Add using WSDL" from the drop down lost at top, but when I click
    on the drop down for the "Proxy Generator" there is nothing in it.
    When I go into the menu to edit the proxy's, I can see the one for
    ASP.net VB which is the one I would be using, but when I click on
    "Done" and go back to the page with the WSDL URL and the proxy,
    nothing is showing in the proxy generator!
    Can anyone shed light on this?

  • Doc for 10g Web Services for EJBs

    I'm trying to determine if any documentation exists for 10gAS that discusses how to publish a statless session bean as a web service. The only thing I'm found so far is a tutorial called "Expose a Stateless Session EJB as a Web Service Endpoint through JAX-RPC interface", but I've found it lacking in detail and possibly incorrect. For example, it mentions a wsadmin tool that I don't see in the 10gAS release and it discusses how files like mapping.xml and webservices.xml can be created by JDeveloper. However, the 10g JDeveloper I downloaded doesn't see to support this.

    Unfortunately the doc is the how-tos right now. However, there are a couple of pointers - this article by Anirban Chatterjee - http://otn.oracle.com/tech/webservices/htdocs/j2ee14/jsr109.html - describes the configuration behind it.
    The JDeveloper interface is on the cusp of being released - it is just going through QA. I have written a tutorial on what it looks like here:
    http://otn.oracle.com/tech/webservices/htdocs/series/jaxrpc1/index.html
    But this tutorial is not linked publicly yet because it isn't released ... when the extension becomes available this link will be hooked up publicly. Please treat it as a preview right now.
    Could you describe the errors that you are encountering. There are a number of bugs that we have been collecting with the preview and we hope to do a refresh soon. It would be good to know if yours is a known one or not.
    Mike.

  • Import multiple rows with web services WSDL

    I want to write a procedure in which I can import multiple Datarows with multiple Datafields into a table.
    This procedure should be accessed by web service.
    Is it possible? How? Examples?
    Regards,
    Julien

    Hi Debbie,
    Whiel Creating table you need to be care full that use chose INPUT FIELD as the CELL EDITOR. Just guessing that if ur table is not editable u might have choosen TextView as default cell editor type.
    check link for details on TABLE UI
    [http://help.sap.com/saphelp_erp2005/helpdata/EN/b5/ac884118aa1709e10000000a155106/frameset.htm]
    easy way is to first add UI ELEMENT TABLE to your VIEW, then right click over it & select create binding from context. After you have a pop up where you can select what columns you want what should be its cell editor etc.
    Greetings
    Prashant

Maybe you are looking for

  • Calling RFC Function module from JAVA

    Hi All,    We have created a RFC Function Module for Billing Plan tab in Sales order (BDC). The function Module contains BDC. When we are running the same function module in SAP it is working fine. But when the FM is called in Java , it is allowing o

  • How to get the total record in the block before save them

    Hello, I need to recalculate the amout for all records in one block before saving them. How can I get it? Thanks for your helping

  • Cannot see my Leasing transaction in UI

    Dear All, when i am trying to check my transaction in Web -UI for a Z business role, but transaction is not appearing.

  • Block chinese characters in mail

    I am getting considerable amounts of spam written with Chinese characters. Is there a way to make a rule to send all to junk or spam folders? Thanks.

  • Lost my movies off my library.

    I have lost all my movies off my iTunes library and I can't figure out how to get them back. Can anyone help me out with this problem?