Я создал службу WCF с 2 асинхронными операциями.WCFTestClient возвращает ошибку:
Операция не поддерживается в тестовом клиенте WCF, поскольку он использует тип SendCreditTransferRequest.
Я не понимаю, что операция ProcessingFault
работает идругой (SendCreditTransferRequest
) почему нет.
Мой .svc
код:
namespace SimulatorServices
{
public class RealTimePortType : IRealTimePortType
{
public void SendCreditTransferRequest(SendCreditTransferRequest request)
{
throw new NotImplementedException();
}
public void ProcessingFault(ProcessingFault1 request)
{
throw new NotImplementedException();
}
}
}
Мой .svc.cs
код:
namespace SimulatorServices
{
[ServiceContract]
public interface IRealTimePortType
{
[System.ServiceModel.OperationContractAttribute(IsOneWay = true, Action = "http://realtime247.eu/realtime247/SendCreditTransferRequest")]
[System.ServiceModel.XmlSerializerFormatAttribute()]
void SendCreditTransferRequest(SendCreditTransferRequest request);
[System.ServiceModel.OperationContractAttribute(IsOneWay = true, Action = "http://realtime247.eu/realtime247/ProcessingFault")]
[System.ServiceModel.XmlSerializerFormatAttribute()]
void ProcessingFault(ProcessingFault1 request);
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
[KnownType(typeof(TransactionHeader))]
[KnownType(typeof(Document))]
public partial class SendCreditTransferRequest
{
[System.ServiceModel.MessageHeaderAttribute(Namespace = "urn:eu:nets:realtime247:ri.2015.10.14")]
public TransactionHeader TransactionHeader;
[System.ServiceModel.MessageBodyMemberAttribute(Name = "SendCreditTransferRequest", Namespace = "urn:eu:nets:realtime247:ri.2015.10.14", Order = 0)]
public Document SendCreditTransferRequest1;
public SendCreditTransferRequest()
{
}
public SendCreditTransferRequest(TransactionHeader TransactionHeader, Document SendCreditTransferRequest1)
{
this.TransactionHeader = TransactionHeader;
this.SendCreditTransferRequest1 = SendCreditTransferRequest1;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
[KnownType(typeof(TransactionHeader))]
[KnownType(typeof(ProcessingFault))]
public partial class ProcessingFault1
{
[System.ServiceModel.MessageHeaderAttribute(Namespace = "urn:eu:nets:realtime247:ri.2015.10.14")]
public TransactionHeader TransactionHeader;
[System.ServiceModel.MessageBodyMemberAttribute(Namespace = "urn:eu:nets:realtime247:ri.2015.10.14", Order = 0)]
public ProcessingFault ProcessingFault;
public ProcessingFault1()
{
}
public ProcessingFault1(TransactionHeader TransactionHeader, ProcessingFault ProcessingFault)
{
this.TransactionHeader = TransactionHeader;
this.ProcessingFault = ProcessingFault;
}
}
}
Извините, но яне копируйте все классы, которые я создал ...