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由于 ...
随机推荐
- 使用WCF对外提供接口
本篇将通过WCF以webservices的方式对外提供接口.同时使用NUnit对webservices中的方法进行单元测试. 开发契约 contract Contract项目为类库项目,该项目下会包含 ...
- WCF实战2
上一篇中,我们创建了一个简单的WCF服务,在测试的时候,我们使用VS2008自带的WCFSVCHost(WCF服务主机)发布WCF服务,以便进行测试.这种VS2008内置的WCFSVCHost只适用于 ...
- Atitit.木马 病毒 免杀 技术 360免杀 杀毒软件免杀 原理与原则 attilax 总结
Atitit.木马 病毒 免杀 技术 360免杀 杀毒软件免杀 原理与原则 attilax 总结 1. ,免杀技术的用途2 1.1. 病毒木马的编写2 1.2. 软件保护所用的加密产品(比如壳)中,有 ...
- FIL Dalian Jobs
Department Vacancies Total Skill Set Experience Language Hiring Manager Business Finance Finance Ana ...
- RecyclerView解析--onViewDetachedFromWindow()/onViewAttachedToWindow()
先看这段源码介绍: /** * Called when a view created by this adapter has been detached from its window. * * &l ...
- Spring(八)SSH整合简述
一.Spring与Struts2的整合 1.1.整合步骤 1.2.配置web.xml 1.3.配置spring配置文件applicationContext.xml 1.4.配置struts配置文件 1 ...
- iOS扫一扫功能开发
之前很多二维码扫描都是基于zxing做的,但是zxing用起来真的很麻烦,又一直不更新.随着iOS6退出历史舞台,终于可以使用iOS7以后,用系统的AVFoundation做的二维码扫描器了. 初始化 ...
- IOS组件绑定无效错误
报错的原因:界面按钮事件没有绑定到源代码或者相关的代码被注释了.比如你的button组件以及绑定到IBOutlet,但是viewcontrol.m上没有相关的代码,就会出现异常.
- redis中set命令的源码分析
首先在源码中的redis.c文件中有一个结构体:redisCommand redisCommandTable[],这个结构体中定义了每个命令对应的函数,源码中的set命令对应的函数是setComman ...
- MongoDB学习笔记——聚合操作之MapReduce
MapReduce MongoDB中的MapReduce相当于关系数据库中的group by.使用MapReduce要实现两个函数Map和Reduce函数.Map函数调用emit(key,value) ...