axis2 webservice入门学识(JS,Java,PHP调用实例源码)

来源:http://www.myexception.cn/web/952419.html

axis2 webservice入门知识(JS,Java,PHP调用实例源码)
背景简介
最近接触到一个银行接口的案子,临时需要用到axis2 webservice。自己现学现总结的一些东西,留给新手。少走弯路。
Axis2简介
①采用名为 AXIOM(AXIs Object Model)的新核心 XML 处理模型,利用新的XML解析器提供的灵活性按需构造对象模型。
②支持不同的消息交换模式。目前Axis2支持三种模式:In-Only、Robust-In和In-Out。In-Only消息交换模式只有SOAP请求,而不需要应答;Robust-In消息交换模式发送SOAP请求,只有在出错的情况下才返回应答;In-Out消息交换模式总是存在SOAP请求和应答。
③提供阻塞和非阻塞客户端 API。
④支持内置的 Web服务寻址 (WS-Addressing) 。
⑤灵活的数据绑定,可以选择直接使用 AXIOM,使用与原来的 Axis 相似的简单数据绑定方法,或使用 XMLBeans、JiBX 或 JAXB 2.0 等专用数据绑定框架。
⑥新的部署模型,支持热部署。
⑦支持HTTP,SMTP,JMS,TCP传输协议。
⑧支持REST (Representational State Transfer)。


测试环境
【jdk1.6.0】 +【tomcat-6.0.18】 + 【axis2-1.6.1】+【PHP Version 5.3.5】
未测试最低支持配置。


环境准备
一、部署Axis2环境.
1.下载安装
apache 官网下载地址:http://ws.apache.org/axis2/  选择 Standard Binary Distribution 和 WAR Distribution

2.配置系统环境变量:
①添加AXIS2_HOME变量并指向 Standard Binary Distribution解压目标目录。例如:$AXIS2_HOME$ =D:\axis2-1.6.1;
②将axis2.bat所在目录添加到系统环境变量path里。例如:将 D:\axis2-1.6.1\bin添加到path现有值的最后面;
③将$AXIS2_HOME$\lib添加到系统环境变量classpath里。例如:将D:\axis2-1.6.1\lib添加到classpath现有值的最后面。

3. 把WAR Distribution 解压到 $tomcat_home$\webapps\axis2下(新建axis2文件夹),当然你也可以参照axis2文档里列出的步骤使用ant 创建一个axis2.war ,放到$tomcat_home$\webapps下,然后启动tomcat ,那么tomcat会在webapps下自动创建一个axis2文件夹。

二、测试Axis2环境.
1.访问 http://localhost:[port]/axis2 (请将[port]修改成你的Tomcat对应端口,默认为8080);进入axis2的欢迎界面了。点击“Validate”。
如果有报错,则需根据错误信息检查上述步骤。如果没有错误信息,那么Axis2的环境测试算是通过了。
2. 可以点击“Administration” 并使用初始用户名和密码:admin ;axis2登录,可以看到System Components以及可以使用Upload Service Tools。部署新的arr文件了。另可去$tomcat_home$\webapps\axis2\WEB-INF\conf\axis2.xml下修改用户名和密码。

创建Demo HelloWorld
一、service端开发
1.创建一个java项目
2.新建类HelloWorld.java
参考代码:

package sample;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
public class HelloWorld {
public OMElement sayHello(OMElement in){
String name=in.getText();
String info="你好"+name+",给你推荐http://www.sietoo.com";
OMFactory fac=OMAbstractFactory.getOMFactory();
OMNamespace omNs=fac.createOMNamespace("http://www.sietoo.com/","hw");
OMElement resp=fac.createOMElement("sayHelloResponse",omNs);
resp.setText(info);
return resp;
}
}

3.新建文件META-INF \ services.xml
参考代码:

<?xml version="1.0" encoding="UTF-8"?>
<service name="HelloWorld">
<description>
This is a sample Web Service.
</description>
<parameter name="ServiceClass" locked="false">sample.HelloWorld</parameter>
<operation name="sayHello">
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
</service>

