TCPMon Tutorial

Simulate / Monitor TCPMon

package com.client;

import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

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

// Monitor SOAP Message using TCPMon

public class StudentClient {

   
public static void main(String args[]) throws Exception {

     
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();

      factoryBean.getInInterceptors
().add(new LoggingInInterceptor());
      factoryBean.getOutInterceptors
().add(new LoggingOutInterceptor());
      factoryBean.setServiceClass
(ChangeStudentDetails.class);
      factoryBean.setAddress
("http://localhost:8081/CXFTutorial/services/ChangeStudent?wsdl");
      ChangeStudentDetails client =
(ChangeStudentDetails) factoryBean.create();
      Student student =
new Student();
      student.setName
("Rockey");
      Student changeName = client.changeName
(student);
      System.out.println
("Server response: " + changeName.getName());
   
}

}

Running TCPMon

Running TCPMon





Previous 1 2








3 Responses to "TCPMon Tutorial"
  1. Glapy 2011-10-12 07:03:52.0
  1. admin 2011-10-13 07:03:52.0
  1. Paul Caruana 2011-10-16 07:03:52.0

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