与Siscan集成(网络服务)
一切都好,人们?
我需要使用一些web服务的方法:
http://aplicacao-homologacao.saude.gov.br/ws-siscan/SiscanWS?wsdl
我做的如下(不知道是否正确):
protected static void LiberarLaudo()
{
try
{
var oServicoSISCAN = new SiscanWSClient();
var oliberarLaudo = new liberarLaudo();
oliberarLaudo.identificacao = new identificacao();
oliberarLaudo.laudo = new liberarLaudoXSD();
oliberarLaudo.identificacao.email = "anything";
oliberarLaudo.identificacao.senha = "anything";
oliberarLaudo.identificacao.cnesPrestador = "anything";
oliberarLaudo.identificacao.cnesUnidadeSaude = "anything";
oliberarLaudo.laudo.cartaoSUSPaciente = "anything";
oliberarLaudo.laudo.cpfResponsavelLaudo = "anything";
oliberarLaudo.laudo.dataColeta = "anything";
oliberarLaudo.laudo.tipoExame = "anything";
oliberarLaudo.laudo.numeroProtocoloDaRequisicao = "anything";
oliberarLaudo.laudo.tipoLateralidade = "anything";
oliberarLaudo.identificacao.perfilUsuario = "anything";
//Here happens the exception...
var retorno = oServicoSISCAN.liberarLaudo(oliberarLaudo);
}
catch (Exception ex)
{
throw ex;
}
}
在这里看到抛出的异常(与“附加信息”的翻译)。 点击放大
以下是错误服务器堆栈跟踪:
服务器堆栈跟踪:em System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.SerializeBody(XmlDictionaryWriter writer,MessageVersion version,String action,MessageDescription messageDescription,Object returnValue,Object [] parameters,Boolean isRequest)em System.ServiceModel.Dispatcher.OperationFormatter.SerializeBodyContents(XmlDictionaryWriter作家,MessageVersion版本,对象[]参数,对象的returnValue,布尔isRequest)EM System.ServiceModel.Dispatcher.OperationFormatter.OperationFormatterMessage.OperationFormatterBodyWriter.OnWriteBodyContents(的XmlDictionaryWriter作家)EM System.ServiceModel.Channels.BodyWriterMessage.OnWriteBodyContents(的XmlDictionaryWriter作家)EM系统.ServiceModel.Channels.Message.OnWriteMessage(XmlDictionaryWriter writer)em System.ServiceModel.Channels.BufferedMessageWriter.WriteMessage(Message message,BufferManager bufferManager,Int32 initialOffset,Int32 maxSizeQuota)em System.ServiceModel.Channels.TextMessageEncoderFactor y.TextMessageEncoder.WriteMessage(消息消息,Int32 maxMessageSize,BufferManager bufferManager,Int32 messageOffset)em System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(消息消息,布尔shouldRecycleBuffer)em System.ServiceModel.Channels.HttpOutput.Send(TimeSpan超时)em System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(消息消息,TimeSpan超时)em System.ServiceModel.Channels.RequestChannel.Request(消息消息,TimeSpan超时)em System.ServiceModel.Dispatcher.RequestChannelBinder.Request(消息消息,TimeSpan超时)em System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)em System.ServiceModel.Channels.ServiceChannelProxy.InvokeService IMethodCallMessage methodCall,ProxyOperationRuntime操作)em System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)
在[0]处重新生成异常:em Siscan.Program.LiberarLaudo()na d: Projetos Ciprodam Antonio-Testes Siscan Siscan Program.cs:linha 216 em Siscan.Program.Main(String [] args)na d: Projetos Ciprodam Antonio-Testes Siscan Siscan Program.cs:linha 20 em System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,String [] args)em System.AppDomain.ExecuteAssembly(String assemblyFile,Evidence assemblySecurity,String [] args)em Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()em System.Threading.ThreadHelper.ThreadStart_Context(Object state)em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)em System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)em System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state)em System.Threading.ThreadHelper.Th readStart()
请任何人都可以帮助我使这个Web服务工作?
非常感谢您的关注!
上一篇: Integration with Siscan (web service)
下一篇: CommunicationException while using the Atlassian .NET SDK