错误:System.ServiceModel.FFaultException `1[Service.ServiceErrorMessage]:JBO-GL::GL_INVALID_LEDGER:GL-781535您输入了无效的分类帐值。(故障详细信息等于Service.ServiceErrorMessage(。
搜索时的唯一结果
BasicHttpBinding basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
basicHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
EndpointAddress endpointAddress = new EndpointAddress(new Uri("https://fa-eosd-dev1-saasfaprod1.fa.ocs.oraclecloud.com:443/fscmService/JournalImportService?WSDL"));
ChannelFactory<JournalImportService> factory = new ChannelFactory<JournalImportService>(basicHttpBinding, endpointAddress);
factory.Credentials.UserName.UserName = "user";
factory.Credentials.UserName.Password = "pass";
JournalImportService serviceProxy = factory.CreateChannel();
((ICommunicationObject)serviceProxy).Open();
var opContext = new OperationContext((IClientChannel)serviceProxy);
var prevOpContext = OperationContext.Current; // Optional if there's no way this might already be set
OperationContext.Current = opContext;
importJournalsRequest importJournalsRequest = new importJournalsRequest();
GlInterfaceTransHeader glInterfaceTransHeader = new GlInterfaceTransHeader();
glInterfaceTransHeader.LedgerId = 300000001958365;
List<GlInterface> glInterface = new List<GlInterface>();
glInterface.Add(glInter);
glInterfaceTransHeader.GlInterface = glInterface.ToArray();
importJournalsRequest.interfaceRows = glInterfaceTransHeader;
try
{
var result = await serviceProxy.importJournalsAsync(importJournalsRequest);
//cleanup
factory.Close();
((ICommunicationObject)serviceProxy).Close();
}
catch (Exception ex)
{
throw ex;
}
finally
{
// *** ENSURE CLEANUP *** \
CloseCommunicationObjects((ICommunicationObject)serviceProxy, factory);
OperationContext.Current = prevOpContext; // Or set to null if you didn't capture the previous context
}
}
glInterfaceTransHeader.AccountingDateSpecified=true;