1
SimpleCalculatorStub stub = new SimpleCalculatorStub(null, 
"http://localhost:8080/ControlSOAPMessage/services/SimpleCalculator");

MyAdd reqMyAdd = new MyAdd();
MySub reqMySub = new MySub();
reqMyAdd.setA(4);
reqMyAdd.setB(4);
reqMySub.setA(9);
reqMySub.setB(5);
MyAddResponse resMyAdd = stub.myAdd(reqMyAdd);
MySubResponse resMySub = stub.mySub(reqMySub);
// System.out.println(resMyAdd.get_return()+" :: "+resMySub.get_return());
Integer[] resParams = new Integer[2];
resParams[0]=resMyAdd.get_return();
resParams[1]=resMySub.get_return();
for (int i = 0; i < resParams.length; i++) {
    System.out.println(resParams[i]);
}

I want to capture every request and response of SOAP messages (RAW) coming/going to/from client/server in XML format while interacting with Services.

Please guide me with program coding and where I should place that coding. I have made this service using Eclipse Axis2 plugins. Dynamic Web Project->Web Services (Java, Axis2, Tomcat 6)

I have attached client side program(simple one)

  • Addition and subtraction methods

  • Client accepts two arguments in each method

  • Add or subtract the numbers and provide results

Please guide me.

Many thanks.

4

1 回答 1

0

使用Apache 的 TCPMon或者如果你使用 eclipse ee,它集成在其中。只需转到 Window->Show View 并找到 TCP/IP Monitor。这两个作为代理工作,您的客户端将连接到 TCPMon,并且您配置 TCPMon 以连接到您的服务器。

您可以使用其他工具将它们放在客户端和服务器之间,以便您可以监控流量(例如 Wireshark)。

于 2012-09-23T18:00:47.777 回答