'cannot create an abstract class
I'am adding a new method to my SOAP WS,but i'am getting the error "cannot create an abstract class" when testing with soapUI.
[DataContract(Namespace = Configuration.Namespace)]
public class DemandeAutomatique
{
#region Champs
[DataMember(Name = "Titre")]
public string title { get; set; }
[DataMember(Name = "NumeroDemande")]
public string ticketnumber { get; set; }
[DataMember(Name = "GUIDDemande")]
public Guid? incidentid { get; set; }
}
Interface :
[OperationContract]
[FaultContract(typeof(ServiceFault))]
CreateDemandeResponse NotifyForCreate(DemandeAutomatique demande);
Implementation :
public class ManageDemandeService : IManageDemandeService { CreateDemandeResponse IManageDemandeService.NotifyForCreate(DemandeAutomatique demande)
{
ValidationWSDL.NotifyForCreate(ref _log, demande);
using (service = CrmServiceFactory.GetOrganizationServiceProxy())
{
req=
if (service != null)
OrganizationRequest Req = new OrganizationRequest("DemandeWS");
Req["Demande"] = dmd;try
{ OrganizationResponse response = service.Execute(Req);
return new CreateDemandeResponse() { GUIDDemande = Guid.Parse(response.Results["GUIDDemande"].ToString()) };
}
catch (System.ServiceModel.FaultException<OrganizationServiceFault> crmFault)
{
throw new FaultException(new ServiceFault("Erreur lors du traitement plugin. " + crmFault.Detail.Message, crmFault.Detail, ServiceFault.ErreurOrganizationServiceFaultCode));
}
}}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|