EJB to Webservice

Hi,
This is a very n00b question and I feel like I am missing something obvious. But I just can't find anything to help me. I have EJB that I want to expose as a Web Service and I also need to write an ANT build script to build the project and package the classes into WAR.
I am very green when it comes to ANT and have only developed Web Services using AXIS for Tomcat but now have to use RAD6 and use Websphere. I am totally lost an my googles searchs haven't lead anywhere either. Any hint/help would be much appreciated. Thank you

I am also having the same problem... trying to revive this thread? any solutions out there?

Similar Messages

  • DB access in Web Dynpro Portal Service / or EJB with WebService ?

    Hi,
    I will develop a web dynpro application which will run in the EP and use an DB. How are the best practices in this scenario ? Should I use a Web Dynpro Model (EJB or WebService) for the persistence operations or should I use Portal Services ?
    Regards
    Flo

    Thanks,
    ok some words more... , I want to find out the differences between VC, PDK and Web Dynpro. Most of the parts of the application will be written in Web Dynpro. It´s possible to access portal services in Web Dynpro. But not with a Web Dynpro Model, so will going to use EJB/Webservice.
    But here I have one more question... I am wondering why EJB a n d Webservice in combination !?!? Can´t I only write a Webservice o r a EJB to achieve the DB connectivity ?
    Thanks
    Flo

  • How to inject EntityManager in non-EJB based WebService?

    Hi,
    I want to know how we can inject EntityManager in non-EJB based WebService?
    Regards,
    imran

    I think the way to go would be to actually do use an EJB for the persistence stuff and use that EJB in your webservice. Use the right tool for the job and all that.

  • Problem in creating EJB and WebService using complex class structure

    Hi All,
    My requirement is like :
    I have a class with very complex structure.
    I have also used external .jars.
    Now when I have created an EJB with a method's return parameter as above class.
    But when I am creating a Webservice, it doesnot allow me to select this method.
    Not able to configure why ?
    Please Help.
    Thanks.

    Hi,
    I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
    You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved.

  • Deploying ejb with webservice annotation problem

    I have the following code:
    HelloInf.java:
    package com.bekijkhet;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.jws.WebService;
    @WebService
    public interface HelloInf extends java.rmi.Remote {
    java.lang.String sayHello()
    throws java.rmi.RemoteException;
    Hello.java:
    package com.bekijkhet;
    import javax.ejb.Remote;
    @Remote
    public interface Hello {
    public String sayHello();
    public String sayHelloRemote();
    HelloLocal.java:
    package com.bekijkhet;
    import javax.ejb.Local;
    @Local
    public interface HelloLocal {
    public String sayHello();
    public String sayHelloLocal();
    HelloBean.java:
    package com.bekijkhet;
    import javax.ejb.Stateless;
    @Stateless
    public class HelloBean implements Hello,HelloLocal,HelloInf {
    public String sayHello() {
    return "Hello World!!!!";
    public String sayHelloLocal() {
    return "Hello Local World!!!!";
    public String sayHelloRemote() {
    return "Hello Remote World!!!!";
    When I compile these, add them to a jar and try to deploy them to a standalone oc4j 11g container I don't see the Webservice. I do see the EJB. Why isn't the webservice annotation picked up?
    BTW: I use jdk 6 u03.
    Mvg Andre Broers

    Hi,
    since there is no enterpise manager in OC4J 11 I am wondering how you verifying the non existence of the WebService. Just asking because I need a clue how to verify this issue.
    Frank

  • Problem when using JPA/EJB in webservice

    I wrote a web service that use JPA/EJB to connect to Sybase (the existing tables), and deployed to OC4J, but it got the following error when the web service is invoked:
    <env:Envelope
      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns0="http://prjtestws_9/types/">
     <env:Body>
      <env:Fault>
       <faultcode>env:Server</faultcode>
       <faultstring>Internal Server Error (Caught exception while handling request: java.lang.NullPointerException)</faultstring>
      </env:Fault>
     </env:Body>
    </env:Envelope>
    I have checked that, the query will return some records, and also it works fine if the program executed as a stand alone application.
    Thanks in advance

    I find that I can only have ONE webservice that using JPA/EJB for an OC4J instance, if more than one then the above error will come out, and I have to restart the OC4J instance to run another webservice that using JPA/EJB.
    Is there any solution for this issue?
    Thanks

  • How to put conditions like minoccurs=1 in EJb generated webservice(WSDL)

    i created a Webservice from EJB,But where i will put conditions like minoccurs=1,...
    this is my function
    @WebMethod(operationName = "addEntry")
    public Reply addEntry(@WebParam(name = "username") String username, @WebParam(name = "password") String password, @WebParam(name = "entryName") String entryName, @WebParam(name = "entryAge") String entryAge) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi(Bonjour)!
    sharronsuss wrote:
    Bonjour et merci, Michel - I've been playing around in International Preferences, but can't seem to get a Keyboard Viewer (in any language) to show itself. The Mac onscreen help window doesn't seem to relate to my actual options, so I think I will go to the general OS forum.
    Look in the menu bar, there should be a little flag representing your language keyboard setup. It's a menu. Use it to activate the "show keyboard layout..." (May be it's other terms as I use mine in french.
    Once this keyboard layout viewer is open (it will open over any application so you can use it anytime), you can use the command, shift, option keys or combo of those keys on your keyboard and see all combinaisons in the layout window (example: in french layout, I have to use ALT-G to do a copyright symbol: © ). (for the history: Mac has always contained a keyboard viewer from system 1.0 )
    Close the keyboard layout and use the key combinaison to type the desired symbol.
    The widget is faster, it opens a list of all characters in the font set.
    From your current text editor (or from FCE title generator), invoque the "characterpal" widget and simply look at the key combinaison to get the desired character .
    Michel Boissonneault

  • EJB and webservices

    Has anyone experienced problems with EJB published as a webservices when methods has parameters of type array?
    I tried also byte[], Byte[], Int[], int[]. I think that the webservice can not find the length of the parameter, because  when I use byte[] or int[] I get an ArrayOutOf Bounds, and when I use Byte[] or Int[] I get NumberFormatException. I use the soap dispatcher of the SAP J2EE to publish the EJB.
    When I use a portal service and a web service it works fine, but I have problems with multiple calls at the same time.
    If anyone has an ideal please help.
    Best Regards,
    Lucian.

    Hi,
    this information is extracted for the devmanual of the SAP J2EE 6.20. this is the one I'm using.
    By default the framework can automatically handle the following types:
    • All Java simple types - byte, short, int, long, char, float, double,
    boolean, along with their wrapper classes - Byte, Short, Integer, Long,
    Character, Float, Double, Boolean.
    • java.lang.String
    • Arrays of any value and dimension
    • Java Bean Styled objects – These are classes, which only meaningful
    parameters are either public variables, or get() or set() methods. By
    default this is used to handle all kinds of special objects, which do not have
    any DataMarshaller associated.
    • For all kinds of classes, which do not fall into these categories, there is a
    DataMarshalling framework, which allows serialization or deserialization and
    correct WSDL generation for any user class, by providing user
    DataMarshallers.
    I think the problem is not there..... As I said one of my solution doesn't really uses the portal platform for the server side, only the SAP J2EE server.
    Best Regards,
    Lucian.

  • Closing ejb based webservice created http sessions

    I have few ejb based web services deployed on netweaver application server 7.0.As per my understanding nw deploys a web service as a web application which means its gonna get hosted by a web container.Now as this is a web app when an external system makes a call to this service a httpsession is opened up .I would like to monitor these httpsessions which get opened up on receving requests for these services from different clients.I went to web container option inside sap mmc but no luck.There is one option called currenthttpsessions but this always remains greyed out.Also i want to make sure that this http session should get closed once that request is processed.I doubt this is not happening right now on the setup which i have.

    I am also having the same problem... trying to revive this thread? any solutions out there?

  • EJB"s as webservices

    Hi,
    we are supposed to build an service from scratch using web services. so i suggested, to build the service using ejb3 and then deploy it as a web service. But now few questions are pondering me:
    1) If ejb has some hashmap and hashtable datatype in it, then how error prone will they be when converted in wsdl file
    (web services).
    2) There are frequent data exchange in the services... So performance wise, how good decision will it be to implement ejb as webservices..

    Hi,
    The recompilation of EJB may be triggered by a lot of reasons. But appc should help on reduce of recompilation when deployment. If appc didn't help, that would be a bug.
    Could you please send me your application? Is it a very large file?
    My email addr: [email protected]
    Edited by yyang at 12/25/2007 6:21 PM

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Webservices: excluding some methods of EJB

    Hello,
    I am using WLS 8.1sp4 and currently generating the Webservices for our stateless session EJBs using servicegen and clientgen ant tasks.
    We have a requirement for not exposing certain methods of the EJBs as webservice operations.
    I couldn't find a way to do that using servicegen. Have anyone done that using servicegen ?
    I did see the source2wsdd task uses the javadoc tag wlsexclude (not the exact tag name but something similar) in the EJB code to exclude the method.
    I do not want to modify the EJB code to add this tag so I was wondering if there is way in any of the weblogic Ant tasks to do that.
    Thanks,
    Kannan

    Hi Kannan ,
    Ant task Introspects the EJBs and Java classes, looking for public methods to convert into Web Service operations.
    The Attributes of the <service> Element of the servicegen Ant Task
    1) excludeEJBs: specifies Comma-separated list of EJB names for which non-built-in data type components should not be generated.
    If you specify this attribute, the servicegen task processes all EJBs except those on the list.
    The EJB names correspond to the <ejb-name> element in the ejb-jar.xml deployment descriptor in the EJB JAR file (specified with the ejbJar attribute).
    2)expandMethods:Specifies whether the servicegen task, when generating the web-services.xml file, should create a separate <operation> element for each method of the EJB or Java class, or whether the task should implicitly refer to all methods by specifying only one <operation> element that contains a method="*" attribute.
    Valid values are True and False. Default value is False.
    Note: We can exclude the ejbs but I could't find information about exclude the methods of ejb.
    Go through the following link, you will find related information regarding this.
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1063540
    ----Anilkumar kari

  • EE5 + WebServices + EJB + EJB3 Entity = cryptic exception at deployment

    Symptom my web service works fine when declared as a EJB (@Stateless +@WebService)
    It doesn't work anymore if place it into a web application which is attached to
    the an enterprise application. (@WebService only)
    The exception is below I've replaced the name of my class with <<An Entity v3.0 here>>.
    Of course if I remove (@WebService) on my webservice the "enterprise application" gets deployed without problem.
    Does anyone have an idea for where to investigate or where to report?
    Thanks
    /Alex
    Exception occured in J2EEC Phase
    java.lang.NoClassDefFoundError: <<An Entity v3.0 here>>
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2426)
    at java.lang.Class.privateGetPublicMethods(Class.java:2546)
    at java.lang.Class.getMethods(Class.java:1409)
    at com.sun.xml.ws.modeler.RuntimeModeler.determineWebMethodUse(RuntimeModeler.java:288)
    at com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:304)
    at com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249)
    at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:631)
    at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
    at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
    at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:42)
    at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1740)
    at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2004)
    at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:328)
    at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:332)
    at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:182)
    at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129)
    at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
    at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
    at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)

    The entity is located into another archive, here's the the structure
      EnterpriseApplication
        |--- Web Application (where my problematic WebService is)
        |--- EJB Module (where my Facade are and the problematic 3.0 POJO is)I identified the problem and did workaround
    One of the WebService method is using a bean to pass data to the web-method, this bean references (as transient) the EJB 3.0 POJO, and the ws compiler does not like at deployment time. So I've split my bean in two, and I do inheritance between the two the father is used for the webservice method, and the child is used as the actual implementation and is the one instanciated in the code.
    I've built a sample application that reproduces the problem.
    Should I report this somewhere and/or create a ticket?

  • EJB webservice -- getting client IP

    Hi,
    I am trying to obtain the IP address of the client calling an EJB based webservice. After some reading on related topics, I think I have to create a handler class and try to retrieve the IP address there.
    Can someone tell me if the MessageContext parameter of handleRequest contains the client IP address...if yes, then what's the property name?
    Thanks!

    656 hits and no reply...
    Bump!

  • Call Weblogic WebService in Delphi

    Hi, I'm a newbie in WebService. I use Weblogic servicegen ant task wrap a stateless
    EJB to webservice. The bean has a method with a string input parameter as follow:
    String Test(String inputParam);
    The WSDL generated by Weblogic WebService is like follow:
    - <message name="Test">
    <part name="string" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:string"
    />
    I use Delphi as Webservice client. When I use Delphi's WSDL Import Wizard, it
    renamed parameter "string" to "string_" because of "string" is a reserved word
    in Delphi. So when I invoked the Webservice, an exception was thrown:
    Found SOAPElement [<string_ xsi:type="xsd:string>test</string_>]. But was not
    able to find Part that is registered with this Message which corresponds to this
    SOAPElement
    How can I solve this problem? On the another word, Can I control the parmater
    name generate by Weblogic Webservice ant task?
    thanks very much!

    Please post web services issues in the webservices newsgroup.
    Vimala wrote:
    You can define the parameter name to the method and return parameter name with
    a web-services.xml.
    The link below should give a good start:
    http://e-docs.bea.com/wls/docs70/webserv/dd.html#1057960
    Vimala
    "Dumack Wu" <[email protected]> wrote:
    Hi, I'm a newbie in WebService. I use Weblogic servicegen ant task wrap
    a stateless
    EJB to webservice. The bean has a method with a string input parameter
    as follow:
    String Test(String inputParam);
    The WSDL generated by Weblogic WebService is like follow:
    - <message name="Test">
    <part name="string" xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string"
    />
    I use Delphi as Webservice client. When I use Delphi's WSDL Import Wizard,
    it
    renamed parameter "string" to "string_" because of "string" is a reserved
    word
    in Delphi. So when I invoked the Webservice, an exception was thrown:
    Found SOAPElement [<string_ xsi:type="xsd:string>test</string_>]. But
    was not
    able to find Part that is registered with this Message which corresponds
    to this
    SOAPElement
    How can I solve this problem? On the another word, Can I control the
    parmater
    name generate by Weblogic Webservice ant task?
    thanks very much!
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

Maybe you are looking for

  • Access to a external time capsule through my home time capsule

    How can I access my parents timecapsule through my own at home? I have no problems in accessing my own time capsule through for example the network at work (using Automator - and a quite old apple Airport/router). But if I'm at home, and on the home

  • Missing fields in Goods Receipt PO from SAP SDK after upgrade

    Hi there, I am using VB.net 2003 with SAP 2005 PL 20 and SQL 2005 We have upgraded the Patch level of SAP 2005 from Patch Level 4 to Patch Level 20. After the upgrade I executed the same source on the new Patch level the SDK didn't pick up existing f

  • Quick iTunes 7 Installiation Question. Please Read (WIN 32 HELP)

    Every time i try to update to itunes 7, i get an error message saying that the product is not supported by Win32. Please help because i want to buy songs, but i can't seem to update to iTunes 7. I would really appreciate the help! Thank You. P.S. I H

  • I ordered prints in aperture but they never came. How can I check on the status?

    I ordered prints on Aperture. It was an expensive order. I got a confirmation screen but no email. Its now been 2 weeks so I can assume they aren't coming. How can I be sure? I want to cancel the order so I can print them locally.

  • About iTunes File Size

    In the finder my iTunes folder is just under 20 gigs, but according to iTunes I have about 13 gigs of music with only a few small videos, etc. Where is this 7 gigs going?