tumblr counter

CXF Web Service 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id="WebApp_ID" version="3.0">
    <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 Web Service

Run CXF 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/CXFTutorial/services

Deployed CXF Web Service

CXF WebService Running

Note

you can also see CXF client example in order to run this service




Previous 1 2 3






56 Responses to “CXF Web Service Tutorial”
  1. Srajan Dongre 22.06.2012 18:45:14
  1. admin 24.06.2012 18:45:48
  1. Sharath 28.06.2012 18:46:39
  1. Liushan_33 06.07.2012 18:47:17
  1. admin 07.07.2012 17:37:29
  1. Suresh Shetty 10.07.2012 18:49:16
  1. Sriharshakothuru 17.07.2012 18:54:52
  1. vsmak 22.07.2012 18:55:42
  1. admin 23.07.2012 17:43:11
  1. Amar 08.08.2012 19:02:06
  1. admin 10.08.2012 17:41:45
  1. Java 13.02.2013 11:41:59
  1. Java 13.02.2013 14:27:44
  1. admin 17.02.2013 00:26:08
  1. Julien 10.03.2013 11:40:11
  1. Julien 11.03.2013 06:23:54
  1. Murali 12.03.2013 03:10:35
  1. mayur 22.03.2013 03:28:21
  1. admin 27.03.2013 09:51:09
  1. Rohan Kulkarni 28.03.2013 04:02:19
  1. admin 29.03.2013 11:37:48
  1. JW 09.04.2013 17:25:21
  1. admin 10.04.2013 12:24:44
  1. freeman 17.04.2013 21:49:54
  1. freeman 17.04.2013 22:12:57
  1. admin 19.04.2013 13:56:13
  1. chandu 20.04.2013 02:33:15
  1. admin 21.04.2013 13:00:41
  1. Pasha 22.04.2013 11:01:47
  1. techy 21.05.2013 03:12:46
  1. admin 23.05.2013 10:22:51
  1. keith 19.06.2013 02:25:36
  1. Ravi 16.09.2013 09:42:58
  1. admin 16.09.2013 11:16:48
  1. pnp 07.10.2013 05:32:48
  1. admin 07.10.2013 11:14:20
  1. Praveen D 28.10.2013 12:50:35
  1. admin 09.11.2013 03:39:33
  1. sanjeev 20.11.2013 09:41:58
  1. admin 20.11.2013 22:16:12
  1. sanjeev 21.11.2013 08:33:24
  1. anirudh 24.04.2014 11:43:16
  1. Aarif Choudhary 19.05.2014 17:56:17
  1. admin 20.05.2014 07:57:00
  1. saran 22.05.2014 12:44:49
  1. dola kec 31.05.2014 22:24:28
  1. admin 20.06.2014 10:09:40
  1. Satish Ch 29.07.2014 21:33:17
  1. admin 31.07.2014 07:43:43
  1. raj 24.09.2014 18:10:58
  1. admin 24.09.2014 19:56:19
  1. Nitesh 10.12.2014 10:36:38
  1. barath 20.12.2014 00:48:17
  1. admin 06.01.2015 19:46:47
  1. marina 19.02.2015 23:16:31
  1. admin 21.02.2015 08:38:22

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