CXF Restful Tutorial

Change web.xml

Change the web.xml file to find CXF servlet and cxf.xml

<?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">
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>WEB-INF/cxf.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <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>/*</url-pattern>
    </servlet-mapping>
</web-app>

Publishing CXF Restful Service

Run CXF Restful On Tomcat

Note

You can Find all the deployed JAX-WS/JAX-RS services you need to append 'services' at the end of the URL so URL will become following

http://localhost:8080/CXFRestfulTutorial/services

Deployed REST Web Service Using CXF

CXF Restful Service Running

Note

you can also see CXF Restful Client in order to run this restful service





Previous 1 2 3








27 Responses to "CXF Restful Tutorial"
  1. Yevgeny Vasilyev 2012-01-02 07:26:05.0
  1. admin 2012-01-03 07:26:05.0
  1. pep 2012-01-04 07:26:05.0
  1. admin 2012-01-05 07:26:05.0
  1. Sony 2012-01-06 07:26:05.0
  1. Julien 2012-01-07 07:26:05.0
  1. admin 2012-01-08 07:26:05.0
  1. Ruchika 2012-01-09 07:26:05.0
  1. admin 2012-01-11 07:26:05.0
  1. steve 2012-01-12 07:26:05.0
  1. steve 2012-01-13 07:26:05.0
  1. admin 2012-01-14 07:26:05.0
  1. Madusha 2012-01-15 07:26:05.0
  1. admin 2012-01-16 07:26:05.0
  1. Deepak 2012-01-17 07:26:05.0
  1. admin 2012-01-18 07:26:05.0
  1. bibhu 2012-01-19 07:26:05.0
  1. admin 2012-01-20 07:26:05.0
  1. Ram 2012-01-21 07:26:05.0
  1. admin 2012-01-22 07:26:05.0
  1. madhu 2012-01-23 07:26:05.0
  1. admin 2012-01-24 07:26:05.0
  1. madhu 2012-01-25 07:26:05.0
  1. admin 2012-01-26 07:26:05.0
  1. madhu 2012-01-27 07:26:05.0
  1. terry 2012-01-28 07:26:05.0
  1. Shailendra 2012-01-29 07:26:05.0

Your email address will not be published. Required fields are marked *