tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Deploying JAX-WS/JAX-RS services on TomEE+
Date Wed, 01 Feb 2012 12:34:16 GMT
yep,

TomEE doesn't deliver spring, the JEE container contains the IOC itself.

when it starts the container scans all .class, that's why @Stateless,
@WebService and so on doesn't need any declaration.

- Romain


2012/2/1 Isuru Suriarachchi <isurues@gmail.com>

> On Wed, Feb 1, 2012 at 5:30 PM, Romain Manni-Bucau <rmannibucau@gmail.com
> >wrote:
>
> > i think the url is
> > http://localhost:8080/simple-ws/webservices/CalculatorImpl?wsdl<
> > http://localhost:8080/test-ws/webservices/CalculatorImpl?wsdl>
> >
>
> Yes it works. Thanks Romain for the help..
>
> One more question, AFAIK, normal CXF webapps runs completely on Spring. And
> also, we have to add the service class into a bean configuration. But on
> TomEE+, looks like it's not the case and there's no connection with Spring.
> Please correct me if I'm wrong.
>
> Does it scan through all .class files and identify the service class using
> @WebService annotaiton?
>
> ~Isuru
>
>
> >
> > you should get a line like:
> > Webservice(wsdl=
> http://localhost:8080/simple-ws/webservices/CalculatorImpl
> > ,
> > qname={http://superbiz.org/wsdl}CalculatorWsService) -->
> > Ejb(id=CalculatorImpl)
> >  in the logs.
> >
> > - Romain
> >
> >
> > 2012/2/1 Isuru Suriarachchi <isurues@gmail.com>
> >
> > > I just tried it without any luck. Copied the attached war file into
> > > webapps directory and tried to access the following URLs for which I
> get
> > > 404s.
> > >
> > > http://localhost:8080/simple-ws<
> > http://localhost:8080/simple-ws/CalculatorWsService?wsdl>
> > > http://localhost:8080/simple-ws/CalculatorWsService?wsdl
> > >
> > > And also I don't see any error logs.
> > >
> > > Can you please try and let me know?
> > >
> > > Thanks,
> > > ~Isuru
> > >
> > > On Wed, Feb 1, 2012 at 4:55 PM, Romain Manni-Bucau <
> > rmannibucau@gmail.com>wrote:
> > >
> > >> i think simply create this folder:
> > >> afolder/
> > >>  WEB-INF
> > >>        classes
> > >>        lib
> > >>            simple-webservice.jar
> > >>
> > >>
> > >> and paste it in webapps folder
> > >>
> > >> - Romain
> > >>
> > >>
> > >> 2012/2/1 Isuru Suriarachchi <isurues@gmail.com>
> > >>
> > >> > My war file is too big to be attached in the mail.
> > >> >
> > >> > Anyway it'll be great if you can tell me how I can deploy the sample
> > >> > service given at [1] on TomEE+ and access the WSDL.
> > >> >
> > >> > Thanks,
> > >> > ~Isuru
> > >> >
> > >> > [1]
> > >> >
> > >> >
> > >>
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/simple-webservice/
> > >> >
> > >> > On Wed, Feb 1, 2012 at 3:45 PM, Romain Manni-Bucau <
> > >> rmannibucau@gmail.com
> > >> > >wrote:
> > >> >
> > >> > > to get the wsdl url simply look the look, you should get some
url
> > for
> > >> > each
> > >> > > WS and then simply add ?wsdl at the end.
> > >> > >
> > >> > > i know we change some behavior on WS but i can't remember if
it is
> > in
> > >> the
> > >> > > version you are using: now we deploy in the webapp context (so
it
> > >> needs a
> > >> > > webapp) excepted if you added the system property
> > >> > > -Dtomee.jaxws.oldsubcontext=true and with this property the WS
> will
> > be
> > >> > > deployed in the root context (
> > http://localhost:8080/MyWebService?wsdl
> > >> ).
> > >> > >
> > >> > > So i think the easier way is to start with a webapp.
> > >> > >
> > >> > > If you can share any webapp code i could try and maybe help you
a
> > bit
> > >> > more.
> > >> > >
> > >> > > - Romain
> > >> > >
> > >> > >
> > >> > > 2012/2/1 Isuru Suriarachchi <isurues@gmail.com>
> > >> > >
> > >> > > > Hi Romain,
> > >> > > >
> > >> > > > On Wed, Feb 1, 2012 at 12:33 PM, Romain Manni-Bucau <
> > >> > > rmannibucau@gmail.com
> > >> > > > > wrote:
> > >> > > >
> > >> > > > Hi,
> > >> > > >>
> > >> > > >> Can you give more details on "it didnt work"?
> > >> > > >>
> > >> > > >
> > >> > > > Attached screen shot shows my original webapp structure.
And I
> > used
> > >> > SOAP
> > >> > > > UI to invoke the service and it was working fine. After
that I
> > >> removed
> > >> > > the
> > >> > > > following CXF jars from my webapp.
> > >> > > >
> > >> > > > cxf-2.2.3.jar
> > >> > > > cxf-manifest.jar
> > >> > > > cxf-xjc-bug671-2.2.3.jar
> > >> > > >
> > >> > > > Then started the server. There are no error logs on startup.
But
> > >> when I
> > >> > > > invoke it, I get an html. Basically that means the service
is
> not
> > >> > > deployed.
> > >> > > > But there are no error logs.
> > >> > > >
> > >> > > >
> > >> > > >>
> > >> > > >> TomEE support war by default but i think you can put
jars or
> ear
> > >> in an
> > >> > > >> "apps" folder (to create at the same level than webapp).
> > >> > > >>
> > >> > > >
> > >> > > > Do you mean that I can deploy my annotated JAX-WS jar file
> > >> > > > in apache-tomee-plus-1.0.0-beta-2/apps directory? Does it
read
> the
> > >> > > > @WebService annotation and properly deploy the service?
I tried
> to
> > >> > deploy
> > >> > > > the jar file built from your sample at [1]. But there are
no
> > related
> > >> > logs
> > >> > > > on the console and I can't find whether it has been deployed.
> How
> > >> can I
> > >> > > > access the WSDL?
> > >> > > >
> > >> > > > Thanks,
> > >> > > > ~Isuru
> > >> > > >
> > >> > > > [1]
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/simple-webservice/
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > >>
> > >> > > >> TomEE support war by default but i think you can put
jars or
> ear
> > >> in an
> > >> > > >> "apps" folder (to create at the same level than webapp).
> > >> > > >>
> > >> > > >> - Romain
> > >> > > >>
> > >> > > >> Le 1 févr. 2012 06:26, "Isuru Suriarachchi" <isurues@gmail.com
> >
> > a
> > >> > > écrit :
> > >> > > >>
> > >> > > >> > Hi Romain and David,
> > >> > > >> >
> > >> > > >> > Thanks for your support.
> > >> > > >> >
> > >> > > >> > So first I tried my .war file with all CXF libs
in it. I
> copied
> > >> it
> > >> > > >> > into apache-tomee-plus-1.0.0-beta-2/webapps directory
and it
> > >> worked
> > >> > > >> fine.
> > >> > > >> > So this is the normal Tomcat behavior.
> > >> > > >> >
> > >> > > >> > Then based on David's response, I removed all CXF
jars from
> my
> > >> > webapp
> > >> > > >> and
> > >> > > >> > copied it into webapps directory. But it didn't
work for me.
> > >> > > >> >
> > >> > > >> > And also I built the web services sample at [1]
using maven
> and
> > >> it
> > >> > > >> created
> > >> > > >> > the a jar file (simple-webservice-1.1-SNAPSHOT.jar).
But how
> > can
> > >> I
> > >> > > >> deploy
> > >> > > >> > it on TomEE+? Do I need to convert it into a .war
file?
> > >> > > >> >
> > >> > > >> > So basically these are the questions I've got..
> > >> > > >> >
> > >> > > >> > 1. What's the deployment model of TomEE+ for web
services? is
> > it
> > >> > > >> deploying
> > >> > > >> > a .war file in webapps?
> > >> > > >> > 2. What are the libraries that I have to include
in my CXF
> > >> webapp?
> > >> > > >> > 3. Is there any document explaining how to deploy
a simple
> web
> > >> > service
> > >> > > >> on
> > >> > > >> > TomEE+? Or a sample which creates the artifact
which can be
> > >> directly
> > >> > > >> > deployed on TomEE+?
> > >> > > >> >
> > >> > > >> > Thanks,
> > >> > > >> > ~Isuru
> > >> > > >> >
> > >> > > >> > [1]
> > >> > > >>
> > >> >
> > http://openejb.apache.org/examples-trunk/simple-webservice/README.html
> > >> > > >> >
> > >> > > >> > On Wed, Feb 1, 2012 at 2:10 AM, David Blevins <
> > >> > > david.blevins@gmail.com
> > >> > > >> > >wrote:
> > >> > > >> >
> > >> > > >> > >
> > >> > > >> > > On Jan 31, 2012, at 3:25 AM, Isuru Suriarachchi
wrote:
> > >> > > >> > >
> > >> > > >> > > > Hi all,
> > >> > > >> > > >
> > >> > > >> > > > I'm new to TomEE+ and I'm trying to deploy
a JAX-WS web
> > >> service
> > >> > on
> > >> > > >> it.
> > >> > > >> > I
> > >> > > >> > > > already have a CXF service (.war file)
which is working
> > fine
> > >> on
> > >> > > >> Tomcat.
> > >> > > >> > > But
> > >> > > >> > > > as CXF is already embedded in TomEE+,
I think there's no
> > >> need to
> > >> > > >> > include
> > >> > > >> > > > CXF jars in my webapp. Is it correct?
> > >> > > >> > >
> > >> > > >> > > Correct.  And worth mentioning, if you didn't
want to use
> the
> > >> web
> > >> > > >> > services
> > >> > > >> > > support already provided by TomEE+ you could
use plain
> TomEE
> > >> which
> > >> > > >> > doesn't
> > >> > > >> > > have CXF bundled.
> > >> > > >> > >
> > >> > > >> > > Though now that I think of it, we may still
try and scan
> for
> > >> > > >> @WebService
> > >> > > >> > > and such, so that might be something that
can be improved
> in
> > >> plain
> > >> > > >> TomEE.
> > >> > > >> > >
> > >> > > >> > >
> > >> > > >> > > -David
> > >> > > >> > >
> > >> > > >> > >
> > >> > > >> >
> > >> > > >>
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Technical Lead,
> > >> > WSO2 Inc. http://wso2.org/
> > >> > Blog : http://isurues.wordpress.com/
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > Technical Lead,
> > > WSO2 Inc. http://wso2.org/
> > > Blog : http://isurues.wordpress.com/
> > >
> >
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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