二、项目打包并发布
1.可使用你熟悉的IDE进行打包成HelloWorld.aar
参考直接打包方式:
在命令符行境下,将当前目录切换到该项目包下。如博主的例子就需要切换到sample所在的文件夹,注意并非切换进sample。使用如下命令:jar cvf HelloWorld.aar . 完成在当前目录生成HelloWorld.aar 。请注意命令末尾的点“.”。
2.发布,使用前面提到的登录axis2后看到的Upload Service 工具 将HelloWorld.arr部署到Tomc上。
3.发布测试,如博主例子访问http://localhost:8088/axis2/services/HelloWorld?wsdl查看第2步骤中部署的HelloWrold的描述文件。
如果有报错,则需根据错误信息检查上述步骤。如果没有错误信息,那么HelloWorld的service端就算完成了。
三、简单客户端调用
1.一个简单的Java调用客户端。
参考代码:

package example.client;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
public class TestClient {
private static EndpointReference targetEPR=new EndpointReference
("http://localhost:8080/axis2/services/HelloWorld");
public static OMElement getSayHelloOMElement(){
OMFactory fac=OMAbstractFactory.getOMFactory();
OMNamespace omNs=fac.createOMNamespace("http://www.sietoo.com/","hw");
OMElement method=fac.createOMElement("sayHello",omNs);
method.setText("andy");
return method;
}
public static void main(String[] args){
try{
Options options=new Options();
options.setTo(targetEPR);
ServiceClient sender=new ServiceClient();
sender.setOptions(options);
OMElement sayHello=TestClient.getSayHelloOMElement();
OMElement result=sender.sendReceive(sayHello);
System.out.println(result);
}
catch(Exception axisFault){
axisFault.printStackTrace();
}
}
}

编译此文件,并执行。
如果有报错,则需根据错误信息检查上述步骤。如果没有错误信息,那么Demo HelloWorld就完满完成。
各类客户端调用实例
一、java调用axis2 webservice (包括单个参数和多个参数方法的调用)
参考代码:

package example.client;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
public class s2 {
private static EndpointReference targetEPR=new EndpointReference("http://www.sietoo.com/axis2/services/SVAMobileWebService");
public static OMElement getSayHelloOMElement(){
OMFactory fac=OMAbstractFactory.getOMFactory();
OMNamespace omNs=fac.createOMNamespace("http://www.sietoo.com","andy");
//测试调用bandMobileNo (多参数方法)
OMElement bandMobileNo=fac.createOMElement("bandMobileNo",omNs);
OMElement UserId=fac.createOMElement("UserId",omNs);
OMElement password=fac.createOMElement("password",omNs);
OMElement bindingBank=fac.createOMElement("bindingBank",omNs);
UserId.addChild(fac.createOMText(UserId, "18629078140"));
password.addChild(fac.createOMText(password, "mynewpassword"));
bindingBank.addChild(fac.createOMText(bindingBank, "622260062001991159"));
bandMobileNo.addChild(UserId);
bandMobileNo.addChild(password);
bandMobileNo.addChild(bindingBank);
return bandMobileNo;
//测试调用getAccountInfo (单参数方法)
//OMElement getAccountInfo=fac.createOMElement("getAccountInfo",omNs);
//OMElement accountNum=fac.createOMElement("accountNum",omNs);
//accountNum.addChild(fac.createOMText(accountNum, "18629078140"));
//getAccountInfo.addChild(accountNum);
//return getAccountInfo;
}
public static void main(String args[]){
try{
Options options=new Options();
options.setTo(targetEPR);
ServiceClient sender=new ServiceClient();
sender.setOptions(options);
OMElement sayHello=s2.getSayHelloOMElement();
OMElement result=sender.sendReceive(sayHello);
System.out.println(result);
}
catch(Exception axisFault){
axisFault.printStackTrace();
}}}


二、PHP调用axis2 webservice (包括调用多参数,但参数方法)

1.使用Soap调用(需要PHP的版本支持)

<?php
$wsdl='http://www.sietoo.com/axis2/services/SVAMobileWebService?wsdl';
$soap=new SoapClient($wsdl,array( 'trace'=>false,'cache_wsdl'=>WSDL_CACHE_NONE ) );
$soap=new SoapClient($wsdl);
$method="bandMobileNo";
if(isset($_POST['passwd'])&&isset($_POST['UserId'])&&isset($_POST['bindingBank'])){
$params=array( 'UserId'=>$_POST['UserId'],'password'=>$_POST['passwd'],'bindingBank'=>$_POST['bindingBank']);
try{
$result=$soap->$method($params);
echo$result->return;
echo'<br>';
}catch(SoapFault $e){echo $e->getMessage();}
}
?>
<html>
<head>
<title>bandMobileNo</title>
</head>
<body>
<form method="Post" action="">
tel.
<input type="text" name="UserId" value="18629078888"/>
pwd.
<input type="password" name="passwd" value="admin" />
cardno.
<input type="text" name="bindingBank" value="622260062001991159"/>
<input type="submit" name="submit" value="Submit"/>
</form>
</body>
</html>

