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

ÀûÓÃwebservice»ñÈ¡¹É¼Û(java)

×î½üÏîÄ¿ÖÐÓÐÐèÒªÓõ½¹É¼Û£¬ÓÚÊÇÔÚÍøÉÏÕÒÁËÒ»·¬£¬Ã»ÓÐÒ»¸öÖ±½Ó¾ÍÄÜÓõġ£×Ô¼ºÃþË÷ÁËһϣ¬ÖÕÓڸ㶨һ¸ö¹Ë´ó¼Ò²Î¿¼¡£
package test;
import java.util.Arrays;
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
/**
*
* ¹¦ÄܸÅÊö£º<br>
*
* @author applerockhool
* @version 2010-4-29
*/
public class Test {
public static void main(String[] args) {
try {
// WebService URL,Ïêϸ˵Ã÷Ö±½Ó½øÈëÍøÖ·
String service_url = "http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(service_url));
// ÉèÖÃÒªµ÷Óõķ½·¨
call.setOperationName(new QName("http://WebXml.com.cn/",
"getStockInfoByCode"));
// ¼ÓÈë²ÎÊý
call.addParameter(
new QName("http://WebXml.com.cn/", "theStockCode"),
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
// É趨·µ»ØÀàÐÍ
call.setReturnClass(String[].class);
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://WebXml.com.cn/getStockInfoByCode");
// É趨¹ÉƱ´úÂë
String code = "sh600028";
/*
* ¡¾·µ»Ø½á¹û˵Ã÷:¡¿
* String(0)¹ÉƱ´úºÅ¡¢String(1)¹ÉƱÃû³Æ¡¢String(2)ÐÐÇéʱ¼ä¡¢String(3)×îмۣ¨Ôª£©¡¢
* String(4)×òÊÕÅÌ£¨Ôª£©¡¢String(5)½ñ¿ªÅÌ£¨Ôª£©¡¢String(6)Õǵø¶î£¨Ôª£©¡¢String(7)×îµÍ£¨Ôª£©¡¢
* String(8)×î¸ß£¨Ôª£©¡¢String(9)Õǵø·ù£¨%£©¡¢String(10)³É½»Á¿£¨ÊÖ£©¡¢String(11)³É½»¶î£¨ÍòÔª£©¡¢
* String(12)¾ºÂò¼Û£¨Ôª£©¡¢String(13)¾ºÂô¼Û£¨Ôª£©¡¢String(14)ί±È£¨%£©¡¢String(15)-String(19)ÂòÒ» -
* ÂòÎ壨Ԫ£©/ÊÖ¡¢String(20)-String(24)ÂôÒ» - ÂôÎ壨Ԫ£©/ÊÖ¡£
*/
String[] result = (String[]) call.invoke(new Object[] { code });
System.out.println(Arrays.deepToString(result));
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
×¢Ò⣺


Ïà¹ØÎĵµ£º

Nutz Java ±àÂë¹æ·¶ (V1.0)

Nutz Java ±àÂë¹æ·¶ (V1.0) By:zozoh 0. ¹æ·¶µÄ¹æ·¶ 1. ´úÂë¸ñʽ 2.1 °ü 2.2 ÀàºÍ½Ó¿Ú 2.3 ³ÉÔ±±äÁ¿ 2.4 ³£Á¿ 2.5 ¾Ö²¿±äÁ¿ 2.6 ³ÉÔ±º¯ÊýºÍ¾²Ì¬º¯Êý ......

MySqlÓëJavaµÄʱ¼äÀàÐÍ

MySqlµÄʱ¼äÀàÐÍÓР         JavaÖÐÓëÖ®¶ÔÓ¦µÄʱ¼äÀàÐÍ
date                                  ......

Java²¢·¢±à³Ì ÉÏ

Ò»¡¢Ïß³Ì
1 Ï̵߳Ĵ´½¨
´´½¨Ïß³Ìͨ³£ÓÐÁ½ÖÖ·½·¨: 1) À©Õ¹ThreadÀàʵÏÖÏ̵߳Ĵ´½¨ÊÇ×î³£ÓÃÒ²ÊÇ×îÖ±½ÓµÄÒ»ÖÖ·½·¨£¬Í¨¹ý¼Ì³ÐÀàThreadʵÏÖÏß³ÌÌ壻2) ͨ¹ýʵÏÖRunnable½Ó¿ÚʵÏÖÏß³ÌÌå¡£
2 ThreadÀàµÄ¼¸ÖÖ¹¹Ô캯Êý
    1) Thread()
    2) Thread(Runnable target)
    3) T ......

java·ÖÒ³´úÂëÓÃÓÚjsp¼°java²¢´øÓвâÊÔ·½·¨


import java.util.ArrayList;
import java.util.List;
public class FenYe
{
     static double allpage=0; //×ÜÒ³Êý
     static double currpage=0; //µ±Ç°Ò³
     static double pagesize=10; //ÏÔʾÐÐ
     static int sta ......

java ÊÂÎñÏÝÚå

ÕâƪÎÄ×ÖдµÄºÜºÃ£¬ÍƼö¸ø×Ô¼ººÍ´ó¼Ò£¡
ÊÂÎñ²ßÂÔ: Á˽âÊÂÎñÏÝÚå
ÔÚ Java ƽ̨ÖÐʵÏÖÊÂÎñʱҪעÒâµÄ³£¼û´íÎó
 
 
 
¼¶±ð£º Öм¶
Mark Richards, Ö÷¹ÜºÍ¸ß¼¶¼¼Êõ¼Ü¹¹Ê¦, Collaborative Consulting, LLC
2009 Äê 3 ÔÂ 06 ÈÕ
ÊÂÎñ´¦ÀíµÄÄ¿±êÓ¦¸ÃÊÇʵÏÖÊý¾ÝµÄ¸ß¶ÈÍêÕûÐÔºÍÒ»ÖÂÐÔ¡£±¾ÎÄÊÇΪ Java ƽ̨¿ª· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