Why people are interested in CODE-FIRST approach? Answer is simple. No need to go through the complexities of XML, XSD, WSDL structure. Just code in any of your favorite programming language and create the WSDL file using any of your tools/frameworks. I had taken some interviews these days for a Webservice-SOA project. Honestly it wasContinue reading “Creating “Contract First” – Web Services using CXF (Top Down Approach) Part 1: Creating XSDs.”
Author Archives: Lijin
Creating Web services using Apache CXF (Part 4): Testing
To test this we can follow the same client program which is given in the CXF site. Just create a simple Java class and execute it. 1: package com.your.company.service.client; 2: 3: import java.util.List; 4: 5: import org.apache.cxf.interceptor.LoggingInInterceptor; 6: import org.apache.cxf.interceptor.LoggingOutInterceptor; 7: import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; 8: 9: import com.your.company.service.Product; 10: import com.your.company.service.ProductService; 11: 12: public final classContinue reading “Creating Web services using Apache CXF (Part 4): Testing”
Creating Web services using Apache CXF (Part 3): Configurations
Web.xml Declarations We have to declare Spring Context Listener, CXF Servlet, Spring Context Location and URL Mapping. 1: <?xml version="1.0" encoding="UTF-8"?> 2: <web-app id="services" version="2.5" 3: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" 4: xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 5: xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 6: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 7: 8: <!– Adding the Spring Context Listener. It will help to init Spring Context –> 9: <listener> 10: <listener-class> org.springframework.web.context.ContextLoaderListenerContinue reading “Creating Web services using Apache CXF (Part 3): Configurations”
Creating Web services using Apache CXF (Part 2): Development
We need to set-up the project environment first. Please download the following JARs. Versions Used : CXF 2.2.2 Download Link : CXF Site Download Link Spring 2.5.6 Download Link : SpringSource Download site The following jars are required for all CXF usage: But you will be getting it through CXF Download. – cxf.jar – commons-logging.jar –Continue reading “Creating Web services using Apache CXF (Part 2): Development”