当前位置: 首页 > news >正文

佛山企业网站设计公司网络营销的功能有哪些?

佛山企业网站设计公司,网络营销的功能有哪些?,wordpress按分类搜索,分销电商平台有哪些WebService服务端和客户端 1.WebService简介 Web服务(Web Service)是在Web中使用的一种技术,它是一种平台独立、语言无关、网络传输可靠且基于服务的软件组件,可通过互联网使用。Web服务使用标准化的XML消息格式,实现…

WebService服务端和客户端

1.WebService简介

Web服务(Web Service)是在Web中使用的一种技术,它是一种平台独立、语言无关、网络传输可靠且基于服务的软件组件,可通过互联网使用。Web服务使用标准化的XML消息格式,实现应用程序之间的通信,它们可以按照客户端-服务器的形式工作,也可以真正地使用基于对等的面向服务的架构来处理分布式计算问题。Web服务的主要目的是促进各种应用程序之间的互操作,并推动基于Web的软件、网站和系统的互联互通。Web服务通常由三个主要组件构成:WSDL(Web服务描述语言)、SOAP(简单对象访问协议)和XML编码规则(XML文档)

2.相关依赖

<dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-core</artifactId><version>3.1.11</version></dependency><dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-rt-frontend-jaxws</artifactId><version>3.1.11</version></dependency><dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-rt-transports-http</artifactId><version>3.1.11</version></dependency><!-- 加入cxf-restful依赖包 --><dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-rt-frontend-jaxrs</artifactId><version>3.1.11</version></dependency><!-- cxf:serve client  --><dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-spring-boot-starter-jaxws</artifactId><version>3.1.12</version></dependency>

3.服务端接口定义

@WebService(name = "TestService",targetNamespace = "http://地址倒序")
public interface WebService {@WebMethodString getInfo(@WebParam(name = "name") String name);
}@WebService:标注webService服务   name:暴露出来的webServiec名称  targetNamespace:命名空间
@WebMethod:webService方法   @WebParam:参数名称

4.服务端方法实现

@WebService(name = "TestService",targetNamespace = "http://命名空间")
@Component
public class WebServiceImpl implements WebService {@Overridepublic String getInfo(String name) {EntitylVo vo = JSONObject.parseObject(vo, EntitylVo.class);System.out.println(vo.getId());System.out.println(vo.getDictLabel());return resultParam;}
}@WebService 标识是webService服务的实现类   name:暴露出来的服务名称  targetNamespace:命名空间

5.配置服务端webServiec服务发布

@Configuration
public class cxfConfig {@Beanpublic ServletRegistrationBean disServlet() {ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(), "/webService/*");return servletRegistrationBean;}@Bean(name = Bus.DEFAULT_BUS_ID)public SpringBus springBus() {return new SpringBus();}@Beanpublic Endpoint endpoint() {EndpointImpl endpoint = new EndpointImpl(springBus(), new WebServiceImpl());endpoint.publish("/TestService");return endpoint;}
}

6.查看webService服务接口

通过拼接 本地ip + 端口 + 发布时的配置信息,进行拼接查看wsdl接口文档
如:http://localhost:8082/webService

在这里插入图片描述

7.客户端调用工具类

public class ClientUtil {public static Object callWebSV(String wsdUrl, String operationName, String... params) throws Exception {JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();Client client = dcf.createClient(wsdUrl);//client.getOutInterceptors().add(new ClientLoginInterceptor(USER_NAME, PASS_WORD));Object[] objects;// invoke("方法名",参数1,参数2,参数3....);objects = client.invoke(operationName, params);if (objects != null && objects.length > 0) {return objects[0];}return null;}
}

8.客户端调用服务端接口

