WSDL Client Without Proxy

WSDL Client Without Proxy explains step by step details of how to create a CXF web service client / CXF wsdl soap client without using any proxy or tools

Other options like Wsimport tool available with JDK are standard, but here we are not using any tools

For publishing a CXF Web Service, you can follow CXF Web Service Tutorial. This client is generated after the deployment of above service.

Required Libraries

You need to download following libraries in order to run CXF WSDL Client Without Proxy

  1. JDK 6
  2. Eclipse 3.7
  3. For running this client you need to refer the classes generated on CXF Web Service Tutorial

WSDL Client Without Proxy

package com.student;


import javax.xml.namespace.QName;

import com.student.ChangeStudentDetails;
import com.student.Student;

//CXF WSDL client example
public class StudentClient {

public static void main(String[] args) throws MalformedURLException {
URL url = new URL("http://localhost:8080/CXFTutorial/ChangeStudent?wsdl");
    QName qname =
new QName("", "ChangeStudentDetailsImplService");
    Service service = Service.create
(url, qname);
    ChangeStudentDetails changeStudentDetails = service.getPort
    Student student =
new Student();
("Server said: " + changeStudentDetails.changeName(student).getName());

Server said: Hello Rockey


2 Responses to "WSDL Client Without Proxy"
  1. Dosy 2012-11-01 09:27:41.0
  1. admin 2012-11-02 09:27:41.0

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