Article written on EJB 3.0 , web services develop n deploy on JBOSS AS

Dear Friends
I would like to announce the article written on EJB 3.0 , web services development and deployment on JBOSS AS at the following location http://jamessmithjava.100webcustomers.com/index.html , I think this would help developers to increase interest on JBoss as well as EJBs
Regards
James
[email protected]
http://tech.groups.yahoo.com/group/james_smithjava

Dear Friends
I would like to announce the article written on EJB 3.0 , web services development and deployment on JBOSS AS at the following location http://jamessmithjava.100webcustomers.com/index.html , I think this would help developers to increase interest on JBoss as well as EJBs
Regards
James
[email protected]
http://tech.groups.yahoo.com/group/james_smithjava

Similar Messages

  • EJB 3.0 Web service fail to deploy when ws result is on a diff lib project

    I'm trying to develop a web service using EJB 3.0 with annotations. I'm using Netbeans 5.5 EE.
    The web service should returns an object declared on another Netbeans project.
    ( a library.jar).
    Netbeans compiles everything alright, although when I deploy the application into Glassfish it complains with an error saying that wsdl file for the web service wasn't found.
    If I move the returning object class into the same ejb project as the web service it works fine.
    So, can anybody explain what is happening ? Is it a bug of Netbeans, Glassfish, EJB 3.0, JAX-WS or newbie programmer ?

    I'm trying to develop a web service using EJB 3.0 with annotations. I'm using Netbeans 5.5 EE.
    The web service should returns an object declared on another Netbeans project.
    ( a library.jar).
    Netbeans compiles everything alright, although when I deploy the application into Glassfish it complains with an error saying that wsdl file for the web service wasn't found.
    If I move the returning object class into the same ejb project as the web service it works fine.
    So, can anybody explain what is happening ? Is it a bug of Netbeans, Glassfish, EJB 3.0, JAX-WS or newbie programmer ?

  • EJB 3.0 Web Service

    Hi!
    I tried to create a Web Service (through wizard) from existing EJB 3.0 Session Bean. Basicly, the wizard just added @WebService annotation to my existing code...
    Now, the problem is that simple methods like:
    @WebMethod
    public String helloWorld() {
      return "Hello World!";
    }works fine. Expect that if I use Local Interface for this Session Bean, the WSDL shows two helloWorld methods (and one is with exclamation icon showing some kind of problem with multiple methods with same name - but it is not true, I have one and the other one is just interface).
    But, when I want to expose my real business service methods like:
    @WebMethod
    public List<Employee> getEmployees() {
      return (List<Employee>)q.getResultList();
    }it doesn't work (the Web Service create wizard finishes ok but service doesn't work)! When I try "Test Web Service" (from Session Bean context-menu) or "Show WSDL for Web Service annotations" the error is thrown (Null pointer exception in WSDL).
    Basically, it looks to me that Web Service cannot use EJB Entities as parameters or results. Is this correct? I saw some examples on EJB 3.0 web services and there are entities routinely used as both input and output parameters.
    Can someone, please, explain me what I'm doing wrong here.
    Thanks in advance,
    Pedja
    P.S. In Web Service wizard, only SOAP 1.1 is enabled. How can I choose SOAP 1.2? And what EJB 3.0 bindings are in same context (SOAP 1.2 or EJB 3.0 bindings?)?

    Hi Frank,
    Most of those problems are resolved (NPE was due to Timestamp field, and two methods with the same name in WSDL because of not choosing to generate SEI in wizard, so the generated WSDL had one method from the Session bean and the other from it's Local interface). But, the errors should DEFINITELY be more descriptive.
    Does the wizard work correctly? I noticed plenty of "bug like" details. For example, if I choose to create asynchronous web service, later when I go to Properties the "Asynchronous Web Service" checkbox isn't checked. Also, the @WebMethod annotations are sometimes generated and sometimes not (even if the method is checked to be exposed).
    I am also getting these exceptions when I create a proxy for the asynchronous web service (I selected "Generate asynchronous methods for all operations"), could be I'm doing something wrong:
    WARNING: The parameter/return type "java.util.concurrent.Future" in the method
    "public abstract java.util.concurrent.Future<?>
    view.proxy.MyAsyncWebService1.queryDepartmentFindAllAsync(javax.xml.ws.AsyncHandler<view.proxy.types.QueryDepartmentFindAllResponse>)"
    is not supported. This method will not be exposed.
    WARNING: The parameter/return type "java.util.concurrent.Future" in the method
    "public abstract java.util.concurrent.Future<?>
    view.proxy.MyAsyncWebService1.returnEmployeeAsync(javax.xml.ws.AsyncHandler<view.proxy.types.ReturnEmployeeResponse>)"
    is not supported. This method will not be exposed.
    Exception in thread "main" java.lang.NullPointerException
         at com.sun.xml.bind.v2.runtime.Coordinator.popCoordinator(Coordinator.java:122)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.close(XMLSerializer.java:823)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:310)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:230)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:87)
         at oracle.j2ee.ws.common.databinding.runtime.jaxb20.Jaxb20Serializer.serialize(Jaxb20Serializer.java:218)
         at oracle.j2ee.ws.common.databinding.runtime.SerializerBase.serializeSequenceWrapper(SerializerBase.java:80)
         at oracle.j2ee.ws.client.jaxws.SoapRequestorSerializer.populateSoapMessage(SoapRequestorSerializer.java:89)
         at oracle.j2ee.ws.client.jaxws.WsClientProxyInvocationHandler.invoke(WsClientProxyInvocationHandler.java:184)
         at $Proxy11.returnEmployee(Unknown Source)
         at MyAsyncWebService1SoapHttpPortClient.main(MyAsyncWebService1SoapHttpPortClient.java:22)
    Process exited with exit code 1.Can anyone throw some light on this?
    Thanks,
    Pedja

  • EJB exposed as web services

    I am very new to web services.
    I understand that a Stateless bean can be exposed using RPC style web services.
    But I want to know if a stateless session bean can be accessed by EJB client and Web service client (java or non-java) simultaneously. ?
    i.e. 1. Can same bean serve two types of client simultaneously.(java and non-java client)
    2. Does this web service accept complex java object as input parameters. and how?

    Hi Patrik,
    > Exception raised from invocation of public void com.sap.sia.serviceMonitor.ServiceMonitorBean.initPostConstruct() method on bean instance com.sap.sia.serviceMonitor.ServiceMonitorBean@5a8ab489 ... ; nested exception is: java.lang.NullPointerException
    The NPE occurs in the bean code, in the initPostConstruct() method or some other method it calls. Unfortunately, its stack trace is not available above, but you should be able to find it in the defaultTrace file.
    HTH!
    \-- Vladimir

  • Overloaded ejb methods as web service

    I implemented an ejb as a web service. The ejb has 4 overloaded methods. When I looked at the generated wsdl, only one signature was exposed as a web service. Is there a way to make all 4 overloaded methods available to the web service ?

    Hi Sandy,
    The WLS 6.1 docs clear states that method overloading is not supported with WebLogic
    Web Services:
    http://e-docs.bea.com/wls/docs61/webServices/develop.html#1034539
    However, you might be able to simulate something similar by passing a org.w3c.dom.DocumentFragment
    to the method. For example,
    public org.w3c.dom.DocumentFragment overloadedMethod(org.w3c.dom.DocumentFragment
    variableArgs)
    This allows you to use the flexibility of XML to provide various input and output
    parameters for the method. In the method's implementation, you determine which
    arguments have been passed by parsing the variableArgs node. For quasi type safety,
    you could use the xsi:type attribute to associate data types with fragment elements.
    Note that you will need to use literal XML encoding to do this.
    HTH,
    Mike Wooten
    Sandy <[email protected]> wrote:
    I implemented an ejb as a web service. The ejb has 4 overloaded methods.
    When I looked at the generated wsdl, only one signature was exposed
    as a web service. Is there a way to make all 4 overloaded methods available
    to the web service ?

  • Stateless EJB expose as web service

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

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

  • EJB Web Services Packaging and Deployment

    I am new to Web Services on WebLogic as all my experience of Web Services have been on Apache Axis. My first question that I have an EJB that I would like to expose some of it's methods via a Web Service but the EJB is a part of an already deployed, or at least it's an external EJB of an existing app, how do I package and deploy my web service so that it interacts with the EJB properly but doesn't have to modify the existing application? Thanks, Jeremy

    Hello,
    Which version of EJB are you using? (EJB3 or 2.x)
    If you are using EJB3 you can directly expose your EJB as WS using annotations see the EJB3 page.
    The the binding coule be done with a simple java Proxy or a @WebServiceRef resource reference to a Java class.
    Are you using ADF ?
    If you are using ADF, the binding of the data source that could be an EJB or a Web Service is declarative using a data control
    - Learn ADF
    Regards
    Tugdual Grall

  • Difference between Web Service Developer and Web Compononent Developer?

    What's the difference between Web services Developer and Web Component Developer? What's their job description. I'm aiming to be a web application developer. Which track should I follow?

    Here is another article on J2SE vs JEE:
    http://www.velocityrevies.com/forums/t151124-what-is-j2se-vs-j2ee.html
    I believe the people who said JSE is only for desktop development are not correct, as well as their saying their are 2 kinds of developer (web service and component).
    As I understand it, web service developers provide a way to expose the data and functionality of a program written in a particular language (such as Java or C#) as XML documents to anyone subscribing to the service over the internet. The remote applications subscribing to the service therefore can be written in any other language. For example, imagine a Cobol program trying to get data from a program written in Java. Since both cobol and Java should have ways to parse XML documents, they don't have to know each other's syntax. There are many programs written in many many languages in the web and XML is a standard way for them to communicate. Web Services are an advanced topic and you shouldn't worry about it until you master web applications and/or desktop applications.
    As I understand it, a web component developer creates java widgets that produce some visual image with basic functionality associated with it. For example, an html button. These widgets are used by other developers for the presentation layer when creating a web application or desktop application. I'm not sure about this definition since I never messed with web component development. I suggest you keep way from this specialized area on concentrate on web applications and/or desktop applications.
    You can consider application development as devided into two general categories. Web development and Desktop development (there are others). Web development is further broken down into browser based applications and mobile device applications. I suspect their are more jobs in web development than desktop development. I therefore suggest you concentrate on browder based web development (just my opinion). However, each has their advantages and disadvantages over each other, depending on the task at hand(http://stackoverflow.com/questions/905365/desktop-development-versus-web-development)
    Disclaimer:
    http://myweb.accessus.net/~090/univdisc.html

  • Deploy a web service with the deploy tool (J2EE)

    Hi!
    I want to deploy a web service with the Deploy Tool (J2EE 1.4).
    (For info, I'm working on Win 2000.)
    I have the following error when I'm trying to deploy:
    distribute: C:\monHello2\monApp.ear
    Deploy action running...
    Deployment failed on target localhost:4848_server : Fatal Error from EJB Compiler -- jaxrpc compilation exception
    !!! Operation Failed !!!
    Someone can help me, please? What's the problem?
    Other question: when I create the WAR file, I have to add : my interface class, my implementation class, my others java classes, my WSDL file and my mapping.xml file.
    Should I add the .jar that is used by one of my class???? I think yes, but...
    thank you and excuse me for my english... ;o)

    Only primitive types can be returned? Is thatcorrect????
    true - for more details check out section 3.4.1.3 of
    this book which is available for purchase or online
    http://java.sun.com/blueprints/guidelines/designing_w
    ebservices/I meant to say primitive type and "special POJOs" called "JAXRPC Value Types" - check out the reference I listed

  • Web services Development

    A general question for the group (sorry if this is off-topic, if there's a better
    forum for this type of Q let me know).
    I'm a web services and web app developer who is new to BEA. In the past I've used
    toolkits like Axis for web services and I've always preferred this approach. It
    seems to me that using BEA I can develop Web Services in one of two ways. The
    'low-level' way where I could use the command line tools (or ant) to create, deploy
    and manage the code, or I could use WLW and the nice attribute driven approach.
    It strikes me (on first blush) that these techniques are not compatible, so if
    I choose one I have to stick with that, and I shouldn't (can't) mix and match
    the two.
    As a relative newcomer to this community which one should I choose?
    Which are people out there using?
    Can the approaches me mixed?
    What implications does using one or the other have in terms of deployment and
    the type of WLS I have installed?
    Again sorry if this is off topic, or an RTFM. If either of these is the case pointers
    to the FM would be appreciated.
    Thanks,
    Kevin Jones

    I think if you are looking for training in "BEA web services" then do
    it the WLW way.
    However, if you think your web service may be deployed to a non-BEA
    app server, then pick up the standards.
    This is true for regular web apps using struts vs. WLW's 'netui'
    and JSR 162 vs. WLW Portals as well.
    Kevin Jones wrote:
    Thanks Michael,
    anybody else have any comments?
    For example if you were looking for training in BEA web services would you expect
    it to be WLW or 'command line' based?
    Kevin
    "Michael Wooten" <[email protected]> wrote:
    Hi Kevin,
    The two web services development approaches are for two different audiences,
    so
    it's up to you to select which is more to your liking :-)
    Developers who are familiar with the Apache Axis Web Services Platform,
    will find
    lots of similarities in the Ant-scrpt based approach that the WLS 8.1
    Web Services
    Platform uses. This would also be the environment for those that really
    like to
    see that their code uses classes from a standard, like JAX-RPC or SAAJ.
    Workshop is really targeted at developers who are less interested in
    the mechanics
    of Web service construction, and more interested in what they want the
    web service
    to do. It offers developers with this mindset, almost complete isolation
    from
    the technologies associated with web service development (i.e. SOAP,
    WSDL, XML,
    etc.), while still producing a deployable web service that can interoperate
    with
    web services created by other Web Service stacks.
    Again, both of these approaches have healthy developer audiences, so
    I see no
    real reason to promote one over the other. Personally, I think it makes
    sense
    to become adept at both.
    All in all, I'd have to say that Workshop makes better use of the developer's
    time :-)
    Regards,
    Mike Wooten
    "Kevin Jones" <[email protected]> wrote:
    A general question for the group (sorry if this is off-topic, if there's
    a better
    forum for this type of Q let me know).
    I'm a web services and web app developer who is new to BEA. In the past
    I've used
    toolkits like Axis for web services and I've always preferred this approach.
    It
    seems to me that using BEA I can develop Web Services in one of twoways.
    The
    'low-level' way where I could use the command line tools (or ant) to
    create, deploy
    and manage the code, or I could use WLW and the nice attribute driven
    approach.
    It strikes me (on first blush) that these techniques are not compatible,
    so if
    I choose one I have to stick with that, and I shouldn't (can't) mixand
    match
    the two.
    As a relative newcomer to this community which one should I choose?
    Which are people out there using?
    Can the approaches me mixed?
    What implications does using one or the other have in terms of deployment
    and
    the type of WLS I have installed?
    Again sorry if this is off topic, or an RTFM. If either of these isthe
    case pointers
    to the FM would be appreciated.
    Thanks,
    Kevin Jones

  • Java Web Services Developer Pack, where is jwsdp.home defined?

    Hi.
    I am trying out the Web Services Developer Pack, and so far so good, a really nice package of tools, tutorials and examples.
    But there is one thing I do not understand regarding the Ant scripts for building the various examples.
    In most of the scripts, the ${jwsdp.home} is used, but where is it defined? I have looked everywhere, and the only place where I have seen it defined, is in the server.xml file that is used by Tomcat. And it seems somewhat strange that Ant should be dependant on Tomcat on this particular issue, so surely that cannot be it.
    It may seem like a unimportant question, but it is not, as I am purely beginning to use Ant, and need this information for when I'll begin writing my own scripts. Sure, I could just hardcode my app home path into the scripts, but that would be a ugly hack.
    Thanks in advance
    /Gabriel

    In the path c:\jwsdp-1.1\conf of my installation, the file server.xml includes this code:
        <!-- Absolute Pathname of the JWSDP Installation -->
        <Environment
                  name="jwsdp.home"
           description="Absolute Pathname of the JWSDP Installation"
                  type="java.lang.String"
                 value="C:\jwsdp-1.1"/>.. is that what are you looking for, is'n it?

  • Java Web Services Developer Pack 1.5 and SOAP?

    Hi all,
    I'm trying to figure out what, if any, support does Java Web Services Developer Pack 1.5 have for parsing and dealing with SOAP messages. I couldn't find any documentation or info in the tutorial about it, but founds some packages through JavaDoc that seem to deal with SOAP. Does anyone know what the deal is? Do you use this toolkit for SOAP, maybe even WS-security?
    Thanks for any pointers!
    Olia

    You can use JWSDP 1.3 but the minimum requirement form that toolkit is JDK 1.4. So you need to download the JDK 1.4 from http:/java.sun.com and install it first and after that you can install that JWSDP 1.3. Good Luck.

  • Java Web Services Developer Pack 1.3

    Does anyone know how I can remove Java Web Services Developer Pack 1.3 manually from my system? I have tried using add/remove and the system does not allow to remove the application.

    The link: Developer Survey
    on that page, doesn't work. :)
    -G

  • Java Web Services Developer Pack 1.3 and JDK 1.3.1

    Does anyone know if I can use Java Web Services Developer Pack 1.3 with JDK 1.3.1? The installation instructions only mention JDK 1.4.
    Thanks,
    Jerry

    You can use JWSDP 1.3 but the minimum requirement form that toolkit is JDK 1.4. So you need to download the JDK 1.4 from http:/java.sun.com and install it first and after that you can install that JWSDP 1.3. Good Luck.

  • Java Web Services Developer Pack v1.2

    I recently installed J2SE v1.4.2 Beta on my computer and it works fine with the platform, which is Windows XP Home Edition.
    Now, I like to learn Java Servlet Technology and had searched through the downloads pages. I found Java Web Services Developer Pack v1.2. But I have doubt about this: Is there any problem to run Java Web Services Developer Pack on Windows XP HOME Edition? I learnt that Sun engineers had it tested on Windows XP Professional Edition.
    I will appreciate any comments and opinions. Thanks in advance!

    doesn't mean it won't work on home edition. just means that they probably think anyone who might want to use J2WSDP will prob have Pro...

