[jboss-user] [JBoss Web Services] - Deploying ws with custom JAXBContext

J Rosenberger do-not-reply at jboss.com
Fri Jun 18 14:02:54 EDT 2010


J Rosenberger [http://community.jboss.org/people/pulpo888] replied to the discussion

"Deploying ws with custom JAXBContext"

To view the discussion, visit: http://community.jboss.org/message/548766#548766

--------------------------------------------------------------
I believe the class you're referring to is org.jboss.wsf.spi.deployment.Endpoint.  This is what I was referring to when I said:

"JAXBIntroductions itself does this with a custom deployment aspect,  attaching the annotation reader to local deployment objects that don't  exist outside the deployment process."

JAXBIntros calls Endpoint.setAttachment.  See  http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.ws/jbossws-framework/3.3.0.CR2/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java#JAXBIntroDeploymentAspect http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.ws/jbossws-framework/3.3.0.CR2/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java#JAXBIntroDeploymentAspect

This class is not available to me before deployment, and I'm not sure how I can follow your suggestion to do it after deployment.  Deployment is impossible if JBoss does not recognize that my class is a web service.  Without the metadata (in annotations or some form), JBoss will try to deploy the class as a servlet, or it will fail.  It doesn't appear to deploy it as a "webservice waiting for its metadata."

If you think there's a specific trick to convince JBoss to do a two-step deployment here I'm willing to look at it.

Regarding your last sentence, remember there's no war for this ws, it's programmatic deployment (which is otherwise working ok).

So it really seems like I need to be able to provide metadata to the  deployment process.  There is a standard way to do this using the  JAXBContext and related classes.  I just haven't yet found an interface  or factory for injecting this into the deployment without writing my own  deploymentaspect as the JAXBIntros people were forced to do back then.   (See this thread from 2007, especially the second page:  http://community.jboss.org/message/284953 http://community.jboss.org/message/284953 ).

Maybe the JAXBContextFactory can somehow be used?  I haven't been successful at that.  And I don't want to affect all deployments, just the ones of this sort.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/548766#548766]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100618/ea1efaa0/attachment-0001.html 


More information about the jboss-user mailing list