一、准备工作:apache cxf,axis,httpclient等,目前流行是用cxf,本节也是用cxf实现

1.引入apache cxf包,点击----->apache-cxf-2.6.16下载

2.下载完成后解压放入项目lib目录下重新编译,如下图

二、实现方法:

1.webservice在项目中的配置,如下:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:jaxws="http://cxf.apache.org/jaxws"xsi:schemaLocation="http://www.springframework.org/schema/beans  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"><import resource="classpath:META-INF/cxf/cxf.xml"/><import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/><import resource="classpath:META-INF/cxf/cxf-servlet.xml"/><!-- 企业信息同步接口 --><bean id="companyImpl" class="com.hontek.webservice.service.impl.CompanyImpl"><property name="interAccountDao" ref="interAccountDao"/><property name="enterpriseDao" ref="enterpriseDao"/><property name="proTypeDao" ref="proTypeDao"/><property name="proTypeQrcodeDao" ref="proTypeQrcodeDao"/><property name="enterprseService" ref="enterprseService"/><property name="proTypeBatchDao" ref="proTypeBatchDao"/><property name="orderService" ref="orderService"/><property name="zizhiDao" ref="zizhiDao"/><property name="zizhiTypeDao" ref="zizhiTypeDao"/><property name="zizhiAppendixDao" ref="zizhiAppendixDao"/><property name="productServiceInter" ref="productService"/><property name="traceService" ref="traceService"/><property name="certificateDao" ref="certificateDao"/><property name="certificateCheckDao" ref="certificateCheckDao"/><property name="certificatePrintDao" ref="certificatePrintDao"/><property name="certificateScanDao" ref="certificateScanDao"/></bean><jaxws:server serviceClass="com.hontek.webservice.service.inter.CompanyInter" address="/company"><jaxws:serviceBean><ref bean="companyImpl"/></jaxws:serviceBean></jaxws:server><!-- 检测设备接口 --><bean id="detectionDeviceImpl" class="com.hontek.devicewebservice.service.impl.DetectionDeviceImpl"><property name="userDao" ref="userDao"/><property name="enterpriseDao" ref="enterpriseDao"/><property name="checkEquipmentDao" ref="checkEquipmentDao"/><property name="proTypeQrcodeDao" ref="proTypeQrcodeDao"/><property name="checkInfoDao" ref="checkInfoDao"/><property name="checkInfoDetailDao" ref="checkInfoDetailDao"/><property name="proTypeDao" ref="proTypeDao"/><property name="spotCheckDao" ref="spotCheckDao"/><property name="orderService" ref="orderService"/><property name="dimennoRecordService" ref="dimennoRecordService"/><property name="certificateService" ref="certificateServiceInter"/><property name="caInfoDao" ref="caInfoDao"/><property name="certificateCheckDao" ref="certificateCheckDao"/></bean><jaxws:server serviceClass="com.hontek.devicewebservice.service.inter.DetectionDeviceInter" address="/detectionDevice"><jaxws:serviceBean><ref bean="detectionDeviceImpl"/></jaxws:serviceBean></jaxws:server><!-- 圳品、菜篮子平台对接接口 --><bean id="platformsImpl" class="com.hontek.platformswebservice.service.impl.PlatformsImpl"><property name="interAccountDao" ref="interAccountDao"/><property name="enterprseService" ref="enterprseService"/><property name="certificateServiceInter" ref="certificateServiceInter"/><property name="proTypeDao" ref="proTypeDao"/><property name="enterpriseDao" ref="enterpriseDao"/><property name="proTypeQrcodeDao" ref="proTypeQrcodeDao"/><property name="caInfoDao" ref="caInfoDao"/><property name="userDao" ref="userDao"/><property name="spotCheckDao" ref="spotCheckDao"/><property name="checkReportDao" ref="checkReportDao"/><property name="checkContentDao" ref="checkContentDao"/><property name="xydaAppendixDao" ref="xydaAppendixDao"/><property name="checkInfoDao" ref="checkInfoDao"/><property name="checkInfoDetailDao" ref="checkInfoDetailDao"/></bean><jaxws:server serviceClass="com.hontek.platformswebservice.service.inter.PlatformsInter" address="/platform"><jaxws:serviceBean><ref bean="platformsImpl"/></jaxws:serviceBean></jaxws:server></beans>

ps apache-cxf-2.6.16版本需要在上面配置文件中加入下面三行

 <import resource="classpath:META-INF/cxf/cxf.xml"/><import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/><import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>

