javaµ÷ÓÃ.netµÄweb services
.net´úÂëÈçÏ£¬
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
//ÈôÒªÔÊÐíʹÓà ASP.NET AJAX ´Ó½Å±¾Öе÷ÓÃ´Ë Web ·þÎñ£¬ÇëÈ¡Ïû¶ÔÏÂÐеÄ×¢ÊÍ¡£
// [System.Web.Script.Services.ScriptService]
public class SysService : System.Web.Services.WebService
{
public SysService()
{
//Èç¹ûʹÓÃÉè¼ÆµÄ×é¼þ£¬ÇëÈ¡Ïû×¢ÊÍÒÔÏÂÐÐ
//InitializeComponent();
}
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
http://localhost:1937/Web/SysService.asmx?wsdl
ÓÃeclipse¹¤¾ßÉú³É¿Í»§¶Ë´úÂ룺
Ñ¡Öй¤³Ì--¡·Ð½¨-¡·ÆäËû-¡·web services ¿Í»§¶Ë £¬°Ñhttp://localhost:1937/Web/SysService.asmx?wsdl µØÖ·ÊäÈë½øÈ¥
ÏÂÒ»²½ ÏÂÒ»²½ ×îºóÍê³É
¾Í»áÉú³ÉjavaµÄ¿Í»§¶Ë´úÂë
µ÷Óãº
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
public class test {
/**
* @param args
* @throws ServiceException
* @throws RemoteException
*/
public static void main(String[] args) throws ServiceException, RemoteException {
SysServiceLocator locator;
SysServiceSoap locatorService;
locator = new SysServiceLocator();
locatorService = locator.getSysServiceSoap();
String output = locatorService.helloWorld();
System.out.println("-------------"+output);
}
}
×îºóÊä³ö£º¾¯¸æ: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
-------------Hello World
Ïà¹ØÎĵµ£º
import java.io.*;
public class QueueArray {
Object[] a; //¶ÔÏóÊý×飬¶ÓÁÐ×î¶à´æ´¢a.length-1¸ö¶ÔÏó
int front; //¶ÓÊ×ϱê
int rear; //¶Óβϱê
public Qu ......
Static Factory Methods
Four Advantages:
1) have names
2) not required to create a new object each time they are invoked
3) return an object of any subtype of their return type
4) reduce the verbosity of creating parameterized type instances.(for example: newInstance() method) ......
JavaÓëC++×î´óµÄ²»Í¬µÄ£¬JavaÍêÈ«ÊÇÃæÏò¶ÔÏóµÄ£¬ÊÇÓÉÀ๹³ÉµÄ£¬¶øC++ÊÇÓɶÔÏóÓë¹ý³Ì×é³É¡£
1¡¢Â·¾¶£º
Java°üÀ¨Ò»¸ö°üpackage,C++ûÓУ»
2¡¢ÒýÈëÀà
java import.*.*; C++ include ""';
3¡¢Ô¤¶¨Ò壬
C++°üÀ¨Ô¤¶¨Ò壬Java²»°üÀ¨
4¡¢½á¹¹
C++°üÀ¨½á¹¹£¬JavaÖ»°üÀ¨À࣬½á¹¹Ìå¿ÉÒÔת»¯ÎªÀà¡£
5¡¢ÀàÃûÓëÎļþÃû
Jav ......
2009-12-01 12:06:43
JUnit
JUnitÊÇÓÉ Erich Gamma ºÍ Kent Beck ±àдµÄÒ»¸ö»Ø¹é²âÊÔ¿ò¼Ü£¨regression testing framework£©¡£Junit²âÊÔÊdzÌÐòÔ±²âÊÔ£¬¼´Ëùν°×ºÐ²âÊÔ£¬ÒòΪ³ÌÐòÔ±ÖªµÀ±»²âÊÔµÄÈí¼þÈçºÎ£¨How£©Íê³É¹¦ÄܺÍÍê³ÉʲôÑù£¨What£©µÄ¹¦ÄÜ¡£JunitÊÇÒ»Ì׿ò¼Ü£¬¼Ì³ÐTestCaseÀ࣬¾Í¿ÉÒÔÓÃJunit½øÐÐ×Ô¶¯²âÊÔÁË¡ ......