cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hoffer <dhoff...@gmail.com>
Subject Re: How to host CXF webservice in Tomcat war
Date Mon, 19 Aug 2013 01:44:39 GMT
Thanks, I'll be sure to checkout TomEE too.

-Dave


On Sun, Aug 18, 2013 at 8:24 AM, David Blevins <david.blevins@gmail.com>wrote:

> Hi David!
>
> You might also check out TomEE which is Tomcat with CXF integrated.  Here's
> a demo from JAXConf this June that shows a simple web service.  Skip to 21
> minutes in to see the @WebService part.
>
>  -
> http://jaxenter.com/apache-tomee-javaee-6-web-profile-on-tomcat-47873.html
>
> Glen, truly impressive blog you have!  Wow.
>
>
> -David
>
>
>
> On Fri, Aug 16, 2013 at 9:23 PM, David Hoffer <dhoffer6@gmail.com> wrote:
>
> > I have a CXF webservice that I need to now host in Tomcat webapp.  I'm
> > using the 'code first' approach where I have Java pojos, annotated for
> CXF
> > webservice, e.g.
> >
> > @WebService()
> > @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use =
> > SOAPBinding.Use.LITERAL)
> > @XmlJavaTypeAdapter(WebServiceAPIAdapter.class)
> > public interface IWebServiceAPI {
> >     public WebOutput calc(@WebParam(name = "webInput") WebInput
> webInput);
> > }
> >
> > Which previously I hosted in standalone Jetty server, e.g.
> >
> > WebServiceAPI implementor = new WebServiceAPI();
> > JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
> > svrFactory.setServiceClass(IWebServiceAPI.class);
> > svrFactory.setAddress("http://IP:port/namespace");
> > svrFactory.setServiceBean(implementor);
> > server = svrFactory.create();
> >
> > That all works well but now I need to do the same in Tomcat, so I assume
> > the code and @WebService annotation is the same?  But how do I now
> > host/deploy this in war?  E.g. I don't need any server with IP
> address/etc.
> >  Rather I want to deploy in war so IP:port is already defined by the
> > container just need the rest of this.
> >
> > How do I transition to Tomcat/war?
> >
> > Also I might mention that I need the resulting auto generated WSDL to
> > generate schema for the WebOutput result object as that is a nested Java
> > POJO...again this works fine in standalone Jetty server just need the
> same
> > in war.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message