1 2 Previous Next 15 Replies Latest reply: Aug 10, 2004 4:55 PM by elizabeth roush RSS

WSRs Inside EARs Do Not Deploy

Jimmy Wilson Apprentice

I have a WSR that when copied to the "deploy" directory deploys correctly. If I place this WSR in the EAR that contains the EJB that it depends on, the web service is never deployed. If I just place the web-service.xml file contained in the WSR in the EAR's meta-inf directory, it deploys correctly as well.

Since almost every example I have seen indicates that WSRs can be deployed in the EAR, I figure that either I am doing something completely wrong (unlikely since the WSR deploys correctly by itself) or I may have found a bug (but no such bug is reported in the JBossSOAP category on Sourceforge).

I would think that someone else would have experienced this problem by now, so can anyone offer an explanation or describe what is necessary to make this work in JBoss 3.2.3?

  • 1. Re: WSRs Inside EARs Do Not Deploy
    darren hartford Expert

    Confirm, I tried this about a month ago with the same results. The meta-inf sort-of worked for me, but since I use the xdoclet tags and have multiple WSR/mulitple webservice tags it was an ineffecient way of doing this with the EAR and ended up doing the normal JAR/WSR deployment.

    -D

  • 2. Re: WSRs Inside EARs Do Not Deploy
    James Clover Newbie

    I do this all the time, and it works fine for me.

    What's the structure of your .ear?

  • 3. Re: WSRs Inside EARs Do Not Deploy
    Jimmy Wilson Apprentice

    I am really glad to hear that someone else has managed to get this working! Any help you can give is much appreciated! Here's the structure of a sample EAR that I have (whose WSR will not deploy):

    PHONEAPPEND.EAR
    +---META-INF
    | application.xml
    | MANIFEST.MF
    |
    +---pa21.jar
    | | jcaframework.jar
    | | pa21.jar
    | |
    | \---META-INF
    | MANIFEST.MF
    | pa21-ds.xml
    | ra.xml
    |
    +---phoneappend.jar
    | +---com
    | | \---acxiom
    | | +---arch
    | | | \---datatypes
    | | | Address.class
    | | | ConsumerName.class
    | | | Phone.class
    | | |
    | | +---ejb
    | | | \---pa
    | | | NoMatchException.class
    | | | PAException.class
    | | | PhoneAppend.class
    | | | PhoneAppendBean.class
    | | | PhoneAppendHome.class
    | | | PhoneAppendLocal.class
    | | | PhoneAppendLocalHome.class
    | | |
    | | \---s4arch
    | | \---basetypes
    | | Address.class
    | | ConsumerName.class
    | | Phone.class
    | |
    | \---META-INF
    | ejb-jar.xml
    | jboss.xml
    | MANIFEST.MF
    |
    \---phoneappend.wsr
     \---META-INF
     MANIFEST.MF
     web-service.xml
    

    Do you think it would be helpful for me to post the contents of any of the deployment descriptor files? The only file that would seem to be relevant would be application.xml (since the WSR works outside the EAR), but there is no tag supporting web services available in the J2EE 1.3 application.xml DTD, and as I understand it, WSRs are a JBoss only thing anyway.

  • 4. Re: WSRs Inside EARs Do Not Deploy
    Jimmy Wilson Apprentice

    One minor mistake: the top-level pa21.jar file indicated is actually named pa21.rar.

  • 5. Re: WSRs Inside EARs Do Not Deploy
    tperrigo Newbie

    I had a problem when I was accidentally including the web-service.xml file in my ejb's META-INF. When I did so, jboss failed to deploy my bean (there was no error, it just didn't do anything). As soon as I modified my ant build to exclude the web-service.xml from the ejb's META-INF, my ear deployed without issue.

  • 6. Re: WSRs Inside EARs Do Not Deploy
    Jimmy Wilson Apprentice

     

    "tperrigo" wrote:
    I had a problem when I was accidentally including the web-service.xml file in my ejb's META-INF. When I did so, jboss failed to deploy my bean (there was no error, it just didn't do anything). As soon as I modified my ant build to exclude the web-service.xml from the ejb's META-INF, my ear deployed without issue.


    I think that I read your post in reviewing this forum before posting, but since it does not appear (given the EAR expansion in previous posts) that I do not have a copy of web-service.xml in my EJB (phoneappend.jar), I do not think that this is my particular issue. Thanks for the suggestion anyway though. I will always check this to make sure if I experience similar issues in the future.

  • 7. Re: WSRs Inside EARs Do Not Deploy
    Jimmy Wilson Apprentice

    On a whim, I just confirmed that the problem is still present in JBoss 4.0DR3. WSRs when contained inside EARs do not deploy.

  • 8. Re: WSRs Inside EARs Do Not Deploy
    billen Newbie

     

    "jiwils" wrote:
    Do you think it would be helpful for me to post the contents of any of the deployment descriptor files? The only file that would seem to be relevant would be application.xml (since the WSR works outside the EAR), but there is no tag supporting web services available in the J2EE 1.3 application.xml DTD, and as I understand it, WSRs are a JBoss only thing anyway.


    It works for me, too. Can you please post the content of your application.xml?

  • 9. Re: WSRs Inside EARs Do Not Deploy
    Jimmy Wilson Apprentice

    Here's my application XML:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!DOCTYPE application PUBLIC
    '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
    'http://java.sun.com/dtd/application_1_3.dtd'>
    
    <application>
     <display-name>PhoneAppend</display-name>
     <description>A simple PhoneAppend app.</description>
     <module>
     <ejb>phoneappend.jar</ejb>
     </module>
     <module>
     <connector>pa21.rar</connector>
     </module>
    </application>
    


    Are you using JBoss 3.2.3?

  • 10. Re: WSRs Inside EARs Do Not Deploy
    billen Newbie

    You haven't added the WSR file to the application.xml file. Add this and it should work:

     <module>
     <java>phoneappend.wsr</java>
     </module>
    


  • 11. Re: WSRs Inside EARs Do Not Deploy
    billen Newbie

    It works for me in both JBoss3.2+ and JBoss4.

  • 12. Re: WSRs Inside EARs Do Not Deploy
    Jimmy Wilson Apprentice

    Thank you very much for your help!

    I went back and read the parts of the J2EE 1.3 spec related to the tag in application.xml. It states that the "java element specifies the URI of a java application client module, relative to the top level of the application package." Is a web service a java application client module? I suppose that I can basically understand that since clients will use the web service, but I think that might be stretching this definition. Is this the intended use of the tag, or was this a best fit type of scenario (with no other alternative)?

    Can anyone point me to more information on this?

    Regardless, thanks to all for your help!

  • 13. Re: WSRs Inside EARs Do Not Deploy
    tperrigo Newbie

    I think you also need to include the wsr in your application.xml:


    phoneappend.wsr


    Also-- I haven't confirmed this yet, but there seems to be some odd behavior regarding the order in which things appear in the app xml. When I had an ejb module following the wsr module, the ejb would not deploy. When I rearranged the application.xml so that all ejb modules appear before the wsr module, everything deployed successfully...

  • 14. Re: WSRs Inside EARs Do Not Deploy
    tperrigo Newbie

    Oops...sorry for the duplicate response. For some reason I didn't see the other responses!

1 2 Previous Next