You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Verachten Bruno <Br...@atosorigin.com> on 2007/08/01 10:47:36 UTC

Deploying a web service with attachments

Hi,

I'm currently developping a service that will receive attached files,
treat them, and send another file as a result.
I have some problems getting CXF to work. I tried the quote reporter
example, but I get the "No service was found." message.
So I went back to the book example found on the Xfire website, but I get
the same message.
I found some ideas in the mail archive, but it just doesn't work for me.
I still have that message in the logs : "ATTENTION: Can't find the the
request for http://localhost:8000/services/book's Observer ".
Beans.xml :
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:jaxws="http://cxf.apache.org/jaxws"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
	<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="book"
		implementor="test.webservice.BookServiceImpl"
address="/book" />
</beans>
Web.xml :
[...]
<servlet>
  <servlet-name>CXFServlet</servlet-name>
 
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-clas
s>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>CXFServlet</servlet-name>
  <url-pattern>/services/*</url-pattern>
</servlet-mapping>

BookService:
@WebService(serviceName="book")
public interface BookService...

BookServiceImpl:
@WebService(endpointInterface="test.webservice.BookService")
public class BookServiceImpl implements BookService...

I'm sure I must have forgotten something, but what?

Thanks in advance,

Bruno Verachten

Re: Deploying a web service with attachments

Posted by Willem Jiang <ni...@iona.com>.
Hi Bruno,

Please use the below url to access your service. You may also study the 
hello_world samples' readme for more detail information.

http://localhost:8000/{your war's name}/services/book

You just need to replace the {your war's name} with the your war's name.

Willem.
 
Verachten Bruno wrote:
> Hi,
>
> I'm currently developping a service that will receive attached files,
> treat them, and send another file as a result.
> I have some problems getting CXF to work. I tried the quote reporter
> example, but I get the "No service was found." message.
> So I went back to the book example found on the Xfire website, but I get
> the same message.
> I found some ideas in the mail archive, but it just doesn't work for me.
> I still have that message in the logs : "ATTENTION: Can't find the the
> request for http://localhost:8000/services/book's Observer ".
> Beans.xml :
> <beans xmlns="http://www.springframework.org/schema/beans"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xmlns:jaxws="http://cxf.apache.org/jaxws"
> 	xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> 	<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="book"
> 		implementor="test.webservice.BookServiceImpl"
> address="/book" />
> </beans>
> Web.xml :
> [...]
> <servlet>
>   <servlet-name>CXFServlet</servlet-name>
>  
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-clas
> s>
>   <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
>   <servlet-name>CXFServlet</servlet-name>
>   <url-pattern>/services/*</url-pattern>
> </servlet-mapping>
>
> BookService:
> @WebService(serviceName="book")
> public interface BookService...
>
> BookServiceImpl:
> @WebService(endpointInterface="test.webservice.BookService")
> public class BookServiceImpl implements BookService...
>
> I'm sure I must have forgotten something, but what?
>
> Thanks in advance,
>
> Bruno Verachten
>
>   

Re: Deploying a web service with attachments

Posted by Willem Jiang <ni...@iona.com>.
Hi Bruno,

Please use the below url as you service consuming point.

http://localhost:8000/{your war's name}/services/book

You just need to replace the {your war's name} with the your war's name.

Willem.
 
Verachten Bruno wrote:
> Hi,
>
> I'm currently developping a service that will receive attached files,
> treat them, and send another file as a result.
> I have some problems getting CXF to work. I tried the quote reporter
> example, but I get the "No service was found." message.
> So I went back to the book example found on the Xfire website, but I get
> the same message.
> I found some ideas in the mail archive, but it just doesn't work for me.
> I still have that message in the logs : "ATTENTION: Can't find the the
> request for http://localhost:8000/services/book's Observer ".
> Beans.xml :
> <beans xmlns="http://www.springframework.org/schema/beans"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xmlns:jaxws="http://cxf.apache.org/jaxws"
> 	xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> 	<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="book"
> 		implementor="test.webservice.BookServiceImpl"
> address="/book" />
> </beans>
> Web.xml :
> [...]
> <servlet>
>   <servlet-name>CXFServlet</servlet-name>
>  
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-clas
> s>
>   <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
>   <servlet-name>CXFServlet</servlet-name>
>   <url-pattern>/services/*</url-pattern>
> </servlet-mapping>
>
> BookService:
> @WebService(serviceName="book")
> public interface BookService...
>
> BookServiceImpl:
> @WebService(endpointInterface="test.webservice.BookService")
> public class BookServiceImpl implements BookService...
>
> I'm sure I must have forgotten something, but what?
>
> Thanks in advance,
>
> Bruno Verachten
>
>