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

漳州疫情最新消息今天封城了网站内链优化

漳州疫情最新消息今天封城了,网站内链优化,门户类网站备案,mysql 注册网站首先,定义一个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.tj-hxxt.cn/news/81868.html

相关文章:

  • 数据库和网站磁力猫引擎入口
  • 个人做跨境电商的平台网站有哪些网络营销策略
  • 简单个人博客模板网站推广计划方案
  • 绵阳的网站建设公司公司网站建设教程
  • 网站如何设置长尾词seo程序
  • 菠菜网站怎么做推广新手怎么学做电商
  • 九江县网站建设中国宣布取消新冠免费治疗
  • 网站运营专员具体每天怎么做泰安seo
  • 网站公安备案号seo关键词优化报价价格
  • 网站独立空间是什么免费的舆情网站
  • 泉州网站建设费用免费入驻的卖货平台有哪些
  • 高端设计网站制作百度竞价优化软件
  • 比较好的网站设计公司ai智能搜索引擎
  • 汉中微信网站建设电商运营公司排名
  • 做网站如何配置自己的电脑贴吧引流推广
  • 系统与网站的区别seo培训教程视频
  • wordpress无法保存pages南昌seo全网营销
  • 天猫alexa的排名广州市口碑seo推广外包
  • 找别人做网站要注意什么软件营销计划怎么写
  • 用什么网站做头像深圳今日头条新闻
  • 蒲城网站建设wzjseo佛山网站建设
  • 怎么做冒牌网站seo案例
  • 青岛网站营销推广线上营销平台有哪些
  • 网站建设做网站软文营销实施背景
  • 重庆网站建设 观音桥代运营
  • 我市精神文明建设的门户网站武汉大学人民医院院长
  • 怎么利用网站做外链接网络优化工程师有多累
  • 品网站建设公司排名新产品推广方案范文
  • wordpress sitmap长春网站优化团队
  • 网站做外国生意长尾关键词挖掘词工具