注意:如果你的版本是3.0以上的,因为多了下面两个xml文件,所以也会报错;只需要引入第一个就可以;如果你的CXF版本是3.0以下;那么需要引入三个配置文件。

2. 配置applicationContext.xml,如下:

3. 配置web.xml,如下:

4.创建webservice接口,如下:

package com.hontek.platformswebservice.service.inter;
import com.hontek.platformswebservice.comm.*;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import java.util.List;@WebService
@SOAPBinding(style = Style.RPC)
@SuppressWarnings("deprecation")
public interface PlatformsInter {/*** 获取口令* @Author yang* @Date   2020/05/06 16:55**/public String getToken(@WebParam(name="account")String account,@WebParam(name="password")String password);/*** 更新心跳接口* @Author yang* @Date   2020/05/06 16:59**/public String active(@WebParam(name = "token") String token);/*** 退出接口* @Author yang* @Date   2020/05/06 16:59**/public String logout(@WebParam(name = "token") String token);/*** 同步产品信息* @Author yang* @Date   2020/05/07 18:07**/public String syncProTypeQrCode(@WebParam(name="token")String token, @WebParam(name="proTypeQrcode") ProTypeQrcodeEntity proTypeQrcode);
}

4.1创建ResultInfo返回结果实体类,如下:

package com.hontek.platformswebservice.comm;/*** 返回结果实体类* @Author yang**/
public class ResultInfo {private String code;       //code码private boolean success; // 判断调用是否成功 true:成功 false:失败private Object data;     // 数据private String msg;            // 信息public String getCode() { return code; }public void setCode(String code) { this.code = code; }public boolean isSuccess() { return success; }public void setSuccess(boolean success) { this.success = success; }public Object getData() { return data; }public void setData(Object data) { this.data = data; }public String getMsg() { return msg; }public void setMsg(String msg) { this.msg = msg; }}

4.2创建SoleManager线程类实现token过期时间及更新和销毁,如下:

package com.hontek.platformswebservice.comm;import com.hontek.sys.pojo.TbInterAccount;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;public class SoleManager {static final private SoleManager instance = new SoleManager();private Map<String, TbInterAccount> accountMap = new HashMap<String, TbInterAccount>();public static SoleManager getInstance(){return instance;}public SoleManager() {TimeOut timeout = new TimeOut();timeout.start();}synchronized public TbInterAccount getAccount(String token){TbInterAccount interAccount = accountMap.get(token);if(interAccount!=null)interAccount.setTime(System.currentTimeMillis());return interAccount;}synchronized public void putAccount(String token,TbInterAccount interAcount){this.accountMap.put(token, interAcount);}public class TimeOut extends Thread{public void run(){long keepTime = 1000L*60*60*10;while(true){try {Thread.sleep(1000*60*60*3);} catch (InterruptedException e) {e.printStackTrace();}Set<String> setKey = accountMap.keySet();Iterator<String> it = setKey.iterator();while(it.hasNext()){String key = it.next();TbInterAccount interAccount = accountMap.get(key);if(System.currentTimeMillis()-interAccount.getTime()>keepTime){accountMap.remove(key);}}}}}/*** 心跳* @param interaccount*/public void active(TbInterAccount interaccount){if(interaccount!=null){interaccount.setTime(System.currentTimeMillis());}}/*** 注销* @param token*/synchronized public void cleanMap(String token){TbInterAccount interAccount = accountMap.get(token);if(interAccount!=null){interAccount = null;accountMap.remove(token);}}
}

5.发布接口

*访问路径:域名/项目/CXFService/platform?wsdl,出现如下xml格式的数据说明发布成功*

6.测试

6.1idea中创建webservice客户端进行测试,如下:

6.2使用测试工具如postman、SoapUI Pro 5.1.2进行测试,如下是soapui进行测试:

7.总结

前期接口写好后首先自己先测试下看看代码有无问题是否能调通接口,如没问题,接下来最好是写一份对接文档进行说明(如下图),再一个跟对三方进行对接时要先在测试环境或者自己本地服务器进行联调(使用内网穿透,我这边使用的是花生壳进行内网穿透),最后发布到正式环境中。

三、客户端调用

1:本地生成代码,直接调用:
1:新建一个class类,用于调用webservice。右键src,找到Web Service Client,并输入wsdl地址,选择下载代码的路径;

(url: http://192.168.1.105:8080/Service/ServiceHello?wsdl)

2.将地址上的文件下载下来(注意和发布JDK一致); 
3.写调用方法调用下载下来的WebService中的java类中的方法; 
示例:

import com.pcm.ws.jws.JwsServiceHello;
import com.pcm.ws.jws.JwsServiceHelloService;/***
* Title: JwsClientHello
* Description: webService 客户端调用
* Version:1.0.0
* @author panchengming*/
public class JwsClientHello {public static void main(String[] args) {//调用webserviceJwsServiceHello hello=new JwsServiceHelloService().getJwsServiceHelloPort();String name=hello.getValue("panchengming");System.out.println(name);}
}

2、利用dos命令生成代码,和第一种基本一致
A、在工作空间创建用于存放使用wsimport命令生成的客户端代码的java工程

B、使用jdk提供的wsimport命令生成客户端代码

●  wsimport命令是jdk提供的,作用是根据使用说明书生成客户端代码,wsimport只支持SOAP1.1客户端的生成

●  wsimport常用参数

-d:默认参数,用于生成.class文件
-s:生成.java文件
-p:指定生成java文件的包名,不指定则为WSDL说明书中namespace值得倒写

C、在doc窗口进入java工程项目的src目录,执行wsimport命令

D、在Eclipse中刷新java项目,将生成的客户端代码copy到客户端工程中

E、创建服务视图,类名从<service>标签的name属性获取

F、获取服务实现类,视图实例调用getProt()方法,实现类的类名从portType的name属性获取

G、调用查询方法,方法名从portType下的operation标签的name属性获取

package com.webservice.client;import com.webservice.jaxws.WeatherServiceImpl;import com.webservice.jaxws.WeatherServiceImplService;public class Client {public static void main(String[] args) {//创建视图WeatherServiceImplService wsis = new WeatherServiceImplService();//获取服务实现类WeatherServiceImpl wsi = wsis.getPort(WeatherServiceImpl.class);//调用查询方法String weather = wsi.queryWeather("北京");System.out.println(weather);}}

<service>    服务视图,webservice的服务结点,它包括了服务端点

●   <binding>     为每个服务端点定义消息格式和协议细节

●   <portType>   服务端点,描述 web service可被执行的操作方法,以及相关的消息,通过binding指向portType

●   <message>   定义一个操作(方法)的数据参数(可有多个参数)

●   <types>        定义 web service 使用的全部数据类型

3:service编程实现调用
注意:
(1)该种方式可以自定义关键元素,方便以后维护,是一种标准的开发方式;
(2)这种方式同样需要wsimport生成客户端代码,只不过仅需要将服务接口类引入即可,例如如果需要<wsdl:port name="MobileCodeWSSoap" binding="tns:MobileCodeWSSoap">端口服务,则需要将生成的MobileCodeWSSoap.class类引入;

(1)、开发步骤

A、wisimport生成客户端代码

B、使用serivce类创建服务视图

C、获取服务实现类

D、调用查询方法

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;  import javax.xml.namespace.QName;
import javax.xml.ws.Service;  import cn.itcast.mobile.MobileCodeWSSoap;  /** *  *  Title: ServiceClient.java*  Description:Service编程实现服务端调用*  这种方式同样需要wsimport生成客户端代码,只不过仅需要将服务接口类引入即可,例如如果需要*  <wsdl:port name="MobileCodeWSSoap" binding="tns:MobileCodeWSSoap">*  端口服务,则需要将生成的MobileCodeWSSoap.class类引入*/
public class ServiceClient {  public static void main(String[] args) throws IOException {  //创建WSDL地址,不是服务地址  URL url = new URL("http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl");  //创建服务名称  //1.namespaceURI - 命名空间地址 (wsdl文档中的targetNamespace)//2.localPart - 服务视图名  (wsdl文档中服务名称,例如<wsdl:service name="MobileCodeWS">)QName qname = new QName("http://WebXml.com.cn/", "MobileCodeWS");  //Service创建视图  //参数:  //1.wsdlDocumentLocation - 使用说明书地址  //2.serviceName - 服务名称  Service service = Service.create(url, qname);  //获取服务实现类 //参数解释:serviceEndpointInterface - 服务端口(wsdl文档中服务端口的name属性,例如<wsdl:port name="MobileCodeWSSoap" binding="tns:MobileCodeWSSoap">)MobileCodeWSSoap mobileCodeWSSoap = service.getPort(MobileCodeWSSoap.class);  //调用查询方法  String result = mobileCodeWSSoap.getMobileCodeInfo("188888888", "");  System.out.println(result);  }
}

4:利用apache的AXIS直接调用远程的web service

public static void axis() {Service service = new Service();try {Call call = (Call) service.createCall();//设置地址call.setTargetEndpointAddress("http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?wsdl");call.setUseSOAPAction(true);//域名加方法,//上面有写着targetNamespace="http://x.x.x/",这个就是你的命名空间值了;加方法名call.setSOAPActionURI("http://WebXml.com.cn/" + "ValidateEmailAddress");// 设置要调用哪个方法call.setOperationName(new QName("http://WebXml.com.cn/", "ValidateEmailAddress")); // 设置要调用哪个方法//设置参数名 :参数名 ,参数类型:String, 参数模式:'IN' or 'OUT'call.addParameter(new QName("http://WebXml.com.cn/", "theEmail"), // 设置要传递的参数org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);call.setEncodingStyle("UTF-8");//返回类型call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);// (标准的类型)// 调用方法并传递参数String res = String.valueOf(call.invoke(new Object[]{"wangkanglu1024@163.com"}));System.out.println(res);} catch (Exception ex) {ex.printStackTrace();}
 public static void axis2() throws MalformedURLException, SOAPException, ServiceException, RemoteException {String endpoint = "http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl";String res = null;// 查询电话号码的接口方法名String operationName = "getMobileCodeInfo";// 定义service对象Service service = new Service();// 创建一个call对象Call call = (Call) service.createCall();// 设置目标地址,即webservice路径call.setTargetEndpointAddress(endpoint);// 设置操作名称,即方法名称   targetNamespace="http://WebXml.com.cn/"call.setOperationName(new QName("http://WebXml.com.cn/", operationName));// 设置方法参数call.addParameter(new QName("http://WebXml.com.cn/", "mobileCode"),org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);call.addParameter(new QName("http://WebXml.com.cn/", "userID"),org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);// 设置返回值类型//对于返回是字符串数组的返回类型只有这两种可行//call.setReturnType(org.apache.axis.encoding.XMLType.SOAP_VECTOR);call.setReturnClass(java.lang.String.class);call.setUseSOAPAction(true);call.setSOAPActionURI("http://WebXml.com.cn/" + "getMobileCodeInfo");res = (String) call.invoke(new Object[]{"15611111111", "0"});// 如果返回类型是org.apache.axis.encoding.XMLType.SOAP_VECTOR时用下面的转型接收//Vector v=(Vector) call.invoke(new Object[]{cityCode,userId});System.out.println(res);}

5:HttpURLConnection调用方式
(1)、开发步骤

A、创建服务地址

B、打开服务地址的一个连接

C、设置连接参数

●   注意

a、POST必须大写,如果小写会出如下异常:
 b、如果不设置输入输出,会报异常
D、组织SOAP协议数据,发送给服务器

E、接收服务端的响应

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;  /***
* @ClassName: HttpURLConectionMode
* @Description: TODO(通过HttpURLConnection发送http请求)
*   sope协议,比较麻烦的是需要拼接xml格式的请求数据
* @author
* @date 2017年11月8日 上午9:18:24
**/
public class HttpClient {  public static void main(String[] args) throws IOException {  //第一步:创建服务地址,不是WSDL地址 URL url = new URL("http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx");  //2:打开到服务地址的一个连接  HttpURLConnection connection = (HttpURLConnection) url.openConnection();  //3:设置连接参数  //3.1设置发送方式:POST必须大写  connection.setRequestMethod("POST");  //3.2设置数据格式:Content-type  connection.setRequestProperty("content-type", "text/xml;charset=utf-8");  //3.3设置输入输出,新创建的connection默认是没有读写权限的,  connection.setDoInput(true);  connection.setDoOutput(true);  //4:组织SOAP协议数据,发送给服务端  String soapXML = getXML("1866666666");  OutputStream os = connection.getOutputStream();  os.write(soapXML.getBytes());  //5:接收服务端的响应  int responseCode = connection.getResponseCode();  if(200 == responseCode){//表示服务端响应成功  InputStream is = connection.getInputStream();  InputStreamReader isr = new InputStreamReader(is);  BufferedReader br = new BufferedReader(isr);  StringBuilder sb = new StringBuilder();  String temp = null;  while(null != (temp = br.readLine())){  sb.append(temp);  }  System.out.println(sb.toString());  is.close();  isr.close();  br.close();  }  os.close();  }  /** * <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getMobileCodeInfo xmlns="http://WebXml.com.cn/"> <mobileCode>string</mobileCode> <userID>string</userID> </getMobileCodeInfo> </soap:Body> </soap:Envelope> * @param phoneNum * @return */  public static String getXML(String phoneNum){  String soapXML = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"  +"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"  +"<soap:Body>"  +"<getMobileCodeInfo xmlns=\"http://WebXml.com.cn/\">"  +"<mobileCode>"+phoneNum+"</mobileCode>"  +"<userID></userID>"  +"</getMobileCodeInfo>"  +" </soap:Body>"  +"</soap:Envelope>";  return soapXML;  }
}  

提供一个比较完善一点的工具类

public Map<String, Object> webServiceRequestUtil(String requesturl, String soapXML) throws IOException, ZycxException {HttpURLConnection connection = null;OutputStream os = null;Map<String, Object> reslut = new HashMap<>();try {//1:创建服务地址URL url = new URL(requesturl);//2:打开到服务地址的一个连接connection = (HttpURLConnection) url.openConnection();//3:设置连接参数//3.1设置发送方式:POST必须大写connection.setRequestMethod("POST");//3.2设置数据格式:Content-typeconnection.setRequestProperty("content-type", "text/xml;charset=utf-8");//3.3设置输入输出,新创建的connection默认是没有读写权限的,connection.setDoInput(true);connection.setDoOutput(true);//4:组织SOAP协议数据,发送给服务端os = connection.getOutputStream();os.write(soapXML.getBytes());} catch (IOException e) {throw new myException("链接webservice出错!url为:" + requesturl + ";exception:" + e);}StringBuilder sb = new StringBuilder();InputStream is = null;InputStreamReader isr = null;BufferedReader br = null;try {String temp = null;//5:接收服务端的响应int responseCode = connection.getResponseCode();if (200 == responseCode) {//表示服务端响应成功is = connection.getInputStream();isr = new InputStreamReader(is);br = new BufferedReader(isr);while ((temp = br.readLine()) != null) {sb.append(temp);}//这是我自己封装了一个map的返回格式,封装了headr和bodyreslut = ReturnUtil.returnjSON(BackStatus.BACK_STATUS_OK, "success", sb.toString());} else {is = connection.getInputStream();isr = new InputStreamReader(is);br = new BufferedReader(isr);while ((temp = br.readLine()) != null) {sb.append(temp);}reslut = ReturnUtil.returnjSON(BackStatus.BACK_STATUS_EXCEPTION + "", "请求出错,http响应为:"+responseCode, sb.toString());}} catch (IOException e) {throw new myException("返回结果解析出错" + e);} finally {if(!Objects.isNull(br)){br.close();}if(!Objects.isNull(isr)){isr.close();}if(!Objects.isNull(is)){is.close();}if(!Objects.isNull(os)){os.close();}}return reslut;}

6.Ajax调用方式


<!doctype html>
<html lang="en">  <head>  <title>Ajax调用方式</title>  <script type="text/javascript">  function queryMobile(){  //创建XMLHttpRequest对象  var xhr = new XMLHttpRequest();  //打开链接  xhr.open("post","http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx",true);  //设置content-type  xhr.setRequestHeader("content-type","text/xml;charset=utf-8");  //设置回调函数  xhr.onreadystatechange=function(){  //判断客户端发送成功&&服务端响应成功  if(4 == xhr.readyState && 200 == xhr.status){  alert(xhr.responseText);  }  }  //组织SOAP协议数据  var soapXML = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"  +"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"  +"<soap:Body>"  +"<getMobileCodeInfo xmlns=\"http://WebXml.com.cn/\">"  +"<mobileCode>"+document.getElementById("phoneNum").value+"</mobileCode>"  +"<userID></userID>"  +"</getMobileCodeInfo>"  +" </soap:Body>"  +"</soap:Envelope>";  alert(soapXML);  //发送请求  xhr.send(soapXML);  }  </script>  </head>  <body>  手机号归属地查询:<input type="text" id="phoneNum" /><input type="button" value="查询" onclick="javascript:queryMobile();"/>  </body>
</html>

API接口之webservice接口相关推荐

  1. http接口与webservice接口

    一:概念 (1).http接口: Http协议是建立在TCP协议基础之上的,当浏览器需要从服务器获取网页数据的时候,会发出一次Http请求.Http会通过TCP建立起一个到服务器的连接通道,当本次请求 ...

  2. http接口和webservice接口的区别

    简单说 httpservice通过post和get得到你想要的东西webservice就是使用soap协议得到你想要的东西,相比httpservice能处理些更加复杂的数据类型http协议传输的都是字 ...

  3. 【全栈接口测试进阶系列教程】精通api接口测试,接口分类,接口架构,http,webservice,dubbo接口协议,接口流程,接口工具,cookie,session,token接口鉴权原理以及实战

    目录 一,[什么是接口测试?为什么要作接口测试] 1.接口的作用 2.为什么要做接口测试 3.接口都有哪些类型? 二,[接口测试的分类] 接口的分类: http和webservice接口区别: 三,[ ...

  4. SpringBoot——实现WebService接口服务端以及客户端开发

    文章目录 一.服务端代码开发 1.pom依赖 2.接口类 3.接口实现类 4.webservice配置文件 2.客户端开发 (1)pom依赖 (2)封装客户端方法clientUtil (3)调用接口类 ...

  5. [亲测可用]springBoot调用对方webService接口的几种方法示例

    目录 前言 一.需要用到的maven 二.如何调用webservice接口 调用方法一: 调用方法二: myEclipse生成的例子: idea生成的例子: 前言 平常我们开发调用接口一般会用到几种数 ...

  6. 转载-- http接口、api接口、RPC接口、RMI、webservice、Restful等概念

    http接口.api接口.RPC接口.RMI.webservice.Restful等概念 收藏 Linux一叶 https://my.oschina.net/heavenly/blog/499661 ...

  7. http接口、api接口、RPC接口、RMI、webservice、Restful等概念

    在这之前一定要好好理解一下接口的含义,我觉得在这一类中接口理解成规则很恰当         http接口:基于HTTP协议的开发接口.这个并不能排除没有使用其他的协议. api接口:API(Appli ...

  8. API接口安全—webservice、Swagger、WEBpack

    API接口安全-webservice.Swagger.WEBpack 1. API接口介绍 1.1. 常用的API接口类 1.1.1. API接口分类 1.1.1.1. 类库型API 1.1.1.2. ...

  9. webservice接口与HTTP接口学习笔记

    一.webservice 的概念 Web 是使应用程序可以与平台和编程语言无关的方式进行相互通信的一项技术.Web 服务是一个软件接口,它描述了一组可以在网络上通过标准化的 XML 消息传递访问的操作 ...

  10. Reporting Services系列五:WebService接口

    ReportingServices提供WebService接口,基本上所有报表的操作都可以利用它们完成,以下在代码演示如何使用它们进行报表的导出.报表的订阅等.其中报表订阅中的"邮件订阅&q ...

最新文章

  1. python爬虫一般格式
  2. 为什么C++(感谢waterwalk翻译)
  3. c语言编程 新浪博客,[c语言编程]经典编程
  4. Keil C 里面Lib库文件的生成与调用
  5. 封装案例-完成开火方法
  6. nssl1296-猫咪的进化【dp】
  7. ios时间相差多少天_上海自驾拉萨,走川进青出,应如何规划线路?需要多少天时间?...
  8. Win11使用PCVR时性能问题已修复 可手动安装解决
  9. 计算机房面积设置气消条件,广东省《建筑防烟排烟系统技术标准》问题释疑
  10. 香港云服务器哪家便宜好用?
  11. buck dcm占空比计算_buck电路输出电容及其他参数计算
  12. 网络爬虫-cnzz网站统计(umuuid参数加密破解)
  13. invalid python sd,Fatal Python error: init_fs_encoding: failed to get the Python cod如何解决
  14. mysql查找删除重复数据并只保留一条
  15. 物流一站式单号查询之快递鸟API接口(附Demo源码)
  16. upfst是什么函数C语言,一种基于KF和STUPF组合滤波的SINS大方位失准角初始对准方法技术...
  17. 太阳宇宙线:太阳质子模型
  18. WordPress如图略缩图不显示问题
  19. 使用kingSCADA3.53连接mysql数据库
  20. 机器人曲轴上下料_曲轴生产线自动上下料机器人的解决方案

热门文章

  1. java冒泡排序经典代码_java冒泡排序
  2. android 极简浏览器,盘点最干净简洁的手机浏览器,到底哪个最好用?
  3. 永恒之蓝(MS17010)漏洞复现
  4. 操盘手 李彪 照片[转]
  5. 智能化系统工程施工阶段划分
  6. python读取excel绘制柱状图_python读取excel制作柱状图和词云图片
  7. 夏普 Sharp MX-M260 32位系统安装驱动后乱码
  8. 如何使用PAUP4、MrBayes、TNT构建系统发育树
  9. ABB机器人Test指令
  10. jsp使用验证码及验证码的点击刷新功能的实现