JAVA ÖеÄWeb ·þÎñ¹æ·¶£º
JAVA Öй²ÓÐÈýÖÖWebService ¹æ·¶£¬·Ö±ðÊÇJAXM&SAAJ¡¢JAX-WS£¨JAX-RPC£©¡¢JAX-RS¡£
ÏÂÃæÀ´·Ö±ð¼òÒªµÄ½éÉÜÒ»ÏÂÕâÈý¸ö¹æ·¶¡£
(1.)JAX-WS£º
JAX-WS£¨Java API For XML-WebService£©£¬JDK1.6 ×Ô´øµÄ°æ±¾ÎªJAX-WS2.1£¬Æäµ×²ãÖ§
³ÖΪJAXB¡£ÔçÆڵĻùÓÚSOAP µÄJAVA µÄWeb ·þÎñ¹æ·¶JAX-RPC£¨Java API For
XML-Remote Procedure Call£©Ä¿Ç°ÒѾ±»JAX-WS ¹æ·¶È¡´ú£¬JAX-WS ÊÇJAX-RPC µÄÑݽø
°æ±¾£¬µ«JAX-WS ²¢²»ÍêÈ«Ïòºó¼æÈÝJAX-RPC£¬¶þÕß×î´óµÄÇø±ð¾ÍÊÇRPC/encoded ÑùʽµÄ
WSDL£¬JAX-WS ÒѾ²»ÌṩÕâÖÖÖ§³Ö¡£JAX-RPC µÄAPI ´ÓJAVA EE5 ¿ªÊ¼ÒѾÒƳý£¬Èç
¹ûÄãʹÓÃJ2EE1.4£¬ÆäAPI λÓÚjavax.xml.rpc.*°ü¡£
JAX-WS£¨JSR 224£©¹æ·¶µÄAPI λÓÚjavax.xml.ws.*°ü£¬ÆäÖд󲿷ֶ¼ÊÇ×¢½â£¬ÌṩAPI ²Ù
×÷Web ·þÎñ£¨Í¨³£ÔÚ¿Í»§¶ËʹÓõĽ϶࣬ÓÉÓÚ¿Í»§¶Ë¿ÉÒÔ½èÖúSDK Éú³É£¬Òò´ËÕâ¸ö°üÖеÄ
API ÎÒÃǽÏÉÙ»áÖ±½ÓʹÓã©¡£
WS-MetaData£¨JSR 181£©ÊÇJAX-WS µÄÒÀÀµ¹æ·¶£¬ÆäAPI λÓÚjavax.jws.*°ü£¬Ê¹ÓÃ×¢½âÅä
Öù«¿ªµÄWeb ·þÎñµÄÏà¹ØÐÅÏ¢ºÍÅäÖÃSOAP ÏûÏ¢µÄÏà¹ØÐÅÏ¢¡£
(2.)JAXM&SAAJ£º
JAXM£¨JAVA API For XML Message£©Ö÷Òª¶¨ÒåÁË°üº¬ÁË·¢ËͺͽÓÊÕÏûÏ¢ËùÐèµÄAPI£¬Ï൱
ÓÚWeb ·þÎñµÄ·þÎñÆ÷¶Ë£¬ÆäAPI λÓÚjavax.messaging.*°ü£¬ËüÊÇJAVA EE µÄ¿ÉÑ¡°ü£¬Òò´Ë
ÄãÐèÒªµ¥¶ÀÏÂÔØ¡£
SAAJ£¨SOAP With Attachment API For Java£¬JSR 67£©ÊÇÓëJAXM ´îÅäʹÓõÄAPI£¬Îª¹¹½¨
SOAP °üºÍ½âÎöSOAP °üÌṩÁËÖØÒªµÄÖ§³Ö£¬Ö§³Ö¸½¼þ´«Ê䣬ËüÔÚ·þÎñÆ÷¶Ë¡¢¿Í»§¶Ë¶¼ÐèÒª
ʹÓá£ÕâÀﻹҪÌáµ½µÄÊÇSAAJ ¹æ·¶£¬ÆäAPI λÓÚjavax.xml.soap.*°ü¡£
JAXM&SAAJ ÓëJAX-WS ¶¼ÊÇ»ùÓÚSOAP µÄWeb ·þÎñ£¬Ïà±ÈÖ®ÏÂJAXM&SAAJ ±©Â©ÁËSOAP
¸ü¶àµÄµ×²ãϸ½Ú£¬±àÂë±È½ÏÂé·³£¬¶øJAX-WS ¸ü¼Ó³éÏó£¬Òþ²ØÁ˸ü¶àµÄϸ½Ú£¬¸ü¼ÓÃæÏò¶Ô
Ïó£¬ÊµÏÖÆðÀ´Äã»ù±¾Éϲ»ÐèÒª¹ØÐÄSOAP µÄÈκÎϸ½Ú¡£ÄÇôÈç¹ûÄãÏë¿ØÖÆSOAP ÏûÏ¢µÄ¸ü
¶àϸ½Ú£¬¿ÉÒÔʹÓÃJAXM&SAAJ£¬Ä¿Ç°°æ±¾Îª1.3¡£
(3.)JAX-RS£º
JAX-RS ÊÇJAVA Õë¶ÔREST(Representation State Transfer)·ç¸ñÖƶ¨µÄÒ»Ì×Web ·þÎñ¹æ·¶£¬
ÓÉÓÚÍƳöµÄ½ÏÍí£¬¸Ã¹æ·¶£¨JSR 311£¬Ä¿Ç°JAX-RS µÄ°æ±¾Îª1.0£©²¢Î´ËæJDK1.6 Ò»Æð·¢ÐУ¬
ÄãÐèÒªµ½JCP Éϵ¥¶ÀÏÂÔØJAX-RS ¹æ·¶µÄ½Ó¿Ú£¬ÆäAPI λÓÚjavax.ws.rs.*°ü¡£
ÕâÀïµÄJAX-WS ºÍJAX-RS ¹æ·¶ÎÒÃDzÉÓÃApache CXF ×÷ΪʵÏÖ£¬CXF ÊÇObjectweb Celtix
ºÍCodehaus XFire ºÏ²¢¶ø³É¡£CXF µÄºËÐÄÊÇorg.apache.cxf.Bus£¨×ÜÏߣ©£¬ÀàËÆ
Ïà¹ØÎĵµ£º
²ÉÓÃÓûÑïÏÈÒÖµÄÊÖ·¨Ì¸Ì¸java:
javaûÓÐÖ¸ÕëÖ»ÓÐÒýÓÃÊÇ×î´óµÄ°Ü±Ê.ÕýÒòΪûÓÐÖ¸Õë,ºÜ¶à²Ù×÷ÒªÓØ»ØÍñת;À¬»øÊÕ¼¯»úÖÆÒ²¾õµÃÊǼ¦Àß,д¸öÎö¹¹º¯ÊýÕæµÄÄÇô¸´ÔÓÂð, ÓбØÒªÎþÉüÁé»îÐÔÂð;º¯Êýµ÷ÓõĴú¼ÛÖ®¸ßÈÃÈË×¥¿ñ
µ«ÎÒ»¹ÊÇÑ¡ÔñÁËËý:
javaµÄ´¿ÃæÏò¶ÔÏóÌØ ......
Bean Serializable Interface µÄ½Ó¿ÚÈÃBEAN¿ÉÒÔ´®Ðл¯£¬½«Æä±ä³ÉÒ»¸ö¿É±£´æΪÒÔºóʹÓõĶþ½øÖÆÁ÷¡£µ±Ò»¸öBEAN±»ÏµÁл¯µ½´ÅÅÌÉÏ»òÕßÆäËûÈκεط½£¬Æä״̬±»±£´æÆðÀ´£¬ÆäÖеÄÊôÐÔÖµÒ²²»»á¸Ä±ä¡£ÔÚBEANµÄ¹æ·¶ÖУ¬JSP²¢Ã»ÓÐÒªÇóBEANʵÏÖSerializable½Ó¿Ú¡£µ«ÊÇ£¬Èç¹ûÄúÏ£Íû×Ô¼º¿ØÖÆÄúËù´´½¨µÄ×é¼þµÄserialization½ø³Ì£¬»òÕßÄúÏë ......
ÐòÁл¯µÄ¹ý³Ì¾ÍÊǶÔÏóдÈë×Ö½ÚÁ÷ºÍ´Ó×Ö½ÚÁ÷ÖжÁÈ¡¶ÔÏó¡£½«¶ÔÏó״̬ת»»³É×Ö½ÚÁ÷Ö®ºó£¬¿ÉÒÔÓÃjava.io°üÖеĸ÷ÖÖ×Ö½ÚÁ÷ÀཫÆä±£´æµ½ÎļþÖУ¬¹ÜµÀµ½ÁíÒ»Ïß³ÌÖлòͨ¹ýÍøÂçÁ¬½Ó½«¶ÔÏóÊý¾Ý·¢Ë͵½ÁíÒ»Ö÷»ú¡£¶ÔÏóÐòÁл¯¹¦Äܷdz£¼òµ¥¡¢Ç¿´ó£¬ÔÚRMI¡¢Socket¡¢JMS¡¢EJB¶¼ÓÐÓ¦Ó᣶ÔÏóÐòÁл¯ÎÊÌâÔÚÍøÂç±à³ÌÖв¢²»ÊÇ× ......
ÕâÊÇÎÒÔÚ°²×°ÍêUbuntu9.10ºó´ÓÍøÉÏËѵÄһЩ¹ØÓÚÅäÖÃJava¿ª·¢»·¾³µÄ×ÊÁÏ£¬ÔÚÕâÀïÒªÌرð¸ÐлÔÎÄ×÷ÕßµÄÐÁÇÚÀͶ¯
Ï£ÍûÄÜ°ï·½±ã¸ü¶àµÄÈË£¬ÎÒ»áÔÚUbuntuµÄʹÓùý³ÌÖмÌÐøÊÕ¼¯ºÍ´´×÷һЩÏà¹Ø֪ʶ£¬Ï£ÍûÄܶԴó¼ÒÓÐËù°ïÖú£¡£¡£¡
תÔØÇë±êÃ÷³ö´¦£º
xxm19820127
http://blog.csdn.net/xxm19820127/archive/201 ......
/////////////////////DogTestDrive/////////////////////
class DogTestDrive {
public static void main(String[] args) {
Dog one = new Dog();
one.size = 70;
Dog two = new Dog();
two.size = 8;
......