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

Javaµ÷ÓÃ.NETµÄWebService

1£®  »ù±¾¿â
cxf-2.2.4.jar
XmlSchema-1.4.5.jar
Wsdl4j-1.6.2.java
2£®  ÔÚ.NETÖбàд·þÎñ£¬Ä¬ÈϲÎÊý¼´¿É£¬È磺
namespace TestService2Java
{
    [WebService(Namespace = "http://temp2java.org/")]    //½ö´Ë´¦ÉÔ¼ÓÐ޸ģ¬²»¸ÄÒ²¿É
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class Service1 : System.Web.Services.WebService
    {
        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
        [WebMethod]
        public int MathAdd(int a, int b)   //¶¨ÒåÒ»¸öз½·¨
        {
            return a + b;
        }
    }
}
3£®  Éú³ÉJavaÖÐʹÓõÄÀ࣬ʹÓÃwsdl2java£º
wsdl2java –p test.net.service –d d:\src http://localhost/svr2java/Service1.asmx?wsdl
½«Éú³ÉÎļþÖеÄService1Soap.javaµ¼ÈëjavaÏîÄ¿¡£
±¸×¢£º//@XmlSeeAlso({ObjectFactory.class})£¬·ñÔòµ÷Óûá³ö´í¡£
4£®  µ÷Ó÷þÎñ£º
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import java.net.URL;
public class CallDotNetService {
    public final static QName SERVICE = new QName("http://temp2java.org/", "Service1");
    public final static QName Service1Soap = new QName("http://temp2java.org/", "Service1Soap");
private CallDotNetService() {   }
public static void main(String args[]) throws Exception {
     URL wsdlURL = new URL("http://localhost/svr2java/Service1.asmx?wsdl");
 


Ïà¹ØÎĵµ£º

Ô­´´Í¼Ê顶Java»ù´¡Óë°¸ÀýÏê½â¡·

 2009Äê9Ô³ö°æµÄ¡£Í¬ÊÇ¡¶Èí¼þ¿ª·¢¿ÎÌá·ÏµÁС£±¾ÈËÔÚ±¾ÊéÖбàдµÄÕ½ÚΪ£º
µÚ12Õ£º¶àÏß³Ì
µÚ13Õ£ºIOÁ÷
µÚ15Õ£º·´Éä
µÚ16Õ£º×¢½â
µÚ19Õ£ºÍøÂç±à³Ì
µÚ20Õ£ºÏîĿʵÀýÖ®ÍøÂç°æQQ
ͼÊé·âÃ棺
¹ºÂòÁ´½Ó£ºhttp://www.china-pub.com/195979&ref=ps ......

dz̸Java·ºÐͱà³Ì

 
dz̸Java·ºÐͱà³Ì
1 ÒýÑÔÔÚJDK 1.5ÖУ¬¼¸¸öеÄÌØÕ÷±»ÒýÈëJavaÓïÑÔ¡£ÆäÖÐÖ®Ò»¾ÍÊÇ·ºÐÍ£¨generics£©¡£·ºÐÍ£¨generics£¬genericity£©ÓÖ³ÆΪ“²ÎÊýÀàÐÍ»¯£¨parameterized type£©”»ò“Ä£°å£¨templates£©”£¬ÊǺͼ̳У¨inheritance£©²»Í¬¶ø»¥²¹µÄÒ»ÖÖ×é¼þ¸´ÓûúÖÆ¡£¼Ì³ÐºÍ·ºÐ͵IJ»Í¬Ö®´¦ÔÚÓÚ&mda ......

Java³õѧÕßÏ°Ìâ20µÀ£¨×ª£©

1.Java Ô´ÎļþÖÐ×î¶àÖ»ÄÜÓÐÒ»¸ö£¨£©À࣬ÆäËûÀàµÄ¸öÊý²»ÏÞ¡£
publicÀà,¶øÇÒÕâ¸öÀàµÄÀàÃûÒªºÍÎļþÃûÒ»ÖÂ.
2.ÃæÏò¶ÔÏó³ÌÐòÉè¼ÆµÄÌØÕ÷£¨·â×°ÐÔ£©£¨¼Ì³Ð£©£¨¶à̬ÐÔ£©
3.½Ó¿ÚÊÇÓÉ£¨³éÏó·½·¨£©ºÍ£¨³£Á¿£©×é³ÉµÄÌØÊâÀà
4.ÓÃstaticÐÞÊεķ½·¨ÊÇ£¨¾²Ì¬·½·¨£¬»òÀà·½·¨£©
5.ÔÚ²úÉúÒì³£µÄ·½·¨ÉùÃ÷ÖÐÉùÃ÷»á²úÉúµÄ ......

Java ±³¾°

 Ò»¡¢±³¾°
    ×î½üÒ»Äê¶àÀ´,ÔÚInternetÉϳöÏÖµÄÌرðÎüÒýÈ˵Äʼþ¾ÍÊÇJavaÓïÑÔºÍÓÃJava±àдµÄä¯ÀÀÆ÷HotJava¡£
1991Äê,SUNMicroSystem¹«Ë¾µÄJameGosling¡¢BillJoeµÈÈË,ΪÔÚµçÊÓ¡¢¿ØÖÆ¿¾Ãæ°üÏäµÈ¼ÒÓÃÏû·ÑÀàµç×Ó²úÆ·ÉϽøÐн»»¥Ê½²Ù×÷¶ø¿ª·¢ÁËÒ»¸öÃûΪOakµÄÈí¼þ(¼´Ò»ÖÖÏðÊ÷µÄÃû×Ö),µ«µ±Ê±²¢Ã»ÓÐÒýÆðÈËÃǵ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