Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:153) at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:83) at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:244) at com.sun.xml.internal.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:312) at com.sun.xml.internal.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:178) at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:456) at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:475) at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:213) at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:143) at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:102) at javax.xml.ws.Endpoint.publish(Endpoint.java:170) at com.webservice.WsPublisher.main(WsPublisher.java:20) Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions java.util.Map is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at java.util.Map at public java.util.Map com.webservice.jaxws.SayHelloWorld2Response._return at com.webservice.jaxws.SayHelloWorld2Response java.util.Map does not have a no-arg default constructor. this problem is related to the following location: at java.util.Map at public java.util.Map com.webservice.jaxws.SayHelloWorld2Response._return at com.webservice.jaxws.SayHelloWorld2Response at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:140) ... 11 more
当运行时抛出异常 java.security.PrivilegedActionException时候,查看异常说是没办法处理接口,但是当我换成HashMap的时候,是可以处理的;不过有个问题,就是生成客户端的时候,Jax-Ms会帮你生成一个HashMap类,这个类里面是空的,客户端服务不是调用java.util包下的HashMap,而是调用webservice生成的HashMap,所以并不能实现需求。
解决方案:使用数组或者json数据传输,就不会出现这样的问题。
相关推荐
抛出无法找到主类:org.apache.axis.wsdl.WSDL2Java(Throws Could not find main class: org.apache.axis.wsdl.WSDL2Java)。 添加本文的jar包压缩包解压出来的所有jar包到当前使用的java.exe 命令的lib目录下的ext...
NULL 博文链接:https://hw1287789687.iteye.com/blog/2034439
weblogic12c部署webservice错误问题WSSERVLET11: 无法解析运行时描述符: java.lang.IllegalStateException: MASM0001:
faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: AxisFault faultCode: {...
jdk升级之后出现异常:java.lang.NoClassDefFoundError: javax/xml/ws/Service 1、解决方案jdk降级至1.8之前 2、由于JDK9以后,去除了javax.xml包需要引入对应的jar包 <groupId>javax.activation <artifactId>...
java调用webservicejava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava...
C# WebService入门.docx C# WebService入门.docx C# WebService入门.docx C# WebService入门.docx C# WebService入门.docx C# WebService入门.docx C# WebService入门.docx C# WebService入门.docx C# WebService...
javacode发布成webservice.
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The element type "p" must be terminated by the matching end-tag ...
webservice技术axis里面有可能会缺少的三个jar包: mail.jar xmlsec.jar activation.jar 。
spring中配置webservice及其基础开发(java).docx
spring中配置webservice及其基础开发(java).pdf
C#调用WebService实例和开发(wsdl).rar
Java WebService 简单实例 http://blog.csdn.net/kingmax54212008/article/details/49764401 前言:朋友们开始以下教程前,请先看第五大点的注意事项,以避免不必要的重复操作。 一、准备工作(以下为本实例...
axis2请求.Net webservice接口,以天气预报getSupportCity接口为例
webservice CXF 报错:java.lang.NoClassDefFoundError: org/apache/neethi/builders/AssertionBuilder 需要用到此jar文件 通过apache官网可获得。 文件位置\apache-cxf-2.7.13\lib
java调用json参数的webservice 涉及技术: JAVA JSON WEBSERVICE
jdk升级jdk10后,原本jdk自带的 webservice一些包确实,引起的一系列错误解决方案
With this book, you will be able to design your own security implementation or use a protocol to grant permissions over your RESTful applications with OAuth. You will also gain knowledge about the ...