Maybe you are looking for

  • How do I delete an old email address from my apple ID?

    I have already tried adding and verifying a new email but I cannot delete the old email/AppleID. Icloud, itunes keep doign pop ups saying they cannot access my old email. Since I moved my Verizon cancelled my email account and has blocked my password

  • Case for iphone 6 plus with lightning to 30 pin adapter?

    I recently upgraded to a iPhone 6 plus from an iPhone 5.  I have been using the square lightning to 30 pin adapter to adapt the 30 pin plugs on both my bedside clock radio/dock for overnight charging and in the glovebox connector in my 2013 VW Jetta.

  • DVD/CD-ROM Not working

    My 1 day old (aka NEW) computer does not see the DVD/CD-ROM. the driver says "windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (code19) What do I do to fix this?

  • Where are my Photos stored if I want to access them through a third party

    Hello! I want to be able to back up my photos from the new Photos for OS X using a third party - such as Google+ Auto Backup.  I am trying to point Google+ to the source of my photos, but can not figure out where they are located in the Finder!! The

  • JVM SIGSEGV error running Java 1.5.0_01 on linux

    Three times last week we had the JVM come down hard with a SISSEGV error running our web application. Each crash was on a different machine. The offending thread was always in libnet.so shared library handling either a getHostByAddr() or getLocalHost