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

阿里云服务器做电影网站网站建设7个基本流程

阿里云服务器做电影网站,网站建设7个基本流程,阿克苏网站建设公司,怎么自己在微信上做网站首先,定义一个XSD(XML Schema Definition)来描述你的数据结构。在你的Maven项目的src/main/resources目录下,创建一个名为schemas的文件夹,并在其中创建一个名为scriptService.xsd的文件,内容如下&#xff…

首先,定义一个XSD(XML Schema Definition)来描述你的数据结构。在你的Maven项目的src/main/resources目录下,创建一个名为schemas的文件夹,并在其中创建一个名为scriptService.xsd的文件,内容如下:

scriptService.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:tns="http://yournamespace.com"targetNamespace="http://yournamespace.com"><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://yournamespace.com"xmlns="http://yournamespace.com"elementFormDefault="qualified"><!-- Import the XSD schema --><xs:import namespace="http://yournamespace.com" schemaLocation="scriptService.xsd"/><!-- Define input and output message elements --><xs:element name="ExecuteScriptRequest" type="tns:ScriptInfo"/><xs:element name="ExecuteScriptResponse" type="tns:ScriptResult"/></xs:schema></wsdl:types><!-- Define the portType --><wsdl:portType name="ScriptServicePortType"><wsdl:operation name="ExecuteScript"><wsdl:input message="tns:ExecuteScriptRequest"/><wsdl:output message="tns:ExecuteScriptResponse"/></wsdl:operation></wsdl:portType><!-- Define the binding --><wsdl:binding name="ScriptServiceBinding" type="tns:ScriptServicePortType"><wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="ExecuteScript"><wsdl:input><wsdlsoap:body use="literal"/></wsdl:input><wsdl:output><wsdlsoap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><!-- Define the service --><wsdl:service name="ScriptService"><wsdl:port name="ScriptServicePort" binding="tns:ScriptServiceBinding"><wsdlsoap:address location="http://your-service-endpoint"/></wsdl:port></wsdl:service>
</wsdl:definitions>

然后,创建一个名为scriptService.wsdl的WSDL文件,也在schemas文件夹中,内容如下:

scriptService.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://yournamespace.com"xmlns="http://yournamespace.com"elementFormDefault="qualified"><xs:complexType name="ScriptInfo"><xs:sequence><xs:element name="projectName" type="xs:string"/><xs:element name="scriptName" type="xs:string"/><xs:element name="args01" type="xs:string"/></xs:sequence></xs:complexType><xs:complexType name="ScriptResult"><xs:sequence><xs:element name="executionId" type="xs:string"/><xs:element name="exitStatus" type="xs:int"/><xs:element name="timestamp" type="xs:dateTime"/></xs:sequence></xs:complexType><xs:element name="ScriptRequest" type="ScriptInfo"/><xs:element name="ScriptResponse" type="ScriptResult"/>
</xs:schema>

创建一个用于定义SOAP服务的Endpoint类。这个类将会处理SOAP请求和响应。

SoapEndpoint.java

import org.springframework.ws.server.endpoint.annotation.*;@Endpoint
public class SoapEndpoint {private static final String NAMESPACE_URI = "http://yournamespace.com";@PayloadRoot(namespace = NAMESPACE_URI, localPart = "ExecuteScriptRequest")@ResponsePayloadpublic ExecuteScriptResponse executeScript(@RequestPayload ExecuteScriptRequest request) {// 处理请求并生成响应ExecuteScriptResponse response = new ExecuteScriptResponse();ScriptResult scriptResult = new ScriptResult();// 设置响应内容response.setScriptResult(scriptResult);return response;}
}

接下来,创建一个配置类,用于配置Spring Web Services。

Spring Web Services.java

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.ws.config.annotation.EnableWs;
import org.springframework.ws.config.annotation.WsConfigurerAdapter;
import org.springframework.ws.soap.server.endpoint.interceptor.PayloadLoggingInterceptor;
import org.springframework.ws.transport.http.MessageDispatcherServlet;@EnableWs
@Configuration
public class WebServiceConfig extends WsConfigurerAdapter {@Beanpublic ServletRegistrationBean<MessageDispatcherServlet> messageDispatcherServlet(ApplicationContext applicationContext) {MessageDispatcherServlet servlet = new MessageDispatcherServlet();servlet.setApplicationContext(applicationContext);servlet.setTransformWsdlLocations(true);return new ServletRegistrationBean<>(servlet, "/ws/*");}@Beanpublic PayloadLoggingInterceptor payloadLoggingInterceptor() {return new PayloadLoggingInterceptor();}
}

application.properties

spring.webservices.mapping.path=/ws
spring.webservices.servlet.init.wsdlPath=classpath:/schemas/scriptService.wsdl

application.yml

server:port: 8080spring:webservices:mapping:path: /wsservlet:init:wsdlPath: classpath:/schemas/scriptService.wsdl

在这个示例中,我们配置了服务器端口为8080,映射了SOAP服务的路径为/ws。同时,我们指定了WSDL文件的路径为classpath:/schemas/scriptService.wsdl,这意味着WSDL文件应该放在src/main/resources/schemas目录下。

如果你有其他需要配置的属性,你可以在这个application.yml文件中添加。记得根据你的实际项目情况来进行相应的配置。

请确保修改命名空间、路径和其他属性,以便与你的项目和数据结构匹配。配置完成后,当你启动应用程序时,它将使用这些配置项来设置Spring Boot SOAP服务。

http://www.yidumall.com/news/5130.html

相关文章:

  • 网站制作案例网站页面
  • 宝鸡外贸营销网站建设教育培训网站大全
  • wordpress做的网站百度推广客户端怎么登陆
  • 个人网站可以做产品众筹吗上海百度移动关键词排名优化
  • 哪个网站可以接加工单硬件优化大师
  • 做蛋糕网站的优点收录提交入口
  • 网站做友链的好处网络推广渠道都有哪些
  • 网站建设申请网站怎么快速排名
  • 网站模块是什么福州百度关键词优化
  • 购物网站开发 需求分析搜索推广渠道有哪些
  • 河南做外贸网站的公司简介百度竞价排名危机事件
  • 手机app软件开发排行榜搜狗搜索引擎优化论文
  • 河北省建设厅政府网站公示网络优化工程师是干什么的
  • 网站怎么做结算站长工具备案查询
  • 政府蒙古文网站建设汇报seo的中文含义是
  • 网页设计培训心得神马快速排名优化工具
  • 网站没收录要怎么做怎样做网站推广啊
  • 广东经营性网站备案温州seo服务
  • 站长之家 wordpress搜索引擎推广的方法有
  • zhi做网站专业做网站官网
  • 中国建筑怎么样seo 优化公司
  • 常州做网站基本流程新软件推广平台
  • 郑州 公司网站制作东莞seo网站排名优化
  • 黑龙江省建设银行网站南宁正规的seo费用
  • 治多县网站建设公司网络营销方法有哪些
  • 北京中兴时代网站建设新闻报道最新消息今天
  • 永久免费网站建立北京seo服务商找行者seo
  • 沈阳专业网站制作设计线上广告平台
  • 幼儿园网站建设情况今日腾讯新闻最新消息
  • 网站备案有什么作用全网营销推广平台有哪些