类型为';的未处理异常;System.ServiceModel.FaultException';发生在mscorlib.dll-Java Weblogic和C#应用程序中
在这个问题上我需要帮助 当我将weblogic项目从ant迁移到Maven平台(使用WSDL服务)并从.NETC#客户端应用程序使用它时,我遇到了一些麻烦。首先,当我尝试使用该服务时,我不知道发生了什么,因为当我在客户端更新引用时,我得到一个名为“Reference.cs”的文件,所有服务都定义为以下代码:类型为';的未处理异常;System.ServiceModel.FaultException';发生在mscorlib.dll-Java Weblogic和C#应用程序中,java,c#,.net,windows,weblogic,Java,C#,.net,Windows,Weblogic,在这个问题上我需要帮助 当我将weblogic项目从ant迁移到Maven平台(使用WSDL服务)并从.NETC#客户端应用程序使用它时,我遇到了一些麻烦。首先,当我尝试使用该服务时,我不知道发生了什么,因为当我在客户端更新引用时,我得到一个名为“Reference.cs”的文件,所有服务都定义为以下代码: public **abstract** partial class NameService: xmlObject { private int attributeName;
public **abstract** partial class NameService: xmlObject {
private int attributeName;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
public int AtributeName{
get {
return this.attributeName;
}
set {
this.attributeName= value;
this.RaisePropertyChanged("AtributeName");
}
}
在SetDataReq()方法中,我只使用值设置所有服务字段。
因此,当我执行此代码时,会出现以下错误:
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll
Additional information: javax.xml.bind.JAXBException
- with linked exception:
[org.xml.sax.SAXException:
Exception Description: The instance creation method [com.latam.xxx.xxx.serviceName.<Default Constructor>], with no parameters, does not exist, or is not accessible.
Internal Exception: java.lang.NoSuchMethodException: com.latam.xxx.xxx.serviceName.<init>()
Descriptor: XMLDescriptor(com.latam.xxx.xxx.serviceName --> [DatabaseTable(ns0:serviceName)])
Exception [EclipseLink-63] (Eclipse Persistence Services - 2.6.5.v20170607-b3d05bd): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The instance creation method [com.latam.xxx.xxx.serviceName.<Default Constructor>], with no parameters, does not exist, or is not accessible.
Internal Exception: java.lang.NoSuchMethodException: com.latam.xxx.xxx.serviceName.<init>()
Descriptor: XMLDescriptor(com.latam.xxx.xxx.serviceName --> [DatabaseTable(ns0:serviceName)])]
在mscorlib.dll中发生“System.ServiceModel.FaultException”类型的未处理异常
其他信息:javax.xml.bind.JAXBException
-除此之外:
[org.xml.sax.SAXException:
异常描述:实例创建方法[com.latam.xxx.xxx.serviceName.]不带参数,不存在或不可访问。
内部异常:java.lang.NoSuchMethodException:com.latam.xxx.xxx.serviceName。()
描述符:XMLDescriptor(com.latam.xxx.xxx.serviceName-->[数据库表(ns0:serviceName)])
异常[EclipseLink-63](Eclipse持久性服务-2.6.5.v20170607-b3d05bd):org.Eclipse.Persistence.exceptions.DescriptorException
异常描述:实例创建方法[com.latam.xxx.xxx.serviceName.]不带参数,不存在或不可访问。
内部异常:java.lang.NoSuchMethodException:com.latam.xxx.xxx.serviceName。()
描述符:XMLDescriptor(com.latam.xxx.xxx.serviceName-->[数据库表(ns0:serviceName)])]
在服务器端,我没有捕获任何日志或警告/错误
我希望您能帮助我,非常感谢。您应该扩展抽象类,而不是修改它们。抽象类没有构造函数,不能像您尝试的那样实例化。因此错误:>没有参数的实例创建方法[com.latam.xxx.xxx.serviceName.]不存在或不可访问。你是对的,但我有一个疑问。以前,当服务器在Ant平台上工作时,当我在客户端更新引用时,生成的类不是“抽象的”,而现在在Maven中,类型是抽象的。你知道为什么会这样吗?
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll
Additional information: javax.xml.bind.JAXBException
- with linked exception:
[org.xml.sax.SAXException:
Exception Description: The instance creation method [com.latam.xxx.xxx.serviceName.<Default Constructor>], with no parameters, does not exist, or is not accessible.
Internal Exception: java.lang.NoSuchMethodException: com.latam.xxx.xxx.serviceName.<init>()
Descriptor: XMLDescriptor(com.latam.xxx.xxx.serviceName --> [DatabaseTable(ns0:serviceName)])
Exception [EclipseLink-63] (Eclipse Persistence Services - 2.6.5.v20170607-b3d05bd): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The instance creation method [com.latam.xxx.xxx.serviceName.<Default Constructor>], with no parameters, does not exist, or is not accessible.
Internal Exception: java.lang.NoSuchMethodException: com.latam.xxx.xxx.serviceName.<init>()
Descriptor: XMLDescriptor(com.latam.xxx.xxx.serviceName --> [DatabaseTable(ns0:serviceName)])]