0

我在客户端 VM 参数中设置了 -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true 。我正在使用 JAX-WS 客户端。但是尽管 SOAP 消息并没有在控制台中打印出来。任何原因?

这是我的客户代码。

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"));

    }

}

我的服务器是我使用 Endpoint.publish 发布的,并且在本地运行。

4

2 回答 2

0

这是正确的 VM 参数 -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true。您在使用任何 IDEA 吗?

于 2014-11-21T05:59:08.687 回答
0

在服务器上

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

您还可以在此处此处@HandlerChain(file = "....")使用注释更多关于 Jax-WS 处理程序

于 2013-01-17T05:58:28.620 回答