javax.xml.ws.soap.SOAPFaultException:无法创建抽象类
嗨,任何帮助都将是我这个问题的好助手 知道我的客户机调用Web服务时为什么会出现此错误吗? 它是一个运行在JBoss上的cxf客户端。当我在我的客户端IPDFUtilities Service_BasicHttpBindingIPDFUtilities Service_客户端上调用convert方法时,我得到了SOAPFaultException:javax.xml.ws.soap.SOAPFaultException:无法创建抽象类,java,web-services,soap,wsdl,Java,Web Services,Soap,Wsdl,嗨,任何帮助都将是我这个问题的好助手 知道我的客户机调用Web服务时为什么会出现此错误吗? 它是一个运行在JBoss上的cxf客户端。当我在我的客户端IPDFUtilities Service_BasicHttpBindingIPDFUtilities Service_客户端上调用convert方法时,我得到了SOAPFaultException: javax.xml.ws.soap.SOAPFaultException: Cannot create an abstract class.
javax.xml.ws.soap.SOAPFaultException: Cannot create an abstract class.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
at com.sun.proxy.$Proxy136.convert(Unknown Source)
at leumi.pdfutilities.service.IPdfUtilitiesService_BasicHttpBindingIPdfUtilitiesService_Client.convert(IPdfUtilitiesService_BasicHttpBindingIPdfUtilitiesService_Client.java:72)
at ext.mesarim.out.Html2PdfConverter.getPdf(Html2PdfConverter.java:73)
at ext.mesarim.out.Html2PdfConverter.getPdf(Html2PdfConverter.java:127)
at ext.mesarim.out.MesarimHtmlParser.parse(MesarimHtmlParser.java:142)
at calypsox.tk.bo.document.GatewayMesarimDocumentSender.send(GatewayMesarimDocumentSender.java:136)
at com.calypso.engine.advice.SenderEngine.handleEvent(SenderEngine.java:358)
at com.calypso.engine.advice.SenderEngine.process(SenderEngine.java:217)
at com.calypso.engine.Engine$EngineThread.run(Engine.java:1413)
Caused by: org.apache.cxf.binding.soap.SoapFault: Cannot create an abstract class.
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:845)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1624)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1513)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
... 9 more
My wsdl :
<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions name="PdfUtilitiesService"
targetNamespace="http://Leumi/PdfUtilities/Service/2015/04" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="http://Leumi/PdfUtilities/Service/2015/04" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
<!-- <wsp:Policy wsu:Id="BasicHttpBinding_IPdfUtilitiesService_policy">
<wsp:ExactlyOne>
<wsp:All>
<http:NegotiateAuthentication
xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http" />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>-->
<wsdl:types>
<xsd:schema targetNamespace="http://Leumi/PdfUtilities/Service/2015/04/Imports">
<xsd:import
schemaLocation="http://ntas107704t67/WsPdfUtilities/PdfUtilitiesService.svc?xsd=xsd0"
namespace="http://Leumi/PdfUtilities/Service/2015/04" />
<xsd:import
schemaLocation="http://ntas107704t67/WsPdfUtilities/PdfUtilitiesService.svc?xsd=xsd1"
namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xsd:import
schemaLocation="http://ntas107704t67/WsPdfUtilities/PdfUtilitiesService.svc?xsd=xsd2"
namespace="http://schemas.datacontract.org/2004/07/System.Drawing" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="IPdfUtilitiesService_Convert_InputMessage">
<wsdl:part name="parameters" element="tns:Convert" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_Convert_OutputMessage">
<wsdl:part name="parameters" element="tns:ConvertResponse" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_Modify_InputMessage">
<wsdl:part name="parameters" element="tns:Modify" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_Modify_OutputMessage">
<wsdl:part name="parameters" element="tns:ModifyResponse" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_Merge_InputMessage">
<wsdl:part name="parameters" element="tns:Merge" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_Merge_OutputMessage">
<wsdl:part name="parameters" element="tns:MergeResponse" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_GetFileInfo_InputMessage">
<wsdl:part name="parameters" element="tns:GetFileInfo" />
</wsdl:message>
<wsdl:message name="IPdfUtilitiesService_GetFileInfo_OutputMessage">
<wsdl:part name="parameters" element="tns:GetFileInfoResponse" />
</wsdl:message>
<wsdl:portType name="IPdfUtilitiesService">
<wsdl:operation name="Convert">
<wsdl:input
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/Convert"
message="tns:IPdfUtilitiesService_Convert_InputMessage" />
<wsdl:output
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/ConvertResponse"
message="tns:IPdfUtilitiesService_Convert_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="Modify">
<wsdl:input
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/Modify"
message="tns:IPdfUtilitiesService_Modify_InputMessage" />
<wsdl:output
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/ModifyResponse"
message="tns:IPdfUtilitiesService_Modify_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="Merge">
<wsdl:input
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/Merge"
message="tns:IPdfUtilitiesService_Merge_InputMessage" />
<wsdl:output
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/MergeResponse"
message="tns:IPdfUtilitiesService_Merge_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="GetFileInfo">
<wsdl:input
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/GetFileInfo"
message="tns:IPdfUtilitiesService_GetFileInfo_InputMessage" />
<wsdl:output
wsaw:Action="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/GetFileInfoResponse"
message="tns:IPdfUtilitiesService_GetFileInfo_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IPdfUtilitiesService"
type="tns:IPdfUtilitiesService">
<!-- <wsp:PolicyReference URI="#BasicHttpBinding_IPdfUtilitiesService_policy" /> -->
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Convert">
<soap:operation
soapAction="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/Convert"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Modify">
<soap:operation
soapAction="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/Modify"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Merge">
<soap:operation
soapAction="http://Leumi/PdfUtilities/Service/2015/04/IPdfUtilitiesService/Merge"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation
...
javax.xml.ws.soap.SOAPFaultException:无法创建抽象类。
位于org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
位于com.sun.proxy.$Proxy136.convert(未知源)
在leumi.pdfutilities.service.ipdfutilitesservice\u basichttpbindingipdfutilitesservice\u Client.convert(ipdfutilitesservice\u basichttpbindingipdfutilitesservice\u Client.java:72)
位于ext.mesarim.out.Html2PdfConverter.getPdf(Html2PdfConverter.java:73)
位于ext.mesarim.out.Html2PdfConverter.getPdf(Html2PdfConverter.java:127)
在ext.mesarim.out.MesarimHtmlParser.parse(MesarimHtmlParser.java:142)
位于calypsox.tk.bo.document.GatewayMesarimDocumentSender.send(GatewayMesarimDocumentSender.java:136)
在com.calypso.engine.advice.SenderEngine.handleEvent(SenderEngine.java:358)上
位于com.calypso.engine.advice.SenderEngine.process(SenderEngine.java:217)
位于com.calypso.engine.engine$EngineThread.run(engine.java:1413)
原因:org.apache.cxf.binding.soap.SoapFault:无法创建抽象类。
位于org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
位于org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
位于org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
位于org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
位于org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)
位于org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
位于org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
位于org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
位于org.apache.cxf.endpoint.clientmpl.onMessage(clientmpl.java:845)
位于org.apache.cxf.transport.http.httpconductor$WrappedOutputStream.handleResponseInternal(httpconductor.java:1624)
位于org.apache.cxf.transport.http.httpconductor$WrappedOutputStream.handleResponse(httpconductor.java:1513)
位于org.apache.cxf.transport.http.httpconductor$WrappedOutputStream.close(httpconductor.java:1318)
位于org.apache.cxf.transport.AbstractConductor.close(AbstractConductor.java:56)
位于org.apache.cxf.transport.http.httpconductor.close(httpconductor.java:632)
位于org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderdingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
位于org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
位于org.apache.cxf.endpoint.clientmpl.doInvoke(clientmpl.java:570)
位于org.apache.cxf.endpoint.clientmpl.invoke(clientmpl.java:479)
位于org.apache.cxf.endpoint.clientmpl.invoke(clientmpl.java:382)
位于org.apache.cxf.endpoint.clientmpl.invoke(clientmpl.java:335)
位于org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
位于org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
... 9更多
我的wsdl:
IPDFUtilities服务是客户端的接口
这是我的问题
您必须已经在其中一个实现类中实现了这个IPDFutilities服务接口,比如说类名是serviceImpl。在这个类中,您必须重写wsdl中存在的所有操作(方法)
public class serviceImpl implements IPdfUtilitiesService{
@Override
Convert
@Override
Modify
@Override
Merge
@Override
GetFileInfo
}
我认为您忘了在这里重写/定义Convert方法,导致serviceImpl类变得抽象,因为它没有实现IPDFutilities服务接口的所有方法。导致上述错误
用于java中的抽象概念
需要注意的是,实现接口的类必须实现
所有接口的方法。但是,可以定义一个
类,该类未实现接口的所有方法
类被声明为抽象类
在服务器端的webservice实现中,您是否已将IPdfUtilitiesService类声明为抽象,或将Covert方法声明为抽象?我没有编写服务器端。只有cl