WebService wsdl没有types的问题
刚学WebService就遇到一个问题,按视屏敲的代码,它生成的wsdl页面与自己的不一样,我的没有types,结构完全不同了
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 at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<!--
Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://impl.service.kiwifly.cn/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://impl.service.kiwifly.cn/" name="MyServiceImplService">
<import namespace="http://service.kiwifly.cn/" location="http://localhost:8888/ns?wsdl=1"/>
<binding xmlns:ns1="http://service.kiwifly.cn/" name="MyServiceImplPortBinding" type="ns1:IMyService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="add">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="minus">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyServiceImplService">
<port name="MyServiceImplPort" binding="tns:MyServiceImplPortBinding">
<soap:address location="http://localhost:8888/ns"/>
</port>
</service>
</definitions>
百度了一下也有人遇到了这个问题,找了一会,终于找到了答案,原来接口实现类与接口必须要在一个包下面,否则就会出现这种情况,我的目录结构
改成
再重新发布就可以了!
<span style="font-size:10px;">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 at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<!--
Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6.
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.kiwifly.cn/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://service.kiwifly.cn/" name="MyServiceImplService">
<types>
<xsd:schema>
<xsd:import namespace="http://service.kiwifly.cn/" schemaLocation="http://localhost:8888/ns?xsd=1"/>
</xsd:schema>
</types>
<message name="add">
<part name="parameters" element="tns:add"/>
</message>
<message name="addResponse">
<part name="parameters" element="tns:addResponse"/>
</message>
<message name="minus">
<part name="parameters" element="tns:minus"/>
</message>
<message name="minusResponse">
<part name="parameters" element="tns:minusResponse"/>
</message>
<portType name="IMyService">
<operation name="add">
<input message="tns:add"/>
<output message="tns:addResponse"/>
</operation>
<operation name="minus">
<input message="tns:minus"/>
<output message="tns:minusResponse"/>
</operation>
</portType>
<binding name="MyServiceImplPortBinding" type="tns:IMyService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="add">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="minus">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyServiceImplService">
<port name="MyServiceImplPort" binding="tns:MyServiceImplPortBinding">
<soap:address location="http://localhost:8888/ns"/>
</port>
</service>
</definitions></span>
WebService wsdl没有types的问题的更多相关文章
- webservice wsdl接口配置与调用
准备包 WebRoot/WEB-INF/lib/axis2-adb-1.6.2.jarWebRoot/WEB-INF/lib/axis2-ant-plugin-1.6.2.jarWebRoot/WEB ...
- 解决cxf+springmvc发布的webservice,缺少types,portType和message标签的问题
用cxf+spring发布了webservice,发现生成的wsdl的types,message和portType都以import的方式导入的.. 原因:命名空间问题 我想要生成的wsdl在同个文件中 ...
- webservice wsdl axis2报错 Provider com.bea.xml.stream.MXParserFactory not found
错误信息: Exception in thread "main" javax.xml.stream.FactoryConfigurationError: Provider com. ...
- 分享:根据webservice WSDL地址自动生成java调用代码及JAR包
分享:根据webservice WSDL地址自动生成java调用代码及JAR包使用步骤:一.安装java 并配置JAVA_HOME 及 path二.安装ANT 并配置ANT_HOME三.解压WsdlT ...
- webservice wsdl语法基础
XML-WSDL基础知识 WSDL 1.1. WSDL 简介 1.1.1. 概述 WSDL 指网络服务描述语言 (Web Services Description Language) WSDL ...
- WebService WSDL结构分析
转载地址:http://blog.csdn.net/sunchaohuang/article/details/3076375 WSDL (Web Services Description L ...
- PHP调用webService WSDL 接口发送邮件
1.什么是 webService WSDL? webService WSDL 暴露一些接口给第三方调用,在底层会转化成一个HTTP请求,主要是不同语言之间为了通讯的一个协议,比如发送邮件的系统是用J ...
- webservice wsdl文件标签讲解
<?xml version="1.0" encoding="utf8"?> <wsdl:definitions targetNamespace ...
- .net自定义WebService WSDL
最近工作需要向第三方提供一个WebService服务,坑爹的是第三方背景牛X,我方提供的服务必须完全遵照其客户端方预先定义好了的接口,一个符号都不允许修改. .net平台编写的WebService由于 ...
随机推荐
- 从" ThinkPHP 开发规范 "看 PHP 的命名规范和开发建议
稍稍水一篇博客,摘抄自Think PHP 的开发规范,很有引导性,我们可以将这些规范实践到原生 PHP 中. 命名规范 使用ThinkPHP开发的过程中应该尽量遵循下列命名规范: 类文件都是以.cla ...
- Android Studio使用教程(一)(转)
今年的Google全球开发者大会虽然没有新的Android系统和设备,但是还是推出了一些不错的产品,Android Studio就是其中之一.这个基于Intellij IDEA开发的Android I ...
- 使用自定义字体 @font-face 小试
第一次了解到@font-face是小伙伴给我展示的功能 感觉奇妙的不得了 @font-face 是CSS3中的一个模块 使用它你就可以将你自定义的web字体 去实现一些奇妙的想法 首先先介绍 ...
- CSS中的三种基本的定位机制
CSS 定位机制 CSS 有三种基本的定位机制:普通流.浮动和绝对定位. 一.普通流 除非专门指定,否则所有框都在普通流中定位.普通流中元素框的位置由元素在(X)HTML中的位置决定.块级元素从上到下 ...
- 【转】内部Handler类引起内存泄露
如果您在Activity中定义了一个内部Handler类,如下代码: public class MainActivity extends Activity { private Handl ...
- [android] 手机卫士自定义对话框布局
手机防盗页面部分 点击手机防盗,进行判断,如果没有设置密码,显示一个设置密码的对话框,如果已经设置密码了,弹出输入密码对话框 密码保存在SharedPreferences中,数据取出进行判断 自定义一 ...
- iOS:交换Button中图片与文字的左右位置
titleEdgeInsets属性和 imageEdgeInsets属性只是在画这个button出来的时候用来调整image和label位置的属性,并不影响button本身的大小.它们只是image和 ...
- iOS开发网络篇—网络编程基础(二)
下面叙述的是关于几个必须要知道的iOS网络编程入门级别的要点: 1.客户端如何找到连接的服务器 客户端通过URL找到想要连接的服务器 2.什么是URL URL的全称是Un ...
- Entity Framework做IN查询
开发中遇到的Too high level of nesting for select错误 项目使用了Entity Framework结合Mysql, 遇到了一个非常奇怪的性能问题,一个看起来非常简单的 ...
- Effective Java 01 Consider static factory methods instead of constructors
Advantage Unlike constructors, they have names. (BigInteger.probablePrime vs BigInteger(int, int, Ra ...