java WebService Case
Ò»¡¢Axis°²×° 1¡¢»·¾³ J2SE SDK 1.3 or 1.4: ÎÒʹÓà 1.4.2 Servlet Container: ÎÒʹÓõÄTomcat 5.0
2¡¢µ½ http://ws.apache.org/Axis/ÍøÕ¾ÏÂÔØAxis°²×°°ü
3¡¢½âѹËõ°²×°°ü£¬½«Axis_UNZIP_PATH\Axis-version\webappsϵÄAxis°ü¿½±´µ½TOMCAT_HOME\webapps\Ï£¬ÒÔÏÂÔ¼¶¨Axis_HOMEΪ¸ÃTOMCAT_HOME\webapps\AxisĿ¼
4¡¢Æô¶¯tomcat,·ÃÎÊhttp://localhost:8080/Axis ¼ì²é°²×°ÊÇ·ñ³É¹¦
5¡¢ÒÔÉϲ½ÖèÖ´Ðгɹ¦£¬¿ÉÒÔ¿ª·¢webserviceÀý×ÓÁË
AxisÖ§³ÖÈýÖÖweb serviceµÄ²¿ÊðºÍ¿ª·¢£¬·Ö±ðΪ£º
1¡¢Dynamic Invocation Interface ( DII)
2¡¢Stubs·½Ê½
3¡¢Dynamic Proxy·½Ê½
¶þ¡¢±àдDII(Dynamic Invocation Interface )·½Ê½web·þÎñ
1.±àд·þÎñ¶Ë³ÌÐòHelloClient
public class HelloClient
{
public String getName(String name)
{
return "hello "+name;
}
}
2¡¢½«Ô´Â뿽±´µ½Axis_HOMEÏ£¬ÖØÃüÃûΪ HelloClient.jws
3¡¢·ÃÎÊÁ¬½Óhttp://localhost:8080/Axis/HelloClient.jws?wsdl£¬Ò³ÃæÏÔʾAxis×Ô¶¯Éú³ÉµÄwsdl
4¡¢±àд·ÃÎÊ·þÎñµÄ¿Í»§¶Ë TestHelloClient.java
import org.apache.Axis.client.Call;
import org.apache.Axis.client.Service;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import java.net.MalformedURLException;
import java.rmi.RemoteException;
public class SayHelloClient2
{
public static void main(String[] args)
{
try
{
String endpoint =
"http://localhost:8080/Axis/HelloClient.jws";
Service service = new Service();
Call call = null;
call = (Call) service.createCall();
call.setOperationName(
Ïà¹ØÎĵµ£º
¹Ø¼ü×Ö: byte String
ÎÊÌâ1£ºjavaÖÐûÓÐʵÏÖÕâÖÖ“byte a = 0xB2 --> String b = “B2””ת»»µÄ¼òµ¥ÊµÏÖÐèÒª×Ô¼ºÊµÏÖ¡£
´ð£º×Ô¼º±àдµÄת»»º¯Êý£¬Ë¼Â·½«byteµÄ¸ßµÍ4λ·Ö¿ª£¬·Ö±ðת»»Îª¶ÔÓ¦µÄ×Ö·ûÈ»ºóºÏ³É·µ»ØµÄ×Ö·û´®¡£
java ´úÂë
public static String byteToString(byte b) { ......
ÕâÀïÎÒ½éÉÜÒ»Öֺܳ£Óã¬Ò²±È½ÏProfessorµÄȨÏÞ¿ØÖÆ˼·¡£
ÕâÀïÎÒÓÃjavaÓïÑÔÃèÊö£¬Æäʵ¶¼²î²»¶àµÄ¡£×Ô¼º×ªÒ»Ï¾ͿÉÒÔÁË¡£
ΪÁË·½±ã£¬ÎÒÃÇÕâÀﶨÒåa^bΪ£ºaµÄb´Î·½
ÕâÀÎÒÃÇΪÿһ¸ö²Ù×÷É趨һ¸öΨһµÄÕûÊýÖµ£¬±ÈÈ磺
ɾ³ý£Á£££0
Ð޸ģÁ£££1
Ìí¼Ó£Á£££2
ɾ³ý£Â£££3
Ð޸ģ£££4
Ìí¼Ó£Â£££5
¡£¡£ ......
תÔØ×Ô£ºwww.csdn.net
2003 Äê 1 ÔÂ
ÔÚ¿ªÔ´ÊÀ½çÖУ¬ÓÐÁ½ÌױȽÏÓÐÓ°ÏìµÄAPI¿É¹©Ê¹Óã¬Ò»¸öÊÇPOI£¬Ò»¸öÊÇjExcelAPI¡£ÆäÖÐjExcelAPIÊÇÒ»¸öº«¹ú³ÌÐòÔ±µÄ×÷Æ·£¬ËäȻûÓÐPOIÄÇÑùѪͳ¸ß¹ó£¬µ«ÊÇÔÚ±ÊÕßµÄʹÓùý³ÌÖУ¬¸Ð¾õ¼òµ¥·½±ã£¬¶ÔÖÐÎÄÖ§³Ö·Ç³£ºÃ£¬¹¦ÄÜÒ²±È½ÏÇ¿´ó¡£ËüµÄÏÂÔصØÖ·ÊÇ£ºhttp://www.andykhan.com/jexcelapi/ µ±Ç ......
Ò»¸öÓÅÐãµÄJava³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷ÔÀí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷ÔÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩJava³ÌÐòÉ ......
ת×Ô£ºhttp://blog.csdn.net/babydavic/archive/2007/08/23/1755718.aspx
ϵͳÊôÐÔ
ÊÇÖ¸ÓëÓû§³ÌÐòÏà¹ØµÄ²Ù×÷ϵͳÅäÖÃÐÅÏ¢ÒÔ¼°Èí¼þÐÅÏ¢¡£Í¨³£ÓëÓû§³ÌÐòÏà¹ØµÄÊôÐԹؼü×Ö°üÀ¨£º
¡¡¡¡¡ñfile.separator:Îļþ·Ö¸ô·û£¬
Windows
»·¾³ÏÂΪ“"£¬
Unix
»·¾³ÏÂΪ&ldquo ......