You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ted Roeloffzen <te...@gmail.com> on 2010/06/30 10:06:35 UTC
Newbie question. Webservice not registered in servlet
Hi All,
I have a quick question.
I'm using cxf 2.2.3 and I want to register a service (the server side) via
Spring.
My web.xml contains
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:nl/topicus/cluedo/spring-web.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<display-name>CXF Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/cxf/*</url-pattern>
</servlet-mapping>
and my spring-web.xml contains.
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint id="cluedoService"
implementor="nl.topicus.cluedo.webservices.CluedoService"
address="/incidenten" endpointName="irisService" ></jaxws:endpoint>
but when I go to the url of the servlet, there is a message that no service
are found.
As a webserver I use Jetty and I do get some messages at start up time.
30-jun-2010 9:21:23 org.apache.cxf.transport.servlet.CXFServlet
updateContext
INFO: Load the bus with application context
30-jun-2010 9:21:24 org.apache.cxf.bus.spring.BusApplicationContext
getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
30-jun-2010 9:21:30 org.apache.cxf.transport.servlet.AbstractCXFServlet
replaceDestinationFactory
INFO: Replaced the http destination factory with servlet transport factory
Does anybody know what I am doing wrong?
thanks a bunch
Re: Newbie question. Webservice not registered in servlet
Posted by Ted Roeloffzen <te...@gmail.com>.
Hi Philippe,
I already found out what I did wrong.
Because the webapp uses Jetty, there was a second spring-web.xml and that
file didn' t contain the correct info.
When I added the correct info, it worked.
Ted
2010/6/30 antoine philippe chaker <ph...@gmail.com>
> Hi Ted,
>
> i'm a newbie too :-) but could you give us the complete url that you try
> to
> call ?
>
> Philippe
>
> 2010/6/30 Ted Roeloffzen <te...@gmail.com>
>
> > Hi All,
> > I have a quick question.
> > I'm using cxf 2.2.3 and I want to register a service (the server side)
> via
> > Spring.
> > My web.xml contains
> > <context-param>
> > <param-name>contextConfigLocation</param-name>
> > <param-value>classpath:nl/topicus/cluedo/spring-web.xml
> > </param-value>
> > </context-param>
> > <listener>
> > <listener-class>org.springframework.web.context.ContextLoaderListener
> > </listener-class>
> > </listener>
> > <servlet>
> > <display-name>CXF Servlet</display-name>
> > <servlet-name>CXFServlet</servlet-name>
> > <servlet-class>
> > org.apache.cxf.transport.servlet.CXFServlet
> > </servlet-class>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> > <servlet-mapping>
> > <servlet-name>CXFServlet</servlet-name>
> > <url-pattern>/services/cxf/*</url-pattern>
> > </servlet-mapping>
> >
> > and my spring-web.xml contains.
> > <import resource="classpath:META-INF/cxf/cxf.xml" />
> > <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> > <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> > <jaxws:endpoint id="cluedoService"
> > implementor="nl.topicus.cluedo.webservices.CluedoService"
> > address="/incidenten" endpointName="irisService" ></jaxws:endpoint>
> > but when I go to the url of the servlet, there is a message that no
> service
> > are found.
> > As a webserver I use Jetty and I do get some messages at start up time.
> > 30-jun-2010 9:21:23 org.apache.cxf.transport.servlet.CXFServlet
> > updateContext
> > INFO: Load the bus with application context
> >
> > 30-jun-2010 9:21:24 org.apache.cxf.bus.spring.BusApplicationContext
> > getConfigResources
> > INFO: No cxf.xml configuration file detected, relying on defaults.
> >
> > 30-jun-2010 9:21:30 org.apache.cxf.transport.servlet.AbstractCXFServlet
> > replaceDestinationFactory
> > INFO: Replaced the http destination factory with servlet transport
> factory
> >
> > Does anybody know what I am doing wrong?
> > thanks a bunch
> >
>
Re: Newbie question. Webservice not registered in servlet
Posted by antoine philippe chaker <ph...@gmail.com>.
Hi Ted,
i'm a newbie too :-) but could you give us the complete url that you try to
call ?
Philippe
2010/6/30 Ted Roeloffzen <te...@gmail.com>
> Hi All,
> I have a quick question.
> I'm using cxf 2.2.3 and I want to register a service (the server side) via
> Spring.
> My web.xml contains
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>classpath:nl/topicus/cluedo/spring-web.xml
> </param-value>
> </context-param>
> <listener>
> <listener-class>org.springframework.web.context.ContextLoaderListener
> </listener-class>
> </listener>
> <servlet>
> <display-name>CXF Servlet</display-name>
> <servlet-name>CXFServlet</servlet-name>
> <servlet-class>
> org.apache.cxf.transport.servlet.CXFServlet
> </servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/services/cxf/*</url-pattern>
> </servlet-mapping>
>
> and my spring-web.xml contains.
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <jaxws:endpoint id="cluedoService"
> implementor="nl.topicus.cluedo.webservices.CluedoService"
> address="/incidenten" endpointName="irisService" ></jaxws:endpoint>
> but when I go to the url of the servlet, there is a message that no service
> are found.
> As a webserver I use Jetty and I do get some messages at start up time.
> 30-jun-2010 9:21:23 org.apache.cxf.transport.servlet.CXFServlet
> updateContext
> INFO: Load the bus with application context
>
> 30-jun-2010 9:21:24 org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: No cxf.xml configuration file detected, relying on defaults.
>
> 30-jun-2010 9:21:30 org.apache.cxf.transport.servlet.AbstractCXFServlet
> replaceDestinationFactory
> INFO: Replaced the http destination factory with servlet transport factory
>
> Does anybody know what I am doing wrong?
> thanks a bunch
>