java·ÃÎÊ.net ·¢²¼µÄwebservice
ÍæÁËһ϶ÌÐÅ裺
ÓÃ.net·ÃÎʶÌÐÅ裬²¢Ð´ÁË·¢ËͶÌÐÅ¡¢¶Á¶ÌÐÅ£¨ÕâÀïµÄ¶Á¶ÌÐÅÊǶÁÈ¡SIM¿¨ÖнÓÊÕµ½µÄ¶ÌÐÅ£©¡¢Åж϶ÌÐÅèÊÇ·ñ´ò¿ª¡¢´ò¿ªµÈ·½·¨¡£²¢·¢²¼ÁËwebserviceÓÃÓÚjava¹¤³Ìµ÷Óá£
ÕâÀïÖ»ÁгöÁ˵÷ÓõĴúÂ루java£©²»×ãÖ®´¦ÇëÖ¸½Ì£¡
/**
* ³õʼ»¯call
*/
private void inItCall() {
try {
Service service = new Service();
call = (Call) service.createCall();
} catch (ServiceException e) {
e.printStackTrace();
}
}
/**
* Åж϶ÌÐÅèÊÇ·ñ´ò¿ª
*/
public Boolean ModemIsOpen(String password) {
if (call == null) {
inItCall();
}
Boolean flag = false;
try {
String soapActionURI = "http://tempuri.org/ModemIsOpen";
call.setUseSOAPAction(true);
call.setSOAPActionURI(soapActionURI);
call.setOperationName(new QName(endpoint, "ModemIsOpen"));
flag = Boolean.parseBoolean((String)call.invoke(new Object[]{password}));
} catch (RemoteException e) {
e.printStackTrace();
}
return flag;
}
/**
* ´ò¿ª¶ÌÐÅè
*/
public Boolean OpenModem(String password) {
if (call == null) {
inItCall();
}
Boolean flag = false;
try {
String soapActionURI = "http://tempuri.org/OpenModem";
call.setUseSOAPAction(true);
call.setSOAPActionURI(soapActionURI);
call.setOperationName(new QName(endpoint, "OpenModem"));
flag = Boolean.parseBoolean((String)call.invoke(new Object[]{password}));
} catch (RemoteException e) {
e.printStackTrace();
}
return flag;
}
/**
* ¶ÁÈ¡¶ÌÐÅÏ¢
* ·µ»Ø×Ö·û´®¸ñʽ£»strs[i] like that: µç»°|||ÄÚÈÝ
*/
public String[] ReadSMS(String password) {
if (call == null) {
inItCall();
}
String[] flag = null;
try {
String soapActionURI = "http://tempuri.org/ReadSMS";
call.setUseSOAPAction(true);
call.setSOAPActionURI(soapActionURI);
call.setOperationName(new QName(endpoint, "ReadSMS"));
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setReturnClass(java.lang.String[].class);
call.addParameter(new QNam
Ïà¹ØÎĵµ£º
»¥ÁªÍø³åÀ˰壬ÊÇGoogle app Engine ÔÆ¼ÆËãÆ½Ì¨ÉϵÄÒ»¸ö²©¿Í£¬ÊÇ»ùÓÚGoogle App engine for Java¿ª·¢µÄ¡£
ÔʼµÄÒâͼÊÇÒòΪٶù»¹Ð¡£¬ÏÖÔÚ»¹²»»áÔĶÁ£¬¶øÎÒÔÚÉÏÍøÊ±¾³£¿´µ½Ò»Ð©ÓÐÒæÓÐȤÉõÖÁ¿ÉÒÔ°ïÖúѧϰµÄһЩÄÚÈÝ£¬¾ÍÏë°ÑËü¼ÇÏÂÀ´Ð´ÔÚ²©¿ÍÀ¹©Å®¶ù³¤´óÔÙÈ¥¿´¿´¡£
ÁíÍ⣬ÎÒ»¹Ã»Óз¢ÏÖGoogle App engine for Java¿ª·¢µÄ ......
ÔںܶàʱºòÎÒÃÇÐèÒª½«Ò»¸ö¸øÁËÍêÕû·¾¶µÄÀà¶ÔÏó×Ö·û´®×ª»»³ÉÒ»¸öÀàµÄʵÀý¶ÔÏ󣬾ͱÈÈç˵ÓÐÒÔÏÂÕâÑùµÄÒ»¸ö×Ö·û´®
String menAction= "gef.putin.step.ui.SystemMenuTest(xiajiaji)"ÔÚ¸ÃÀàÖÐÐèÒªÓÐÓÐÒ»¸ö×Ö·û´®¸ñʽµÄ²ÎÊý£¬µ±È»¶à¸ö²ÎÊýÒ²¿ÉÒÔ£¬ÎÒÒѾ½«¶à¸ö²ÎÊýµÄ¿¼ÂǽøÈ¥£¬¶Ô¸Ä×Ö·û´®½øÐнâÎö¾Í¿ÉÒÔת»»³ÉÀàµÄʵÀý¶Ô ......
×î½üÑо¿ÏÂsocket,ctrl+vÁËÏÂÍøÉϵĶ«Î÷:
ÊÂʵÉÏÍøÂç±à³Ì¼òµ¥µÄÀí½â¾ÍÊÇÁ½Ì¨¼ÆËã»úÏ໥ͨѶÊý¾Ý¶øÒÑ¡£¶ÔÓÚ³ÌÐòÔ±¶øÑÔ£¬È¥ÕÆÎÕÒ»ÖÖ±à³Ì½Ó¿Ú²¢Ê¹ÓÃÒ»ÖÖ±à³ÌÄ£ÐÍÏà¶Ô¾Í»áÏԵüòµ¥µÄ¶àÁË¡£Java SDKÌṩһЩÏà¶Ô¼òµ¥µÄApiÀ´Íê³ÉÕâЩ¹¤×÷£¬Socket¾ÍÊÇÆäÖÐÖ®Ò»¡£
¡¡¡¡¶ÔÓÚJava¶øÑÔ¡£ÕâЩApi´æÔÚÓëJava.netÕâ¸ö ......
Ò»¸öÓÅÐãµÄJava³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷ÔÀí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷ÔÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩJava³ÌÐòÉ ......