Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃJAX WSʵÏÖjavaµ÷ÓÃwebServic

À´¸ö¼òµ¥µãµÄ£º
1.½¨¸ö¾ßÌåµÄ·þÎñʵÏÖ£º
package com.webservice;
@WebService
public class Warehouse {
 private Map<String, Double> prices;
 public Warehouse() {
  prices = new HashMap<String, Double>();
  prices.put("Blackwell Toaster", 24.95);
  prices.put("ZapXpress Microwave Oven", 49.95);
 }
 public double getPrice(@WebParam(name = "description")
 String description) {
  Double price = prices.get(description);
  return price == null ? 0 : price;
 }
}
2¡£Éú³É´æ¸ù£¨stub£© µÄclasses£¬ÔÚRMIÖÐÕâ»á×Ô¶¯Éú³É¡£WebServiceÖпÉÓÃJAX-WS¹¤¾ßÉú³É£º
 ½øµ½¹¤³ÌµÄclassesĿ¼Ï£º
 wsgen -classpath . com.webservice.Warehouse
 ÔÚcom.webservice.jaxwsÖлáÉú³ÉһЩclassÀ࣬ÔÚÕâÀïµÄÊÇGetPrice.classºÍGetPriceResponse.class
 ÆäʵҲ¾ÍÊǰѲÎÊýºÍ·µ»ØÖµ°ü×°µÄÀà¡£
3¡£ÊÇʱºò²¿ÊðÁË£¬ÔÚÕâÀÎÒÃÇÓÃjdkÌṩµÄ¼òµ¥»úÖÆ£º
package com.webservice;
public class WarehouseServer {
 public static void main(String[] args) {
  Endpoint.publish("http://localhost:8080/WebService/warehouse", new Warehouse());
 }
}
ÔËÐкó£¬ÔÚä¯ÀÀÆ÷ÀïÇÃÉÏÉÏÃæµÄµØÖ· http://localhost:8080/WebService/warehouse?wsdl ¾Í¿ÉÒÔ¿´µ½WebServiceÌṩµÄÐÅÏ¢£º
  <?xml version="1.0" encoding="UTF-8" ?>
- <!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK 6.
  -->
- <!--  Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1 in JDK 6.
  -->
- <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.com/" name="WarehouseService">
- <types>
-  <xsd:schema>
    <xsd:import namespace="http://webservice.com/" schemaLocation="http://localhost:8080/WebService/warehous


Ïà¹ØÎĵµ£º

java classLoader Ìåϵ½á¹¹

jvm classLoader architecture£º
1. Bootstrap ClassLoader/Æô¶¯Àà¼ÓÔØÆ÷
Ö÷Òª¸ºÔðjdk_home/libĿ¼ÏµĺËÐÄ api »ò -Xbootclasspath Ñ¡ÏîÖ¸¶¨µÄjar°ü×°È빤×÷¡£
2. Extension ClassLoader/À©Õ¹Àà¼ÓÔØÆ÷
Ö÷Òª¸ºÔðjdk_home/lib/extĿ¼ÏµÄjar°ü»ò -Djava.ext.dirs Ö¸¶¨Ä¿Â¼ÏµÄjar°ü×°È빤×÷¡£
3 ......

Java ÔËËã·û×ܼÆ

1.ËãÊõÔËËã·û
    JavaµÄËãÊõÔËËã·û·ÖΪһԪÔËËã·ûºÍ¶þÔªÔËËã·û¡£Ò»ÔªÔËËã·ûÖ»ÓÐÒ»¸ö²Ù×÷Êý£»¶þÔªÔËËã·ûÓÐÁ½¸ö²Ù×÷Êý£¬ÔËËã·ûλÓÚÁ½¸ö²Ù×÷ÊýÖ®¼ä¡£ËãÊõÔËËã·ûµÄ²Ù×÷Êý±ØÐëÊÇÊýÖµÀàÐÍ¡£
    (1)Ò»ÔªÔËËã·û£º
    Ò»ÔªÔËËã·ûÓУºÕý£¨+£©¡¢¸º£¨£­£©¡¢¼Ó1£¨++£©ºÍ¼õ1£¨£­£­£ ......

JAVA×Ö·û´®Àà

import java.util.*;
import java.util.regex.Pattern;
public class StrTools {
/**
* ·Ö¸î×Ö·û´®
*
* @param str String ԭʼ×Ö·û´®
* @param splitsign String ·Ö¸ô·û
* @return String[] ·Ö¸îºóµÄ×Ö·û´®Êý×é
*/
@SuppressWarnings("unchecked")
public static String[] split(Stri ......

JAVA ÅÀÍøÒ³ÓÃ ÀýÈç:http://www.126.com

/*
Function name: myGetHttpFile2
Description: ÅÀÍøÒ³ÓÃ
Input: URL ÀýÈç:http://www.126.com
Output: ×Ö·û´®,ÍøÒ³µÄHTML
*/
public String myGetHttpFile2(String url){
String authentication=null;
ArrayList al=new ArrayList();
String PageURL = url;
......

javaʱ¼äº¯Êý

 http://blog.sina.com.cn/s/blog_503cf9f80100b9lf.html
javaʱ¼äº¯Êý(2008-12-06 22:25:46)
<> ±êÇ©£ºÔÓ̸ 
×¢Ò⣺java.utilºÍjava.sqlÖж¼ÓÐDateÕâ¸öÀ࣬²»ÖªµÀÓÃÄÄÒ»¸öÁË£¬Äã¿ÉÒÔдËÀjava.sql.Date time = .....
1. Java¼ÆËãʱ¼äÒÀ¿¿1970Äê1ÔÂ1ÈÕ¿ªÊ¼µÄºÁÃëÊý.     &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