9 Replies Latest reply on Oct 13, 2011 12:24 PM by Steve Cohen

    EJB-Web Service built with wsconsume will not deploy on JBoss

    Steve Cohen Newbie

      I am unable to deploy an EJB Web Service built with wsconsume on JBoss 5.1.

       

      I first created a simple hello-worldish POJO Web Service in top-down style from a hand-coded WSDL and Schema that I processed with

      wsconsume.

       

      This deploys and works just fine.

       

      I then copied my wsdl and schema to a new EJB project and modified all instances of the name in the WSDL to be something different i.e. Sample-->EJBSample.  Otherwise the structure of the WSDL and schema was identical.

       

      In this project I also ran wsconsume to build the server code.  This succeeded and the project built.

       

      I then also copied my hand coded service implementation to the new project and modified it as indicated in the Manning book "JBoss in Action",

      http://www.manning.com/jamae/chapter_9.pdf, section 9.3.1.

       

      The ejb will not deploy.  The error message is not very informative:

      09:57:51,225 WARNING [config] Unable to process deployment descriptor for context '/jbsv-ejb'

      I can't figure out what I've done wrong.

      I tried boosting up the logging levels on the relevant loggers and this also provided no clue as to what might be missing.

       

      Here are my implementations of the POJO and EJB services. 

       

      package org.javactivity.jbsv.demo;
      import javax.jws.WebService;
      import org.jboss.ws.annotation.SchemaValidation;
        
      @WebService(targetNamespace = "http://org.javactivity/SampleService", 
      portName="SampleServiceSOAP",
      serviceName="SampleService", 
      endpointInterface="org.javactivity.jbsv.demo.SampleServicePort")
      public class SampleServicePortImpl implements SampleServicePort {
          private static int nextSession = 0;
           @Override
          public int foo(UserTypeType usertype, String username, String key) {
              return ++nextSession;
          }
       }
      

       

      package org.javactivity.jbsv.ejb;
      import javax.ejb.Stateless;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
       import org.jboss.wsf.spi.annotation.WebContext;
      @Stateless
      @WebContext(contextRoot="jbsv-ejb", urlPattern="/ejb")
      @WebService(targetNamespace = "http://org.javactivity/EJBSampleService", 
      portName="EJBSampleServiceSOAP",
      serviceName="EJBSampleService", 
      endpointInterface="org.javactivity.jbsv.ejb.EJBSampleServicePort")
      public class EJBSampleServicePortImpl implements EJBSampleServicePort {
          private static int nextSession = 0;
           @Override
          public int foo(UserTypeType usertype, String username, String key) {
              // TODO Auto-generated method stub
              return ++nextSession;
          }
      }
      

       

      What am I missing?

        • 1. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
          Steve Cohen Newbie

          Actually, I believe the EJB does deploy on the server, but something in its deployment descriptor is lacking.  Wish I knew what that was:.

           

          10:11:50,060 INFO  [EJBContainer] STARTED EJB: org.javactivity.jbsv.ejb.EJBSampleServicePortImpl ejbName: EJBSampleServicePortImpl

          10:11:50,060 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

           

              jbsv-ear/EJBSampleServicePortImpl/local - EJB3.x Default Local Business Interface

              jbsv-ear/EJBSampleServicePortImpl/local-org.javactivity.jbsv.ejb.EJBSampleServicePort - EJB3.x Local Business Interface

           

          10:11:50,778 INFO  [WSDLFilePublisher] WSDL published to: file:/C:/apps/jboss-5.1.0.GA/server/attrsws0.1/data/wsdl/jbsv-ear.ear/jbsv-ejb-1.0-SNAPSHOT.jar/EJBSampleService665405518104220345.wsdl

           

          10:11:50,981 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=jbsv-ejb,endpoint=EJBSampleServicePortImpl

           

          10:11:51,028 INFO  [TomcatDeployment] deploy, ctxPath=/jbsv-ejb

          10:11:51,138 WARNING [config] Unable to process deployment descriptor for context '/jbsv-ejb'

          • 2. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
            Steve Cohen Newbie

            What I may be missing is a deployment descriptor (META-INF/ejb-jar.xml).  Originally there was NO deployment descriptor being included.  Simply adding one did not help.  However, other documentation indicates that it is optional with ejb 3.0.  And so, simply adding one does not work.  Something is missing from my deployment descriptor, either the added one or the one being pieced together out of my annotations.  What is the minimum I need in a deployment descriptor of either type?  That seems to be the question at hand.

            • 3. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
              Steve Cohen Newbie

              Dear Readers:

               

              I am losing my mind on this.  I have been all over Google looking at annotated examples of supposed web services built on EJBs.  I am now reduced to frantically trying this and trying that, once again.  Seems to be a regular occurence on the JBoss learning curve.  And nothing works.

               

              Nothing gets me over the hump of this @#$%^&* "WARNING [config] Unable to process deployment descriptor for context '/jbsv-ejb'".  I have no idea what it doesn't like.

               

              I can't find any complete example containing all the following elements:

               

              1. "Hello World" Web Service built with top-down model from wsconsume from wsdl.

              2. Deployed as EJB3 using annotations on JBoss 5.1 server.

               

              The examples in the JBossWS Testsuite that use EJB3 all use Style.RPC, which I can't use.  Is that the problem?  Does JBossWS support Style.DOCUMENT with EJB3?  I see examples that use Style.DOCUMENT in pojo Web Services, but none in EJB.

               

              Or maybe it's this:

              https://issues.jboss.org/browse/JBPAPP-6806  ?

              • 4. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
                Alessio Soldano Master

                I am losing my mind on this.  I have been all over Google looking at annotated examples of supposed web services built on EJBs.  I am now reduced to frantically trying this and trying that, once again.  Seems to be a regular occurence on the JBoss learning curve.  And nothing works.

                The jbossws testsuite includes many examples that are tested before any release, so they work for sure. Starting from them and looking at the authoritative documentation is a good idea.

                This said, the problem here might be related to the way the application is packaged, can you tell that? Btw, I see [1] where the same issue is caused by a descriptor in a wrong position as a consequence of an error in a book.

                Nothing gets me over the hump of this @#$%^&* "WARNING [config] Unable to process deployment descriptor for context '/jbsv-ejb'".  I have no idea what it doesn't like.

                I assume the deployment is failing for you after the WARNING, isn't it? Can you give some futher details on the exception you get?

                 

                I can't find any complete example containing all the following elements:

                 

                1. "Hello World" Web Service built with top-down model from wsconsume from wsdl.

                2. Deployed as EJB3 using annotations on JBoss 5.1 server.

                 

                The examples in the JBossWS Testsuite that use EJB3 all use Style.RPC, which I can't use.  Is that the problem?  Does JBossWS support Style.DOCUMENT with EJB3?  I see examples that use Style.DOCUMENT in pojo Web Services, but none in EJB.

                Of course document/literal syle is supported [2], both with EJB3 and POJO. The fact the tests in the jbossws testsuite all use rpc/literal is kind of a coincidence (most of them have been derived from the first ones by copying over the endpoint interface / impl, as that was probably not relevant for the test and keeping it as simple as possible was the important thing).

                 

                Or maybe it's this:

                https://issues.jboss.org/browse/JBPAPP-6806  ?

                No. Moreover that's a JBPAPP jira, so it refers to the JBoss Enterprise Application Platform. I assume you're using the 5.1.0.GA community version of JBoss, aren't you?

                 

                Regarding the need for ejb-jar.xml, yes, that's optional.

                 

                Again, try starting by the jbossws testsuite, pick something that is as close as possible to what you need and start changing what you need. Proceeding step by step might also help in finding where your problem is.

                 

                 

                 

                [1] http://community.jboss.org/thread/146501

                [2] http://community.jboss.org/wiki/JBossWS-UserGuide#DocumentLiteral

                • 5. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
                  Steve Cohen Newbie

                  Thanks, Alessio.

                   

                   

                  I assume the deployment is failing for you after the WARNING, isn't it? Can you give some futher details on the exception you get?

                  That depends on what your definition of failing is.  There is no exception thrown.  (How I wish there was, so I could gain some information about the problem).  But, the ws is not deployed and cannot be accessed.  I believe that the EJB itself is deployed, because it undeploys when I remove the ear.

                   

                  The fact the tests in the jbossws testsuite all use rpc/literal is kind of a coincidence (most of them have been derived from the first ones by copying over the endpoint interface / impl, as that was probably not relevant for the test and keeping it as simple as possible was the important thing).

                  It would be a nice thing if the Test Suite were expanded to include a document literal EJB3 example.  If I ever get this figured out, I may contribute one.

                  Again, try starting by the jbossws testsuite, pick something that is as close as possible to what you need and start changing what you need. Proceeding step by step might also help in finding where your problem is.

                  I'll give it a go.

                  • 6. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
                    Alessio Soldano Master

                     

                     

                    I assume the deployment is failing for you after the WARNING, isn't it? Can you give some futher details on the exception you get?

                    That depends on what your definition of failing is.  There is no exception thrown.  (How I wish there was, so I could gain some information about the problem).  But, the ws is not deployed and cannot be accessed.  I believe that the EJB itself is deployed, because it undeploys when I remove the ear.

                     

                    A good way on AS 5.1.0 to check the ws deployment succeeded is to have a look at http://localhost:8080/jbossws/services and see if the endpoint is listed and you can access the wsdl. Basically, given you're having issues with the contextRoot, that might influence the address you expect the endpoint to be available at. Afaics above, the WSDL has been published:

                     

                    10:11:50,778 INFO  [WSDLFilePublisher] WSDL published to: file:/C:/apps/jboss-5.1.0.GA/server/attrsws0.1/data/wsdl/jbsv-ear.ear/jbsv-ejb-1.0-SNAPSHOT.jar/EJBSampleService665405518104220345.wsdl

                    1 of 1 people found this helpful
                    • 7. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
                      Steve Cohen Newbie

                      I'm such an idiot!

                       

                      It never occurred to me to try the damned thing.  Actually, it did, but I was using the wrong URL.  That WARNING message threw me off.  The Web Service works, though. 

                       

                      08:40:10,694 INFO  [TomcatDeployment] deploy, ctxPath=/jbsv-ejb

                      08:40:10,851 WARNING [config] Unable to process deployment descriptor for context '/jbsv-ejb'

                      08:40:10,851 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/jbsv-ejb'

                       

                      Still, the warning is off-putting.  Is it spurious?  I still wonder why it occurs at all and what it means.

                       

                      And what is Mojarra?

                      • 8. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
                        Alessio Soldano Master

                        OK... that's what I suspected, an issue with the tested endpoint address.

                         

                        Mojarra is the reference implementation for Java Server Faces tech. I guess the warning comes from that, but that's a bit out of my expertise field, sorry.

                        • 9. Re: EJB-Web Service built with wsconsume will not deploy on JBoss
                          Steve Cohen Newbie

                          But I have to wonder, why would a JSF implementation be turned on by default for a Web Service application?  Can it be turned off?