0

I set -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true in my client VM arguments. I am using JAX-WS client. But inspite of that SOAP Message is not getting printed in the console. Any reason?

This is my client code.

package com.helloworld.client;

import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import com.helloworld.ws.HelloWorld;

public class HelloWorldClient{

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

    URL url = new URL("http://localhost:9999/ws/hello?wsdl");

        //1st argument service URI, refer to wsdl document above
    //2nd argument is service name, refer to wsdl document above
        QName qname = new QName("http://ws.helloworld.com/", "HelloWorldImplService");

        Service service = Service.create(url, qname);

        HelloWorld hello = service.getPort(HelloWorld.class);

        System.out.println(hello.getHelloWorldAsString("Test String"));

    }

}

My server is I published using Endpoint.publish and is running locally.

Satish
  • 713
  • 1
  • 5
  • 18

2 Answers2

0

on Server

com.sun.xml.ws.transport.http.HttpAdapter.dump=true

You can also use @HandlerChain(file = "....") annotation More about Jax-WS Handlers here and here

TheWhiteRabbit
  • 15,480
  • 4
  • 33
  • 57
  • I also took help of http://stackoverflow.com/questions/1945618/tracing-xml-request-responses-with-jax-ws. – Satish Jan 22 '13 at 05:29
0

This is the correct VM argument -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true. Are you using any IDEA?

Harsh Gupta
  • 197
  • 6