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

网站 dns 解析商业信息发布平台

网站 dns 解析,商业信息发布平台,紫搜做网站,有什么做兼职的好的网站首先#xff0c;定义一个XSD#xff08;XML Schema Definition#xff09;来描述你的数据结构。在你的Maven项目的src/main/resources目录下#xff0c;创建一个名为schemas的文件夹#xff0c;并在其中创建一个名为scriptService.xsd的文件#xff0c;内容如下#xff…首先定义一个XSDXML Schema Definition来描述你的数据结构。在你的Maven项目的src/main/resources目录下创建一个名为schemas的文件夹并在其中创建一个名为scriptService.xsd的文件内容如下 scriptService.wsdl ?xml version1.0 encodingUTF-8? wsdl:definitions xmlns:wsdlhttp://schemas.xmlsoap.org/wsdl/xmlns:tnshttp://yournamespace.comtargetNamespacehttp://yournamespace.comwsdl:typesxs:schema xmlns:xshttp://www.w3.org/2001/XMLSchematargetNamespacehttp://yournamespace.comxmlnshttp://yournamespace.comelementFormDefaultqualified!-- Import the XSD schema --xs:import namespacehttp://yournamespace.com schemaLocationscriptService.xsd/!-- Define input and output message elements --xs:element nameExecuteScriptRequest typetns:ScriptInfo/xs:element nameExecuteScriptResponse typetns:ScriptResult//xs:schema/wsdl:types!-- Define the portType --wsdl:portType nameScriptServicePortTypewsdl:operation nameExecuteScriptwsdl:input messagetns:ExecuteScriptRequest/wsdl:output messagetns:ExecuteScriptResponse//wsdl:operation/wsdl:portType!-- Define the binding --wsdl:binding nameScriptServiceBinding typetns:ScriptServicePortTypewsdlsoap:binding styledocument transporthttp://schemas.xmlsoap.org/soap/http/wsdl:operation nameExecuteScriptwsdl:inputwsdlsoap:body useliteral//wsdl:inputwsdl:outputwsdlsoap:body useliteral//wsdl:output/wsdl:operation/wsdl:binding!-- Define the service --wsdl:service nameScriptServicewsdl:port nameScriptServicePort bindingtns:ScriptServiceBindingwsdlsoap:address locationhttp://your-service-endpoint//wsdl:port/wsdl:service /wsdl:definitions然后创建一个名为scriptService.wsdl的WSDL文件也在schemas文件夹中内容如下 scriptService.xsd ?xml version1.0 encodingUTF-8? xs:schema xmlns:xshttp://www.w3.org/2001/XMLSchematargetNamespacehttp://yournamespace.comxmlnshttp://yournamespace.comelementFormDefaultqualifiedxs:complexType nameScriptInfoxs:sequencexs:element nameprojectName typexs:string/xs:element namescriptName typexs:string/xs:element nameargs01 typexs:string//xs:sequence/xs:complexTypexs:complexType nameScriptResultxs:sequencexs:element nameexecutionId typexs:string/xs:element nameexitStatus typexs:int/xs:element nametimestamp typexs:dateTime//xs:sequence/xs:complexTypexs:element nameScriptRequest typeScriptInfo/xs:element nameScriptResponse typeScriptResult/ /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 ServletRegistrationBeanMessageDispatcherServlet 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.wsdlPathclasspath:/schemas/scriptService.wsdlapplication.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.hkea.cn/news/14282444/

相关文章:

  • iis服务器的默认网站凡科网登录下载
  • 湖南网站托管湖南郴州市房价
  • 做爰免费网站机关单位不得建设网站
  • 如何做代刷网站内部优化
  • 北京网站建设百度排名12306网站开发过程
  • 威县做网站多少钱如何通过网站后台修改网站
  • 域名备案查询站长之家网站数据库分离怎么做
  • 如何去掉网站后缀wordpress国外有名的网站
  • 西安手机商城网站设计物流网站开发实训
  • 宿迁集团网站建设如何咨询网络服务商
  • 完成公司门户网站建设深圳优秀网站建设公司
  • 办公家具网站建设公司湖北华路建设工程有限公司网站
  • 简洁大气的企业网站wordpress出售电子书
  • 动态手机网站怎么做电子商务主要学什么就业工资
  • 做网站推广需要什么wordpress 和wiki
  • php网站说明广州木马网站建设公司怎么样
  • 建设网站公司管备案么工业设计专业怎么样
  • 游戏官网做的好的网站比分网站建设
  • 做二手货车网站公司工业设计师
  • 职业学校网站模板erp系统教学
  • 网站排名不稳定大宗商品交易平台政策
  • 北京做网站的公司有哪些嵌入式软件开发语言
  • 虫部落导航网站怎么做信息流投放平台
  • 网站开发英文怎么说深圳知名设计公司
  • 沈阳网络公司官网seo综合诊断工具
  • 扬中本地网站佛山模板建站哪家好
  • 手机网站安装app界面设计常用的布局具有哪些
  • 网站重新制作多久google重新收录重庆seo推广方案
  • 怎样做科普视频网站软件网站排行榜
  • p2p网站开发的流程绵阳做seo网站公司