geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor" <jga...@gmail.com>
Subject Re: No web.xml for web service still possible? What's its url?
Date Sun, 18 Nov 2007 21:41:58 GMT
Jacek,

The web services will be discovered and deployed if the web.xml does
not exist. If it exists, the information in the web.xml files is used
to deploy the web services. If the web.xml is essentially empty no web
services will be deployed.

Jarek

On Nov 18, 2007 5:25 AM, Jacek Laskowski <jacek@laskowski.net.pl> wrote:
> On Nov 18, 2007 2:18 AM, Jarek Gawor <jgawor@gmail.com> wrote:
>
> > You should see something like the following in the geronimo.log file:
> >
> > INFO: .. Configuring JAX-WS Web Service: <servletName> at <location>.
> >
> > <location> is the url you are looking for. By default the location is
> > /<webAppContext/WebService.serviceName, so I think in your case it
> > should be: /katalog/Katalog
>
> Negative ;-)
>
> jlaskowski@dev /cygdrive/c/geronimo
> $ ./bin/deploy.sh -u system -p manager deploy "C:\Documents and
> Settings\jlaskowski\My
> Documents\NetBeansProjects\katalog\dist\katalog.war"
> Using GERONIMO_BASE:   c:\geronimo
> Using GERONIMO_HOME:   c:\geronimo
> Using GERONIMO_TMPDIR: c:\geronimo\var\temp
> Using JRE_HOME:        c:\apps\java5\jre
>     Deployed pl.jaceklaskowski.katalog/katalog-webservice/1.0/war @
>     /katalog
>
> and at the console nothing's printed out. This is the last line at the
> console, right after the webapp's deployed.
>
> Geronimo startup complete
>
> When I remove web.xml completely (it was empty previously not how I
> described it, i.e. with <web-app /> in it), here's what I couldn't
> undeploy it by issuing redeploy command, so I had to undeploy and
> deploy it again:
>
> jlaskowski@dev /cygdrive/c/geronimo
> $ ./bin/deploy.sh -u system -p manager redeploy "C:\Documents and
> Settings\jlaskowski\My
> Documents\NetBeansProjects\katalog\dist\katalog.war"
> Using GERONIMO_BASE:   c:\geronimo
> Using GERONIMO_HOME:   c:\geronimo
> Using GERONIMO_TMPDIR: c:\geronimo\var\temp
> Using JRE_HOME:        c:\apps\java5\jre
>     No ModuleID or TargetModuleID provided.  Attempting to guess based
>     on the content of the archive.
>     Unable to locate Geronimo deployment plan in archive.  Calculating
>     default ModuleID from archive name.
>     Attempting to use ModuleID 'default/katalog//'
>     Error: default/katalog// does not appear to be a the name of a
>     module available on the selected server. Perhaps it has already been
>     stopped or undeployed?  If you're trying to specify a
>     TargetModuleID, use the syntax TargetName|ModuleName instead. If
>     you're not sure what's running, try the list-modules command.
>
> jlaskowski@dev /cygdrive/c/geronimo
> $ ./bin/deploy.sh -u system -p manager undeploy
> pl.jaceklaskowski.katalog/katalog-webservice/1.0/war
> Using GERONIMO_BASE:   c:\geronimo
> Using GERONIMO_HOME:   c:\geronimo
> Using GERONIMO_TMPDIR: c:\geronimo\var\temp
> Using JRE_HOME:        c:\apps\java5\jre
>     Module pl.jaceklaskowski.katalog/katalog-webservice/1.0/war
>     unloaded.
>     Module pl.jaceklaskowski.katalog/katalog-webservice/1.0/war
>     uninstalled.
>
>     Undeployed pl.jaceklaskowski.katalog/katalog-webservice/1.0/war
>
>
> jlaskowski@dev /cygdrive/c/geronimo
> $ rm -rf repository/pl/jaceklaskowski
>
> jlaskowski@dev /cygdrive/c/geronimo
> $ ./bin/deploy.sh -u system -p manager deploy "C:\Documents and
> Settings\jlaskowski\My
> Documents\NetBeansProjects\katalog\dist\katalog.war"
> Using GERONIMO_BASE:   c:\geronimo
> Using GERONIMO_HOME:   c:\geronimo
> Using GERONIMO_TMPDIR: c:\geronimo\var\temp
> Using JRE_HOME:        c:\apps\java5\jre
>     Deployed pl.jaceklaskowski.katalog/katalog-webservice/1.0/war @
>     /katalog
>
> jlaskowski@dev /cygdrive/c/geronimo
> $ jar -tf "C:\Documents and Settings\jlaskowski\My
> Documents\NetBeansProjects\katalog\dist\katalog.war"
> META-INF/
> META-INF/MANIFEST.MF
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/pl/
> WEB-INF/classes/pl/jaceklaskowski/
> WEB-INF/classes/pl/jaceklaskowski/katalog/
> WEB-INF/classes/pl/jaceklaskowski/katalog/webservice/
> WEB-INF/wsdl/
> WEB-INF/classes/pl/jaceklaskowski/katalog/webservice/KatalogWS.class
> WEB-INF/geronimo-web.xml
> WEB-INF/sun-web.xml
> WEB-INF/web.X.xml
>
> and that's what's printed out on the console:
>
> Geronimo startup complete
> 11:19:53,359 INFO  [DirectoryMonitor] Hot deployer notified that an
> artifact was removed:
> pl.jaceklaskowski.katalog/katalog-webservice/1.0/war
> 11:21:31,171 INFO  [JAXWSServiceBuilder] Configuring JAX-WS Web
> Service: pl.jaceklaskowski.katalog.webservice.KatalogWS at
> /katalog/Katalog
> 11:21:31,515 INFO  [BusApplicationContext] Refreshing
> org.apache.cxf.bus.spring.BusApplicationContext@1c04b2a: display name
> [org.apache.cxf.bus.spring.BusApplicationContext@1c04b2a]; st
> artup date [Sun Nov 18 11:21:31 CET 2007]; root of context hierarchy
> 11:21:31,609 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions from class path resource [META-INF/cxf/cxf.xml]
> 11:21:31,703 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions from class path resource
> [META-INF/cxf/cxf-extension-geronimo.xml]
> 11:21:31,750 INFO  [DefaultListableBeanFactory] Overriding bean
> definition for bean 'org.apache.cxf.resource.ResourceManager':
> replacing [Root bean: class [org.apache.cxf.bus.resource.R
> esourceManagerImpl]; scope=singleton; abstract=false; lazyInit=false;
> autowireCandidate=true; autowireMode=0; dependencyCheck=0;
> factoryBeanName=null; factoryMethodName=null; initMethod
> Name=null; destroyMethodName=null; defined in class path resource
> [META-INF/cxf/cxf.xml]] with [Root bean: class
> [org.apache.geronimo.cxf.ResourceManager]; scope=singleton;
> abstract=fal
> se; lazyInit=false; autowireCandidate=true; autowireMode=0;
> dependencyCheck=0; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in clas
> s path resource [META-INF/cxf/cxf-extension-geronimo.xml]]
> 11:21:31,750 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions from class path resource
> [META-INF/cxf/cxf-extension-soap.xml]
> 11:21:31,796 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions from class path resource
> [META-INF/cxf/cxf-extension-xml.xml]
> 11:21:31,843 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions from class path resource
> [META-INF/cxf/cxf-extension-http.xml]
> 11:21:31,875 INFO  [BusApplicationContext] Bean factory for
> application context
> [org.apache.cxf.bus.spring.BusApplicationContext@1c04b2a]:
> org.springframework.beans.factory.support.Defa
> ultListableBeanFactory@9de5b4
> 11:21:31,984 INFO  [BusApplicationContext] Bean
> 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not eligible
> for getting processed by all BeanPostProcessors (for example: not eli
> gible for auto-proxying)
> 11:21:31,984 INFO  [BusApplicationContext] Bean
> 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not eligible
> for getting processed by all BeanPostProcessors (for example: not e
> ligible for auto-proxying)
> 11:21:31,984 INFO  [DefaultListableBeanFactory] Pre-instantiating
> singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@9de5b4:
> defining beans [cxf,org.apac
> he.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.ap
> ache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.
> WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLife
> CycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalo
> gManager,org.apache.geronimo.cxf.GeronimoDestinationFactory,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.c
> ustomEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAsserti
> onBuilder]; root of factory hierarchy
> 2007-11-18 11:21:33
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service
> {http://webservice.katalog.jaceklaskowski.pl/}Katalog from class
> pl.jaceklaskowski.katalog.webservice.KatalogWS
> 2007-11-18 11:21:34 pl.jaceklaskowski.katalog.webservice.KatalogWS init
> INFO: Usluga KatalogWS zainicjowana
>
> So, it works only when no web.xml is in the webapp or the following
> mapping's added:
>
>     <servlet>
>         <servlet-name>Katalog</servlet-name>
>         <servlet-class>
>             pl.jaceklaskowski.katalog.webservice.KatalogWS
>         </servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Katalog</servlet-name>
>         <url-pattern>/katalog</url-pattern>
>     </servlet-mapping>
>
> When there's web.xml like the following
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5"
>          xmlns="http://java.sun.com/xml/ns/javaee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> </web-app>
>
> it doesn't work, i.e. no web services are deployed or they are, but
> can't figure out what their urls are. Should it run fine too?
>
> Thanks Jarek!
>
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>

Mime
View raw message