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¿ª·¢µÄ ......
À´µ½±±¾©´«ÖDz¥¿ÍÒ»ÔÂÓÐÓà ÉîÓид¥
ÕýËùνı¶¨¶øºó¶¯ Ãæ¶Ô¹úÄÚ·×˵ÖÚÜ¿µÄÅàѵ»ú¹¹ °³ºÜÔÎ
ÏÈ˵˵µØÀíλÖÃ×î½üµÄ±¾ÍÁÅàѵ»ú¹¹°É òËƽÌѧʱ¼ä±È½Ï³¤ ÒªÒ»ÄêÖ®¾Ã Ö÷ÒªÕÐÊÕÔÚУ´óѧÉú ½Ìѧʱ¼äÊÇÍíÉÏ µÚÒ»¸ö±»±»ÈËpass
´Ó¶ø¿ªÊ¼Ñ°ÕÒÔÚÊ¡»áµÄÅàѵ»ú¹¹ òËÆѧ·ÑÌ«¹ó ºÍ±¾ÈËÔ¤ËãÓÐËù³åÍ» pass
×îºóÎÒÖÕÓÚÕ ......
ÔںܶàʱºòÎÒÃÇÐèÒª½«Ò»¸ö¸øÁËÍêÕû·¾¶µÄÀà¶ÔÏó×Ö·û´®×ª»»³ÉÒ»¸öÀàµÄʵÀý¶ÔÏ󣬾ͱÈÈç˵ÓÐÒÔÏÂÕâÑùµÄÒ»¸ö×Ö·û´®
String menAction= "gef.putin.step.ui.SystemMenuTest(xiajiaji)"ÔÚ¸ÃÀàÖÐÐèÒªÓÐÓÐÒ»¸ö×Ö·û´®¸ñʽµÄ²ÎÊý£¬µ±È»¶à¸ö²ÎÊýÒ²¿ÉÒÔ£¬ÎÒÒѾ½«¶à¸ö²ÎÊýµÄ¿¼ÂǽøÈ¥£¬¶Ô¸Ä×Ö·û´®½øÐнâÎö¾Í¿ÉÒÔת»»³ÉÀàµÄʵÀý¶Ô ......
JavaÖÐÌṩÁ˷ḻµÄÈÕÆÚ±íʾ·½Ê½¡£ÆäÖаüÀ¨Date¡¢Timestamp¡¢Calendar¡¢GregorianCalendarÀà¡£GregorianCalendarÀàÖÐÌṩÁËÓÃÓÚ¼ÆËãÈÕÆÚµÄadd()·½·¨£¬¿ÉÒԺܷ½±ãµØ¼ÆËãÈô¸ÉÄê¡¢Ô¡¢ÈÕºóµÄÈÕÆÚ¡£
¸ø¸öÀý×Ó¿´¿´£º
package testjava;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import ......
package com.test.For_Each;
¡¡¡¡import java.util.ArrayList;
¡¡¡¡import java.util.Iterator;
¡¡¡¡import java.util.List;
¡¡¡¡public class ForTest
¡¡¡¡{
¡¡¡¡public static void main(String args[])
¡¡¡¡{
¡¡¡¡int arr[] = {1, 2, 3, 4, 5, 6, 7, 8};
¡¡¡¡/**
¡¡¡¡* ÐÂʽд·¨
¡¡¡¡*/
¡¡¡¡f ......