Search code examples
web-servicesjakarta-eejax-wsweblogic12c

Issue deploying WebServices in WebLogic 12.2.1.1


We have complex javaee aplication. This application has many EJB 3 beans and some of these EJBs are exposed as WebServices (JAX-WS 2.1). The whole application is packeted into one EAR and all EJBs beans are defined in ejb-jar.xml descriptor.

We have switched from WebLogic 12.1.1.0 (JDK6) to WebLogic 12.2.1.1 (JDK8 u77). We have issue that WebServices won't deploy in WebLogic 12.2.1.1 anymore (EAR is however deployed without errors) - In WebLogic 12.1.1.0 we don't have this issues with WebServices deployment (same EAR).

We have successfuly tested deployment of WebService on WebLogic 12.2.1.1 with one simple test EAR (one EJB and one helloworld EJB exposed as WebService). If we create same helloworld WebService in our complex application (deployed on WebLogic 12.2.1.1) then this WebService is not deployed however EJB is successfully deployed.

Can we log/debug deployment of WebServices in WebLogic 12.2.1.1? We would like to find reason why our WebServices won't deploy in new WebLogic.

[WORKAROUND]

After stripping down EAR to only necessary dependencies we have found that the problem lies in @WebService annotation.

If we have class or interface annotated with @WebService which is not part of EAR EJB module e.g. JAR dependencies in lib folder of the EAR then Web Services will not deploy in WebLogic 12.2.1.1.

The question is now, if this WebLogic 12.2.1.x behavior is intended and can be somehow overriden with (standard or weblogic) descriptors or is this WebLogic 12.2.1.x bug?


Solution

  • [SOLUTION]

    Override WebServices annotation with help of deployment descriptors.

    To register WebService you need to register WebService ejb bean service-endpoint in ejb-jar.xml and put webservice.xml and weblogic-webservices.xml in EJB module of EAR.

    More about relation between ejb-jar.xml, webservice.xml and weblogic-webservices.xml descriptors can be found in Oracle documentation Packaging and Deploying Web Services