Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

TCP IP monitor web services

Hi,

I am working on below exmple
http://www.mkyong.com/webservices/jax-ws/how-to-trace-soap-message-in-eclipse-ide/

http://maksim.sorokin.dk/it/2011/01/20/jax-ws-web-services-maven-tomcat/


tcp ip monitor not showing request and response for my helloworld example.

<?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_2_5.xsd"
  id="WebApp_ID" version="2.5">
  
  <display-name>jaxwsExample</display-name>

  <listener>
    <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
  </listener>
  <servlet>
    <servlet-name>helloWs</servlet-name>
    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>helloWs</servlet-name>
    <url-pattern>/HelloWs</url-pattern>
  </servlet-mapping>
  <session-config>
    <session-timeout>120</session-timeout>
  </session-config>
</web-app>

Open in new window


why helloWS defined as servlet in web.xml even though it is not a servlet?

package jaxwsExample.ws;

import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

@WebService
@SOAPBinding(style = Style.RPC)
public class HelloWs {

  public String sayHello(String name) {
    if (name == null) {
      return "Hello";
    }

    return "Hello, " + name + "!";
  }
}

what is importance of below file?
<?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
  <endpoint name="HelloWs" implementation="jaxwsExample.ws.HelloWs" url-pattern="/HelloWs" />
</endpoints>

Open in new window


 please advise
tcp1.png
tcp2.png
tcp3.png
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

any step by step instruction video or link or document on this? i am not clear on how? i have web application working and ready. i also configured TCP  IP from eclipse? not sure how to tie one other server in between to read request and response?
Use tracing facilities in your browser.
Nobody uses that TCP monitor in eclipse.
Avatar of gudii9

ASKER

http://www.avajava.com/tutorials/lessons/how-do-i-monitor-http-communication-in-eclipse.html?page=2

i completed page 1 and started TCP IP monitor.
Need to check page 2 and figure out page 2.
You have developer menus showing requests and responses in browser
Then you have wireshark, micrisoft network monitor and
100 other socket proxies that show comminication.

Why you need exactly the ugliest option builtinto eclipse?
Thats the logical way (no complex configuration needed)