?? guidgenclient1.java
字號:
package samples.guidgen;
import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
public class GuidGenClient1 {
public static void main (String[] args) throws Exception {
URL url = new URL("http://www.itfinity.net/soap/guid/Default.asp");
// Build the call.
Call call = new Call ();
call.setTargetObjectURI ("http://www.itfinity.net/soap/guid/guid.xsd");
call.setMethodName ("NextGUID");
call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
// make the call: note that the action URI is empty because the
// XML-SOAP rpc router does not need this. This may change in the
// future.
Response resp = call.invoke (/* router URL */ url,
/* actionURI */ "http://www.itfinity.net/soap/guid/Default.asp" );
// Check the response.
if (resp.generatedFault ()) {
Fault fault = resp.getFault ();
System.out.println ("Ouch, the call failed: ");
System.out.println (" Fault Code = " + fault.getFaultCode ());
System.out.println (" Fault String = " + fault.getFaultString ());
} else {
Parameter result = resp.getReturnValue ();
System.out.println (result.getValue ());
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -