对原来的自定义WebService设置注解:

package cn.cloud9.jax_ws.server.intf;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding; /**
* @author OnCloud9
* @description
* @project WebService
* @date 2022年04月23日 11:10
*
* 标注此接口是Web服务接口
*/
@WebService(
targetNamespace = "http://service.cn.cloud9",
name = "WeatherWS-Soap",
portName = "WeatherWS-Soap-Port",
serviceName = "WeatherWS"
)
@BindingType(SOAPBinding.SOAP12HTTP_BINDING) // 发布 SOAP1。2接口
public class WeatherInterfaceImpl implements WeatherInterface{ @WebMethod(
operationName = "getWeather",
exclude = false
)
@Override
public @WebResult(name = "result") String queryWeather(@WebParam(name = "cityName") String cityName) {
System.out.println("打印城市名称:" + cityName);
return cityName + " 天气:晴朗";
}
}

 

WSDL信息:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e. -->
<!-- Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e. -->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://service.cn.cloud9" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://service.cn.cloud9" name="WeatherWS">
<types>
<xsd:schema>
<xsd:import namespace="http://service.cn.cloud9" schemaLocation="http://127.0.0.1:9090/weather?xsd=1"/>
</xsd:schema>
</types>
<message name="getWeather">
<part name="parameters" element="tns:getWeather"/>
</message>
<message name="getWeatherResponse">
<part name="parameters" element="tns:getWeatherResponse"/>
</message>
<portType name="WeatherWS-Soap">
<operation name="getWeather">
<input wsam:Action="http://service.cn.cloud9/WeatherWS-Soap/getWeatherRequest" message="tns:getWeather"/>
<output wsam:Action="http://service.cn.cloud9/WeatherWS-Soap/getWeatherResponse" message="tns:getWeatherResponse"/>
</operation>
</portType>
<binding name="WeatherWS-Soap-PortBinding" type="tns:WeatherWS-Soap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getWeather">
<soap12:operation soapAction=""/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
</binding>
<service name="WeatherWS">
<port name="WeatherWS-Soap-Port" binding="tns:WeatherWS-Soap-PortBinding">
<soap12:address location="http://127.0.0.1:9090/weather"/>
</port>
</service>
</definitions>

  

【WSDL】03 使用注解自定义服务信息的更多相关文章

  1. SpringCloud系列四:Eureka 服务发现框架(定义 Eureka 服务端、Eureka 服务信息、Eureka 发现管理、Eureka 安全配置、Eureka-HA(高可用) 机制、Eureka 服务打包部署)

    1.概念:Eureka 服务发现框架 2.具体内容 对于服务发现框架可以简单的理解为服务的注册以及使用操作步骤,例如:在 ZooKeeper 组件,这个组件里面已经明确的描述了一个服务的注册以及发现操 ...

  2. PIE SDK加载自定义服务数据

    1.功能简介 自定义服务数据,将符合要求的矢量数据和栅格数据集等数据以服务的方式发布,将数据存储在某服务器中,在有网络的情况下可以根据URL就可以访问,比较常见的服务数据类型的有ArcGIS Serv ...

  3. Java Scala获取所有注解的类信息

    要想获取使用指定注解的类信息,可借助工具: org.reflections.Reflections 此工具将Java反射进行了高级封装,Reflections 通过扫描 classpath,索引元数据 ...

  4. angularJs自定义服务(实现签名和加密)

    写在前面: angularJS是google公司主推的js开发优秀框架... 页面展示: 在应用中进行加密是普遍存在的,个人建议在前端实现加密签名(前端加密是否必要来自知乎:http://www.zh ...

  5. Android系统在新进程中启动自定义服务过程(startService)的原理分析

    在编写Android应用程序时,我们一般将一些计算型的逻辑放在一个独立的进程来处理,这样主进程仍然可以流畅地响应界面事件,提高用户体验.Android系统为我们提供了一个Service类,我们可以实现 ...

  6. SpringBoot自定义错误信息,SpringBoot适配Ajax请求

    SpringBoot自定义错误信息,SpringBoot自定义异常处理类, SpringBoot异常结果处理适配页面及Ajax请求, SpringBoot适配Ajax请求 ============== ...

  7. Android Service总结03 之被启动的服务 -- Started Service

    Android Service总结03 之被启动的服务 -- Started Service 版本 版本说明 发布时间 发布人 V1.0 添加了Service的介绍和示例 2013-03-17 Sky ...

  8. java注解自定义使用

    Java提供了4种注解,专门负责新注解的创建: @Target: 表示该注解可以用于什么地方,可能的ElementType参数有:CONSTRUCTOR:构造器的声明FIELD:域声明(包括enum实 ...

  9. AngularJS内建服务以及自定义服务的用法

    在AngularJS中, 服务是一个比较重要的部分,它是一个对象或者是函数,可以在你的AngularJS的应用中使用.接下来介绍几种比较常用的内建服务以及自定义服务的方法. [内建服务] (1)loc ...

  10. ASP.NET MVC 学习笔记-7.自定义配置信息 ASP.NET MVC 学习笔记-6.异步控制器 ASP.NET MVC 学习笔记-5.Controller与View的数据传递 ASP.NET MVC 学习笔记-4.ASP.NET MVC中Ajax的应用 ASP.NET MVC 学习笔记-3.面向对象设计原则

    ASP.NET MVC 学习笔记-7.自定义配置信息   ASP.NET程序中的web.config文件中,在appSettings这个配置节中能够保存一些配置,比如, 1 <appSettin ...

随机推荐

  1. 开源一站式敏捷测试管理&极简项目管理 itest(爱测试) 6.6.0 发布 ,新增拖拽生成接口测试断言

    itest 简介 itest 开源敏捷测试管理,testOps 践行者,极简的任务管理,测试管理,缺陷管理,测试环境管理,接口测试5合1,又有丰富的统计分析.可按测试包分配测试用例执行,也可建测试迭代 ...

  2. NumPy 通用函数(ufunc):高性能数组运算的利器

    NumPy 通用函数(ufunc) 简介 NumPy 通用函数(ufunc),代表"通用函数",是一类用于对 ndarray 对象进行逐元素运算的高性能函数.ufunc 使 Num ...

  3. git基础命令 gitHub

               git 和 gitHub             git : 本地项目版本管理工具             gitHub : 相当于一个有很多功能的百度云盘,存储本地项目版本,管 ...

  4. LeetCode 449. Serialize and Deserialize BST 序列化和反序列化二叉搜索树 (Java)

    题目: Serialization is the process of converting a data structure or object into a sequence of bits so ...

  5. EF CORE 遇到“无法打开登录所请求的数据库 "win7bc"。登录失败。”

    报错内容:ex:An exception has been raised that is likely due to a transient failure. Consider enabling tr ...

  6. 你唯一需要的是“Wide Events”,而非“Metrics、Logs、Traces”

    Charity Majors 的这句话可能是对科技行业当前可观察性状态的最好总结--完全的.大规模的混乱.大家都很困惑.什么是 trace?什么是 span?一行日志就是一个 span 吗?如果我有日 ...

  7. 《Android开发卷——自定义日期选择器(二)》

    (小米手机) (中兴手机) 在上一篇中,我介绍了一般公司都会自定义时间日期选择器,并结合自己所做的项目给大家参考. 工作实录之<Android开发卷--自定义日期选择器(一)>链接:htt ...

  8. 讯飞有一个可以根据描述文本自动生成PPT的AI接口,有趣

    文档:https://www.xfyun.cn/doc/spark/PPTGeneration.html 价格方面提供了免费1000点的额度,生成一次是10点,正好100次,如果要购买的话最低要购买1 ...

  9. 字符数组转换及数字求和 java8 lambda表达式 demo

    public static void main(String[] args) throws IllegalAccessException { //字符串转换为数字且每个加上100,输出. String ...

  10. XAF 属性编辑器(PropertyEditor)- 原理篇

    前言 随着 DEV24.1.3 的发布,XAF Blazor 中的属性编辑器(PropertyEditor)也进行了很大的改动,在使用体验上也更接近 WinForm 了,由于进行了大量的封装,理解上没 ...