2 使用Nusoap调用 (需要下载nusoap.php附下载地址:http://download.csdn.net/detail/mr_z_andy/3845711)
分如下两种方式:
①直接调用

<?
/*************************************************************/
/*  文件名 : soapclient.php
/*  说  明 : WebService接口客户端例程
/*  作  者 :www.sietoo.com
/*************************************************************/
include ('NuSoap.php');
// 创建一个soapclient对象,参数是server的WSDL
$client = new soapclient ( 'http://localhost/Webservices/Service.asmx?WSDL', 'wsdl' );
// 参数转为数组形式传递
$aryPara = array ('strUsername' => 'username', 'strPassword' => MD5 ( 'password' ) );
// 调用远程函数
$aryResult = $client->call ( 'login', $aryPara );
//echo $client->debug_str;
/*
if (!$err=$client->getError()) {
print_r($aryResult);
} else {
print "ERROR: $err";
}
*/
$document = $client->document;
echo <<<SoapDocument
<?xml version="1.0" encoding="GB2312"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd">
<SOAP-ENV:Body>
$document
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SoapDocument;
?>

②代理调用

<?
/*************************************************************/
/*  文件名 : soapclient.php
/*  说  明 : WebService接口客户端例程
/*  作  者 :www.sietoo.com
/*************************************************************/
require ('NuSoap.php');
//创建一个soapclient对象,参数是server的WSDL
$client = new soapclient ( 'http://localhost/Webservices/Service.asmx?WSDL', 'wsdl' );
//生成proxy类
$proxy = $client->getProxy ();
//调用远程函数
$aryResult = $proxy->login ( 'username', MD5 ( 'password' ) );
//echo $client->debug_str;
/*
if (!$err=$proxy->getError()) {
print_r($aryResult);
} else {
print "ERROR: $err";
}
*/
$document = $proxy->document;
echo <<<SoapDocument
<?xml version="1.0" encoding="GB2312"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd">
<SOAP-ENV:Body>
$document
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SoapDocument;
?>

三、JS客户调用axis2 webservice (包括调用多参数,但参数方法)
1 实例①

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function RequestWebService() {
//这是我们在第一步中创建的Web服务的地址
var URL = "http://localhost/YBWS/WebService.asmx";
//在这处我们拼接
var data;
data = '<?xml version="1.0" encoding="utf-8"?>';
data = data + '<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">';
data = data + '<soap12:Body>';
data = data + '<HelloWorld xmlns="http://tempuri.org/" />';
data = data + '</soap12:Body>';
data = data + '</soap12:Envelope>';
//创建异步对象
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.Open("POST", URL, false);
xmlhttp.SetRequestHeader("Content-Type", "application/soap+xml");
xmlhttp.Send(data);
document.getElementById("data").innerHTML = xmlhttp.responseText;
}        
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="One" type="button" value="JsCallWebService" οnclick="RequestWebService()" />
</div>
<div id="data">
</div>
</form>
</body>
</html>

2实例② Ajax直接调用,不推荐
下面仅贴出JS段代码,供参考。

var xmlHttp = null;
var bankno=null;
var telno=null;
var checkid=false;
function createXMLHttpRequest() {
if(window.XMLHttpRequest){
//Firefox ,Mozillar ,Opera ,Safari ,IE7 ,IE8
xmlHttp = new XMLHttpRequest();
//Mozillar浏览器的BUG进行修正的
if(xmlHttp.overrideMimeType){
xmlHttp.overrideMimeType("text/html");
}
}else if(window.ActiveXObject){
//针对IE的各种版本
var versions = [ 'Microsoft.XMLHTTP', 'MSXML.XMLHTTP',
'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0',
'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0',
'MSXML2.XMLHTTP' ];
//尝试创建XMLHttpRequest对象
for ( var i = 0; i < versions.length; i++) {
try {
xmlHttp = new ActiveXObject(versions[i]);
break;
} catch (e) {
}
}
}
}
function AsynRequest() {
createXMLHttpRequest();
if (xmlHttp == null) 
{
alert("不能创建 XmlHttpRequest 对象");
return  ;
}
xmlHttp.open("GET", "http://www.sietoo.com/axis2/services/demoService/doTest?UserId="+telno+"&bindingBank="+"&bindingBank="+bankno, false);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.onreadystatechange = function () 
{
if (xmlHttp.readyState == 4) 
{
if (xmlHttp.status == 200) 
{
if(xmlHttp.responseXML==null)
{
return  ;
}
var res2=xmlHttp.responseXML.getElementsByTagName("ns:return")[0].firstChild.nodeValue;
//res2即为返回值。
return  ;
}
}
}
}
xmlHttp.send();
return  ;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/497702.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

网络系统服务器子系统,网管系统中服务器及网络设备监控子系统的设计与实现...

摘要&#xff1a;近年来,计算机网络的发展特点是规模不断扩大,复杂性不断增加,异构性越来越高,从而增加了网络管理的难度。面对越来越复杂和重要的网络,如何确保其尽可能长时间的正常运行,或当网络出现故障时,尽可能快地发现和修复故障,使其最大限度地发挥其应用功能和效益,就成…

普华永道:人工智能将重塑职位格局并与物联网合并

来源&#xff1a;亿欧概要&#xff1a;人工智能正在迅速普及&#xff0c;且其普及程度决定了其能为企业带来何种规模的效益。人工智能正在迅速普及&#xff0c;且其普及程度决定了其能为企业带来何种规模的效益。人工智能的核心在于以各种机器模拟智能行为&#xff0c;而物联网…

log4j 控制台和文件输出乱码问题解决

来源&#xff1a;http://www.coderli.com/log4j-console-file-garbled 一个小问题&#xff0c;却让我感觉到&#xff0c;现在真正动脑的人很少。。我来说说吧。今天遇到一个小问题&#xff0c;log4j输出到文件乱码&#xff0c;控制台正常。显然是编码问题导致。Google一搜&…

电脑没网络设备dns服务器没检测到响应,设备或资源dns没检测到有响应 网络无法连接...

以电脑为例&#xff0c;提示设备或资源dns没检测到有响应网络无法连接的原因是&#xff1a;1、可能是DNS解析不了&#xff0c;这时候可以看看自己的电脑的DNS是手动获取还是自动获取&#xff0c;如果是手动获取的话&#xff0c;改为自动获取。2、可能和网络设备或者网络环境有关…

asp.net ajax 怎么获取前端ul li_useEffect Hook 是如何工作的(前端需要懂的知识点)

作者&#xff1a;Dave Ceddia译者&#xff1a;前端小智来源&#xff1a;daveceddia.为了保证的可读性&#xff0c;本文采用意译而非直译。想象一下:你有一个非常好用的函数组件&#xff0c;然后有一天&#xff0c;咱们需要向它添加一个生命周期方法。呃…刚开始咱们可能会想怎么…

2018年全球5G的12大趋势

来源&#xff1a;5G概要&#xff1a;2018年全球5G的12大趋势行业观察未来智能实验室是人工智能学家与科学院相关机构联合成立的人工智能&#xff0c;互联网和脑科学交叉研究机构。由互联网进化论作者&#xff0c;计算机博士刘锋与中国科学院虚拟经济与数据科学研究中心石勇、刘…

java运行命令解释

-Dfile.encoding解释&#xff1a; 在命令行中输入java&#xff0c;在给出的提示中会出现-D的说明&#xff1a; -D<name><value> set a system property -D后面需要跟一个键值对&#xff0c;作用是通过命令行向java虚拟机传递一项系统属性 对-Dfile.…

服务器销售考核方案,电商后台:运营绩效系统总结

文章内容做者分离出来自身历经取每个人共享了电子商务情况中的运营业绩考核体系。业绩考核体系是明年5月份诸位发布的&#xff0c;通过一段时间运用&#xff0c;创造发明体系存已经一系列不了控果素&#xff0c;因此可以衷于一期的业绩考核体系虽然每一个月可以出示相关统计分析…

create 添加async和不添加的区别_鸽子饮水添加剂肝精与电解质的区别,不能混淆也不能代替...

肝精与电解质是鸽友们常用的两种饮水添加剂&#xff0c;虽说肝精与电解质都有清除药物残留的作用&#xff0c;但是&#xff0c;这两种添加剂的性质和功效是不一样的。有的混淆不清用电解质代替肝精&#xff0c;那是不对的。肝精就是肝精&#xff0c;电解质就是电解质&#xff0…

2017-2018互联网类脑巨系统研究报告,互联网大脑、城市云脑和AI

发布机构&#xff1a;未来智能实验室 报告人&#xff1a;刘锋、石勇、刘颖研究报告下载地址&#xff1a;https://pan.baidu.com/s/1pKVpX7l2008年1月1日&#xff0c;我们发表第一篇文章《互联网大脑进化示意图》&#xff0c;开始了互联网类脑架构研究&#xff0c;到今年正好1…

深入了解Struts2返回JSON数据的原理及具体应用范例

来源&#xff1a;http://yshjava.iteye.com/blog/1333104 早在我刚学Struts2之初的时候&#xff0c;就想写一篇文章来阐述Struts2如何返回JSON数据的原理和具体应用了&#xff0c;但苦于一直忙于工作难以抽身&#xff0c;渐渐的也淡忘了此事。直到前两天有同事在工作中遇到这个…

2018 AI 产品趋势(上):智能音箱的下半场,出路在何方

来源&#xff1a;36氪概要&#xff1a;AI时代&#xff0c;想必会也诞生新的巨头&#xff0c;接替前人站在浪潮之巅。但问题是&#xff0c;趋势前面&#xff0c;AI带来的机遇究竟在哪&#xff1f;科技真是迷人&#xff0c;他会眷顾每一代的年轻人。从沸腾的互联网时代&#xff0…

令牌桶 限速_Go 限流器实战系列(2) Token Bucket 令牌桶

上一篇说到 Leaky Bucket 能限制客户端的访问速率, 但是无法应对突发流量, 本质原因就是漏斗桶只是为了保证固定时间内通过的流量是一样的. 面对这种情况, 本篇文章继续介绍另外一种限流器: Token Bucket -- 令牌桶什么是 Token Bucket 漏斗桶的桶空间就那么大, 其只能保证桶里…

阿里巴巴年度技术总结:人工智能在搜索的应用和实践

来源&#xff1a;雷锋网概要&#xff1a;本文梳理了过去一年多搜索在深度学习方向上的探索&#xff0c;概要的介绍了我们在深度学习系统、深度学习算法和搜索应用落地的进展和思考。以深度学习为代表的人工智能在图像、语音和 NLP 领域带来了突破性的进展&#xff0c;在信息检索…

JSTL-EL表达式 函数fn

来源&#xff1a;http://blog.csdn.net/w__yi/article/details/7030843 JSTL-EL表达式 一个EL表达式包含变量和操作符。任何存储在某个JSP作用范围(如&#xff1a;page、 request、session、application)的bean能被作为一个EL变量来使用。 另外&#xff0c;EL支持以下预定义的…

omv检查硬盘坏道_坏道检测与修复

本软件提供了磁盘坏道检测功能及有限的坏道修复功能。为确保检查结果的准确性&#xff0c;建议在WinPE环境下进行检测&#xff0c;并且在检测坏道期间不要对磁盘做其他操作。1. 要使用本功能&#xff0c;首先选择需要检测坏道的磁盘&#xff0c;然后点击“磁盘 - 坏道检测与修复…

2018 年最值得期待的学术进展——致人工智能研究者们的年终总结

来源&#xff1a;AI科技评论概要&#xff1a;这里&#xff0c;我们为大家奉上机器学习学者 Alex Honcha 所展望的 2018 年最可能产生突破的 AI 领域。2017年马上就要过去了&#xff0c;而 AI 也在2017年中得到了快速发展。研究人员们提出了很多有趣而又富有开创性的工作。而作为…

python exchangelib 删除邮件_Python优雅的操作Exchange邮箱——exchangelib模块使用介绍...

最近想把公司邮箱的附件给下载下来&#xff0c;附件好多都是我整理的报告和文档&#xff0c;一个个去下载明显太傻&#xff0c;碰到这种问题第一个想到的就是Python啦需求很简单&#xff0c;只需要登录自己的Exchange邮箱&#xff0c;然后遍历所有邮件&#xff0c;有附件的就下…

对超长的文字换行处理:程序和CSS样式

css .text-overflow { display: block; /*内联对象需加*/ width: 125px; word-break: normal; white-space: pre-wrap; /* 不换行 */ overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */ text-overflow: ellipsis; height: 30px; position: absolute; } <!--对超长…

DARPA盘点2017年最受关注的十大科技新闻

来源&#xff1a;国防科技要闻2017年&#xff0c;DARPA国防颠覆性技术与能力方面的重大投资覆盖了从量子超材料、机器学习、神经技术到无人系统自主性的数十个领域约250个项目。DARPA官网全年共收获3500万次访问量。根据访问量排序&#xff0c;DARPA整理出最受关注的十大技术新…