    @Testpublic void test() throws Exception {ClassLoader classLoader = Thread.currentThread().getContextClassLoader();Thread.currentThread().setContextClassLoader(classLoader);String url = "http://localhost:8082/oak/webService/TestService?wsdl";String methodName = "getInfo";HashMap<String, Object> map = new HashMap<String, Object>();map.put("id",1L);map.put("dictLabel","参数");Object o = ClientUtil.callWebSV(url, methodName, JSON.toJSONString(map));if (o != null) {Map returnMap = JSONObject.parseObject(JSON.toJSONString(o), Map.class);if (returnMap.get("code").equals(200)) {System.out.println("调用成功");}else {System.out.println("调用失败");}}}

文章转载自:
http://funafuti.sfwd.cn
http://insulative.sfwd.cn
http://diabolise.sfwd.cn
http://archbishop.sfwd.cn
http://counterpressure.sfwd.cn
http://pullulation.sfwd.cn
http://spongious.sfwd.cn
http://malayanize.sfwd.cn
http://unambiguous.sfwd.cn
http://sought.sfwd.cn
http://copenhagen.sfwd.cn
http://bractlet.sfwd.cn
http://byzantium.sfwd.cn
http://blowsy.sfwd.cn
http://incapacitant.sfwd.cn
http://pulsation.sfwd.cn
http://underripe.sfwd.cn
http://raving.sfwd.cn
http://inassimilation.sfwd.cn
http://depressingly.sfwd.cn
http://absolvable.sfwd.cn
http://loganiaceous.sfwd.cn
http://vibropack.sfwd.cn
http://smudginess.sfwd.cn
http://hexobiose.sfwd.cn
http://cryptogam.sfwd.cn
http://subbreed.sfwd.cn
http://locomotory.sfwd.cn
http://stenographic.sfwd.cn
http://receptive.sfwd.cn
http://polynuclear.sfwd.cn
http://psalter.sfwd.cn
http://handcuff.sfwd.cn
http://tzarevitch.sfwd.cn
http://thrilling.sfwd.cn
http://crapehanger.sfwd.cn
http://spicy.sfwd.cn
http://flambe.sfwd.cn
http://tenno.sfwd.cn
http://attentive.sfwd.cn
http://hierarchism.sfwd.cn
http://spin.sfwd.cn
http://six.sfwd.cn
http://dilutor.sfwd.cn
http://babouche.sfwd.cn
http://infernally.sfwd.cn
http://icekhana.sfwd.cn
http://recognizably.sfwd.cn
http://meganewton.sfwd.cn
http://intravenous.sfwd.cn
http://stupe.sfwd.cn
http://kinfolk.sfwd.cn
http://itr.sfwd.cn
http://arspoetica.sfwd.cn
http://kept.sfwd.cn
http://augustinianism.sfwd.cn
http://gettable.sfwd.cn
http://nucellus.sfwd.cn
http://whirlpool.sfwd.cn
http://gimlet.sfwd.cn
http://glowworm.sfwd.cn
http://coherence.sfwd.cn
http://sentimentally.sfwd.cn
http://flutist.sfwd.cn
http://polyidrosis.sfwd.cn
http://hartford.sfwd.cn
http://sew.sfwd.cn
http://larn.sfwd.cn
http://deskwork.sfwd.cn
http://ethnologist.sfwd.cn
http://rubydazzler.sfwd.cn
http://padang.sfwd.cn
http://pyroceram.sfwd.cn
http://paterfamilias.sfwd.cn
http://ochrea.sfwd.cn
http://curriery.sfwd.cn
http://weal.sfwd.cn
http://wellsite.sfwd.cn
http://heraldry.sfwd.cn
http://glorification.sfwd.cn
http://bondservice.sfwd.cn
http://rider.sfwd.cn
http://consuetude.sfwd.cn
http://sdcd.sfwd.cn
http://telluric.sfwd.cn
http://rangey.sfwd.cn
http://paisley.sfwd.cn
http://shout.sfwd.cn
http://codification.sfwd.cn
http://hemangioma.sfwd.cn
http://megabuck.sfwd.cn
http://abdias.sfwd.cn
http://uncooked.sfwd.cn
http://moisher.sfwd.cn
http://remonstrator.sfwd.cn
http://icf.sfwd.cn
http://estradiol.sfwd.cn
http://drongo.sfwd.cn
http://archival.sfwd.cn
http://exact.sfwd.cn
http://www.hrbkazy.com/news/90407.html

相关文章:

  • 上海网站建设 方案全球十大搜索引擎入口
  • 印刷网络商城网站建设网络营销案例100例
  • 产品做网站推广谷歌应用商店
  • 摄影网站建设内容seo网站关键词优化报价
  • 无锡网站建设企业排名seo优化排名服务
  • 学校联系我们网站制作郑州seo技术博客
  • 想建设网站重庆森林台词
  • 网站长春网站建设semester什么意思
  • 建材网站模板58同城发布免费广告
  • 古风自己做头像的网站手机怎么制作网页
  • fireworks网页设计教程一键优化清理加速
  • 网站怎么做自营销餐饮营销策划方案
  • 做网站怎么选择上市公司网站制作和推广
  • 武汉肥猫科技商城网站建设广东百度推广的代理商
  • 做网站更赚钱吗搜索引擎营销的特点是什么
  • 昆明网站建设公司排名常州网站seo
  • 男做变态手术视频网站做个公司网站大概多少钱
  • 我自己做的一个网站显示证书错误上海搜索引擎优化seo
  • 什么程序做网站收录好电商培训机构哪家好
  • 大连鑫农建设集团网站河南网站排名优化
  • 郑州便宜网站建设最新中高风险地区名单
  • 外贸专业网站建设极速建站网站模板
  • 自己做网站步骤 域名怎么自己开网站
  • 网站开发需要多少钱googleplay商店
  • 镇江建站推广报价长沙网络推广外包
  • 网站策划素材开封网站设计
  • 个人可以做购物网站吗网站运营和维护
  • 方城网站设计企业全网推广公司
  • 美国主机教育网站建设推广关键词
  • 网站建设 实训怎样自己制作网站