Wrapper class webservice.jaxws.SayHi is not found. Have you run APT to generate them?
最近在研究webservice,利用jdk来实现简单的webservice发布,但是运行时却发生了这样的异常,如下:
Exception in thread "main" com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class webservice.jaxws.SayHi is not found. Have you run APT to generate them?
at com.sun.xml.internal.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:256)
at com.sun.xml.internal.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:567)
at com.sun.xml.internal.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:514)
at com.sun.xml.internal.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:341)
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:227)
at com.sun.xml.internal.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:308)
at com.sun.xml.internal.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:174)
at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:420)
at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:439)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:208)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:138)
at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:90)
at javax.xml.ws.Endpoint.publish(Endpoint.java:170)
at webservice.Test.main(Test.java:8)
最后发现原来是jdk的版本过低,我使用的是jdk1.6.10,而最低要求为1.6.22以上即可,故特此记录下来,谨防再次出错
另外,此种发布方法如下:
第一步:定义接口HelloWorld
package webservice;
import javax.jws.WebService;
@WebService public interface HelloWorld {
String sayHi(String str);
}
第二步:实现类HelloWorldImpl
package webservice;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
@WebService(endpointInterface = "webservice.HelloWorld")
public class HelloWorldImpl implements HelloWorld {
public String sayHi(String str) {
System.out.println("我是webservice");
return "Hello ," + str;
}
public static void main(String[] args) {
Endpoint.publish("http://localhost:8088/hello", new HelloWorldImpl());
}
}
第三步:运行HelloWorldImpl.java main方法
第四步:在浏览器地址栏输入:http://localhost:8088/hello?wsdl
第五步:查看响应xml文件:如成功返回如下:

Wrapper class webservice.jaxws.SayHi is not found. Have you run APT to generate them?的更多相关文章
- Wrapper class package.jaxws.methodName is not found. Have you run APT to generate them?解决方案
使用JAX-WS 2.X基于Web容器发布WebService报错,错误信息类似于: Wrapper class package.jaxws.methodName is not found. Have ...
- 调用webservice客户端方法 runtime modeler error: Wrapper class ××× is not found. Have you run APT to generate them?
用wsimport生成webservice的客户端以后,调用客户端生成方法时总是出现 runtime modeler error: Wrapper class stardand.nrcms.nckin ...
- WebService:JAX-WS实现WebService
WebService和Java核心技术中的RMI一样用于实现异构平台上的应用程序之间数据的交互,唯一不同的是这样的技术屏蔽了语言之间的差异.这也是其大行其道的原因. 实现WebService的技术多种 ...
- 使用Mulesoft建立webservice, jax-ws方式, wsdl first
先创建wsdl,然后生成class 1. 下载 HRData.xsd 和 HRDataService.wsdl http://yunpan.cn/Q4zBXC4fvC74xhttp://yunpan. ...
- webservice jaxws header验证
@WebService @HandlerChain public class UserService { ... } package com.xx.ws.header; import org.w3c. ...
- JAVA6开发WebService (一)
转载自http://wuhongyu.iteye.com/blog/807470 WebService是SOA的一种较好的实现方式,它将应用程序的不同功能单元通过中立的契约(独立于硬件平台.操作系统和 ...
- JDK 1.6 写Webservice时,runtime modeler error: Wrapper class com.ws.jaxws.DoSomething is not found问题的解决办法
转自:http://blog.csdn.net/forandever/article/details/5276038 1.问题如下: Exception in thread "main&qu ...
- Java WebService 简单实例
前言:朋友们开始以下教程前,请先看第五大点的注意事项,以避免不必要的重复操作. 一.准备工作(以下为本实例使用工具) 1.MyEclipse10.7.1 2.JDK 1.6.0_22 二.创建服务端 ...
- Java WebService 简单实例[转]
http://www.cnblogs.com/yisheng163/p/4524808.html?utm_source=tuicool 前言:朋友们开始以下教程前,请先看第五大点的注意事项,以避免不必 ...
随机推荐
- React Native 组件之TouchableHightLight
TouchableHighlight 这个组件一般是用于封装视图 给视图添加事件“触摸按下”(类似于click事件) <TouchableHighlight onPress={this._onP ...
- Python day8常用格式化format类2
format常用格式化 tp1="i am {},age {},{}".format('LittlePage',18,'boy') tp2="i am {},age {} ...
- kali删除软件
kali中主要为2种卸载方法:1.apt2.dpkg 使用apt的方式有:apt-get remove [package]apt-get remove --purge # ------(package ...
- VcCallC#_01
1.C# 代码: using System; using System.Collections.Generic; //using System.Linq; using System.Text; //u ...
- xshell各个版本下载
官网下载 怎么从官网下载Xshell 5 或者其他版本呢? 下面我们详细步骤说明! 1)首先我们打开netsarang官网, 点击下载Xshell 6 !填写邮箱等信息! http://www.net ...
- Jmeter JDBC的使用
1.当我们在对接口进行断言或进行多个接口串联时,常常会需要从DB查询数据来做辅助,连接JDBC需要有支持DB的jar包:官网下载地址:https://dev.mysql.com/downloads/c ...
- codeforces 521a//DNA Alignment// Codeforces Round #295(Div. 1)
题意:如题定义的函数,取最大值的数量有多少? 结论只猜对了一半. 首先,如果只有一个元素结果肯定是1.否则.s串中元素数量分别记为a,t,c,g.设另一个串t中数量为a',t',c',g'.那么,固定 ...
- Confluence 6 更新目录
当编辑目录时候的限制 你不能对你用户属于的目录进行编辑,禁用或者删除.这个能够预防管理员通过修改目录的时候讲自己属于的管理员权限从系统管理员组中删除. 这个限制对所有的用户目录类型适用.例如: 如果当 ...
- vuecli3 引入script 针对没有cmd amd require等方式的js
最近做高德开发,需要引入高德的js,但是 说实话 高德官方的文档不知道大佬们有没有看懂,反正我是没看懂,写的都什么鬼?我怎么引都引入不了,迫不得已想到了如下方法: 一.准备一个能够在页面中插入js的方 ...
- UVA-10995 Educational Journey
The University of Calgary team qualified for the 28th ACM International Collegiate Programming Conte ...