Well I think that depends on what your definition of integrate is. You aren't going to be able deploy and EAR to the CQ OSGI container. An EAR implies a deployment mechanism that isn't supported to my knowledge in OSGI. So you have a couple of options:
- Treat them as seperate applications and integrate them over the wire (they could either be deployed on separate application servers or in the same application server).
- Consider re-engineering your EAR file after the WSDL generates it to see if you can extract the relavant functionality into a OSGI bundle. Depending on exactly what the ear file does this may nor may not be possible or it may or may not be worth the effort.
In theory there are a number of other more advanced options that you could try, but I'd start with those two options for something that is generated by a WSDL.
If you meant deploying CQ in a EAR file to be deployed into an Application Server, yes you can. See on the docs about how to install CQ into an application server.
Is there a reason why you need an "ear" file ? So what is the task you want to fullfill.
For me it sounds like you want to integrate a jax-ws service inside a cq5 project. To achive that you have to integrate a jax-rs client in cq5.
One option to achive that is to integrate Apache CXF like documented here:
Samplecode can be found here: