Thanks for the feedback Matej Novotny. The issue is not the order of CDI vs the web service start time. The issue is that both the WS client and server are in the same application, and during the injection of the WS client, it needs to find the WSDL which is generated in the server. However, the web service is not yet started because the app has not finished starting - and is blocked waiting for the WS client to find the WSDL – which it never will. This is a classic chicken-and-egg scenario. Instead, the application should be split into two applications (one for the WS server, one for the WS client). Then the WS server app can start first, and the WS client can obtain the WSDL in a more architecturally pure fashion. |