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

买的网站模板里面是什么做行业网站

买的网站模板里面是什么,做行业网站,常见的erp系统,同城信息发布平台jax-ws和jax-rs1.简介 这是一个漫长的等待#xff0c;但是我最终要发布有关使用Spring创建第一个基于SOAP的Web服务应用程序的教程。 JAX-WS #xff08;用于XML Web服务的Java API#xff09;是用于以XML格式创建Web服务的一组API#xff0c;我们最常将其称为基于SOAP的We… jax-ws和jax-rs 1.简介 这是一个漫长的等待但是我最终要发布有关使用Spring创建第一个基于SOAP的Web服务应用程序的教程。 JAX-WS 用于XML Web服务的Java API是用于以XML格式创建Web服务的一组API我们最常将其称为基于SOAP的Web服务 希望大家都了解基本架构。 2.实施 首先让我们检查一下pom文件的配置– pom.xml !-- Spring dependencies -- dependencygroupIdorg.springframework/groupIdartifactIdspring-core/artifactIdversion4.2.1.RELEASE/version /dependencydependencygroupIdorg.springframework/groupIdartifactIdspring-web/artifactIdversion4.2.1.RELEASE/version /dependency!-- JAX-WS -- dependencygroupIdorg.jvnet.jax-ws-commons.spring/groupIdartifactIdjaxws-spring/artifactIdversion1.9/version /dependencydependencygroupIdcom.sun.xml.ws/groupIdartifactIdjaxws-rt/artifactIdversion2.2.8/version /dependency web.xml ?xml version1.0 encodingISO-8859-1? web-app xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexmlnshttp://java.sun.com/xml/ns/javaeexsi:schemaLocationhttp://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsdidWebApp_ID version2.5display-nameSOAPWebServiceExample/display-namelistenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class/listenerservletservlet-namecustomer/servlet-nameservlet-classcom.sun.xml.ws.transport.http.servlet.WSSpringServlet/servlet-classload-on-startup1/load-on-startup/servletservlet-mappingservlet-namecustomer/servlet-nameurl-pattern/customer/url-pattern/servlet-mapping/web-app 让我们为我们的应用程序创建客户实体。 客户.java package com.jcombat.entity;public class Customer {private int id;private String name;public int getId() {return id;}public void setId(int id) {this.id id;}public String getName() {return name;}public void setName(String name) {this.name name;} } 现在让我们创建服务接口及其对应的服务实现类。 CustomerService.java package com.jcombat.services.customers;import com.jcombat.entity.Customer;public interface CustomerService {public Customer getCustomerById(String customerId); } CustomerServiceImpl.java package com.jcombat.services.customers;import com.jcombat.entity.Customer;public class CustomerServiceImpl implements CustomerService {public Customer getCustomerById(String customerId) {Customer customer new Customer();customer.setId(123);customer.setName(Abhimanyu);return customer;} } 下面是applicationContext的外观。 applicationContext.xml ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlns:wshttp://jax-ws.dev.java.net/spring/corexmlns:wsshttp://jax-ws.dev.java.net/spring/servletxsi:schemaLocationhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.5.xsdhttp://jax-ws.dev.java.net/spring/core http://jax-ws.java.net/spring/core.xsdhttp://jax-ws.dev.java.net/spring/servlet http://jax-ws.java.net/spring/servlet.xsdbean idcustomerService classcom.jcombat.services.customers.CustomerServiceImpl/beanbean idcustomerEndpoint classcom.jcombat.ws.CustomerEndpointproperty nameservice refcustomerService //beanwss:binding url/customerwss:servicews:service bean#customerEndpoint //wss:service/wss:binding/beans 请注意URL模式 / customer 绑定到了Web服务端点实现类 customerEndpoint 如上面的代码片段所示。 下面是我们的customerEndpoint bean实现类的样子。 CustomerEndpoint.java package com.jcombat.ws;import javax.jws.WebMethod; import javax.jws.WebService;import com.jcombat.entity.Customer; import com.jcombat.services.customers.CustomerService;WebService(serviceName customerService) public class CustomerEndpoint {private CustomerService service;WebMethod(exclude true)public void setService(CustomerService service) {this.service service;}WebMethod(operationName getCustomer)public Customer getCustomerById(String customerId) {Customer customer service.getCustomerById(customerId);return customer;}} 请注意 WebService批注指示服务器运行时环境将该类的所有公共方法公开为Web服务方法。 如果要防止将任何方法公开为Web服务方法则需要使用WebMethodexclude true注释该方法如上面的代码片段所示。 同样如果我们想将Web服务方法命名为与类中指定的实际方法名称不同的名称 getCustomerById 则需要在WebMethod批注中添加operationName属性。 如果在设置项目时遇到任何依赖关系问题可以参考此链接 。 3.运行应用程序 http// localhost8080 / SOAPWebServiceExample / customerwsdl 一旦点击了上面的URL就可以看到显示的WSDL内容如下面的快照所示。 我们还可以使用SOAP UI测试端点。 使用与上述相同的WSDL位置创建新的SOAP项目。 4.下载源代码 下载源代码 翻译自: https://www.javacodegeeks.com/2016/02/web-service-application-jax-ws-spring.htmljax-ws和jax-rs
http://www.zqtcl.cn/news/44579/

相关文章:

  • js 网站源码网页游戏开服表的排行榜
  • 建立个人网站用虚拟主机网站建设教程 项目式
  • 上海市开办企业一窗网上服务手机系统优化软件哪个好
  • 建设银行企业网站访问不了网站建设公司 经营范围
  • 优秀专题网站制作表情包的微信小程序
  • 如何制作网站网页建设自动弹出qq对话框的网站
  • python做网站部署广州做网站比较好的公司
  • 简述网站栏目管理dreawever如何做本地网站
  • 安徽合肥建设局网站如何制作网站赚钱
  • 做电影网站前途网页制作的公司哪家好
  • 网站建设方案报告百度品牌广告是什么
  • 成都网站建设公司创意网红蛋糕
  • wordpress 站点网络免费域名注册永久
  • 系统网站怎么做的佛山网站建设a068
  • 做网站界面需要注意什么问题网址域名注册费用
  • 一个备案可以做几个网站吗wordpress 附件 函数
  • 定制网站设计高端网站建设做平面设计兼职的网站
  • 网站开发能干什么用国外网站 图片做自媒体
  • 深圳做网站公司哪家好wordpress仿wiki
  • 定制软件的网站电商运营工作内容
  • 网站发帖功能怎么做网站怎么做分享链接
  • 如何有效提高网站排名邦派巴洛特网站是谁做的呀
  • 中信建设有限责任公司客户廊坊视频优化展现
  • 做网站一般都是那些人 会做广州企业推广网站建设
  • 百度推广移动端网站推荐5家知名
  • 外贸网站建设 深圳扬州哪里做网站
  • 智慧校园信息门户网站建设优秀英文企业网站
  • 个人网站用凡科建站好吗最新网页版传奇
  • 网站营销方式有哪些内容视觉传达设计主要学什么
  • 网站建设需要了解的信息苏州信息造价网