all know WebService the bottom is also used HTTP communication, but how to print out the bottom of the message is also our debugging interface is the most convenient and quickest way. These are only applicable to the proxy class generated by the worker. Pro-Test Java JDK generated proxy classes to make it. Also known as Jax-WS. The following codeImportJava.io.BufferedReader;Importjava.io.IOException;ImportJava.io.InputStream;ImportJava.io.InputStreamReader;ImportJava.io.OutputStream;ImportJava.net.ServerSocket;ImportJava.net.Socket; Public classServer {ServerSocket ss; Socket serversocket;inputstream instream;outputstream OutStream; PublicServer () {Try{System.out.println ("====================server=================="); SS=NewServerSocket (80); ServerSocket=ss.accept (); System.out.println ("--------------Some guest connected----------------"); Instream=Serversocket.getinputstream (); OutStream=Serversocket.getoutputstream ();} Catch(Exception e) {e.printstacktrace ();}} Public voidConn () {NewThread () { Public voidrun () {Try{InputStreamReader Ireader=NewInputStreamReader (instream); BufferedReader Ibufferstream=NewBufferedReader (Ireader); String Line=NULL; while(line = Ibufferstream.readline ())! =NULL) {System.out.println (line);}} Catch(IOException e) {e.printstacktrace ();}}}. Start ();} Public Static voidMain (String args[]) {Server server=NewServer (); Server.conn ();}} The above code is the listening port, for example, your webservice is sent to Port 9001, you will change 80 to 9001. The second is to change the WSDL address to WebService, first download it. Put it in an internal project. Then change the service class address in the proxy class. Remember Some WebService interface provider description must use the domain name, then you will change your host configuration, configure a map, such as.
How Java prints the SOAP message Protocol sent by WebService