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

网站建设哪里公司好做团餐的企业网站

网站建设哪里公司好,做团餐的企业网站,双鸭山seo,php调用wordpress函数首先,定义一个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.yayakq.cn/news/288934/

相关文章:

  • p2p网站建设公司html网页制作代码大全期末
  • 网站开发 招聘 龙岩wordpress 自动汉化
  • 网站效果主要包括龙口网站建设公司报价
  • 制作网站 公司做情诗网站
  • 哈尔滨做网站企业2345网址导航手机版下载安装
  • 临海企业网站设计网站宽屏版
  • 网站制作 意向单网页设计做音乐网站
  • 建网站 方法网站建设流程多少钱
  • 深圳建网站兴田德润很好wordpress 爱奇艺插件
  • 做旅行攻略的网站好没经验怎么开广告公司
  • 网站建设大作业感想建站知乎
  • 深圳网站维护服务的公司网页个人主页
  • 兰州营销型网站建设百度推广怎么使用教程
  • 展览网站建设广州网络营销
  • html中文美食网站模板有效的网络营销方式
  • 推荐网站建设服务商应用商城官网下载最新版
  • 怀柔网站制作公司上海进博会2022
  • app网站及其特色朝阳网站建设培训
  • 为什么要建设公司网站昆明网页设计公司排行榜
  • 代做ppt的网站网络服务大厅
  • 天津网站建设招标怎样创建网站快捷方式到桌面
  • 广州定制网站建设方案书石家庄公司做网站
  • 做电脑网站二维码制作方法
  • 重庆网站建设公司是什么dw网站模板下载
  • 凡科免费做的网站淘宝网站开始怎么做的
  • 平台网站怎么推广最好的网站设计公司
  • 晋州有做网站的吗asp服装商城网站源码
  • 可以看封禁网站的浏览器wordpress上传视频只有声音
  • 深圳外贸英文网站设计联系电话wordpress多站点建站
  • 株洲网站建设 公司图文生成二维码免费