Integration with Siscan (web service)

All ok, people?

I need consume some methods of a webservice available at:
http://aplicacao-homologacao.saude.gov.br/ws-siscan/SiscanWS?wsdl
I'm doing as follows (do not know if it's the right way):

    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;
        }
    }

See here the thrown exception (with the Translate of "Additional Information"). click to zoom

在这里输入图像描述


Below is the error server stack trace:

Server stack trace: 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 writer, MessageVersion version, Object[] parameters, Object returnValue, Boolean isRequest) em System.ServiceModel.Dispatcher.OperationFormatter.OperationFormatterMessage.OperationFormatterBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer) em System.ServiceModel.Channels.BodyWriterMessage.OnWriteBodyContents(XmlDictionaryWriter writer) em System.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(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset) em System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message message, Boolean shouldRecycleBuffer) em System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) em System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) em System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) em System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) 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 operation) em System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: em Siscan.Program.LiberarLaudo() na d:ProjetosCiprodamAntonio-TestesSiscanSiscanProgram.cs:linha 216 em Siscan.Program.Main(String[] args) na d:ProjetosCiprodamAntonio-TestesSiscanSiscanProgram.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()

Please can anyone help me to make this web service work?
Thanks so much for attention!

链接地址: http://www.djcxy.com/p/95942.html

上一篇: 你调用的对象是空的

下一篇: 与Siscan集成(网络服务)