java.lang.Nullpointerexception error when sending data to a web service

Asked

Viewed 945 times

0

I have a webservice where I’m sending some data. The return of the service is returning me this message below, in the integration manual, says it would be an internal error, wanted to understand if the problem is on my side or the service provided.

inserir a descrição da imagem aqui

<?xml version="1.0" encoding="ISO-8859-1"?><Message>
    <MessageId>
        <ServiceId>SolicitaLogon</ServiceId>
        <Version>1.0</Version>
        <MsgDesc>Solicitação do Desafio de Logon</MsgDesc>
        <Code>2052105043</Code>
        <FromAddress>TJ</FromAddress>
        <ToAddress>PGE</ToAddress>
        <Date>2018-06-15</Date>
    </MessageId>
    <MessageBody>
        <Resposta>
            <Mensagem>
                <Codigo>1</Codigo>
                <Descricao>ERRO INTERNO; DETALHES: java.lang.NullPointerException</Descricao>
            </Mensagem>
        </Resposta>
    </MessageBody>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>92QOnSuXAIiWFv7wgwywn6/acNM=</DigestValue></Reference></SignedInfo><SignatureValue>MNQVELicGB76yNV3cRIPOaTNxr9DgVy498cgWAVkq3V23E1yFGIg2tGjuCDTEPlkUap5QHT/eMHO
s7Ho7eBh1RDn6Tjj5BIvTRNoXexFx/vE/XS9OnSuVUUqCvuH4y0arLcwlk9NZWnBqvuxEubC7a0o
1rh/KytGAdEKzzryY7E=</SignatureValue><KeyInfo><X509Data><X509Certificate>MIICrzCCAhgCCQDVUHUkOXrNMDANBgkqhkiG9w0BAQUFADCBmzELMAkGA1UEBhMCQlIxDzANBgNV
BAgTBkVTVEFETzEPMA0GA1UEBxMGQ0lEQURFMSIwIAYDVQQKExlUUklCVU5BTCBERSBKVVNUSUNB
IFRFU1RFMSIwIAYDVQQLExlUUklCVU5BTCBERSBKVVNUSUNBIFRFU1RFMSIwIAYDVQQDExlUUklC
VU5BTCBERSBKVVNUSUNBIFRFU1RFMB4XDTA4MDUxNDEzMDcwMVoXDTA5MDUxNDEzMDcwMVowgZsx
CzAJBgNVBAYTAkJSMQ8wDQYDVQQIEwZFU1RBRE8xDzANBgNVBAcTBkNJREFERTEiMCAGA1UEChMZ
VFJJQlVOQUwgREUgSlVTVElDQSBURVNURTEiMCAGA1UECxMZVFJJQlVOQUwgREUgSlVTVElDQSBU
RVNURTEiMCAGA1UEAxMZVFJJQlVOQUwgREUgSlVTVElDQSBURVNURTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEA1I94HSi8/QfNhxtRUNIznHfWwekx6nRwc2KawCSCU7laOgI5gH8Hn7fcrgPP
MqjyTPLRybZHuQvYBAVCoSutVbcDEPLZSuRs8oAriupJrNX1+3GUkVwrBTFVWhdmW7mUi88/+LJV
1MPaweZBQ8oYDes3eLnHw9PaCs2myCQ2SzsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQB6vlkAG9UI
rl99AqV7KFPhw8b+ZtBsAfDO3wuL8SN57kIGmJ7UK03gAffOQl1KpzOxRFXPFnqyWH7yqZkpdUbL
xuODBp7iQNNtxqQ20ZyBIAlpPJXM1zMP6FNtYKRWaQFVx00Jf7xQS7bJ584txWfMPKOJnlQ+KnuK
im7ugk3hTQ==</X509Certificate></X509Data></KeyInfo></Signature></Message>

1 answer

1

Your client is written in C#. So there is no way java.lang.NullPointerException on your side. Because as the name of this exception already says, it is a Java exception.

It may even be that you invoked their service with some invalid data or parameter, but even then, it’s still their mistake anyway. 99% of the time, have a NullPointerException being spat out is a programming error. In the other 1% is a sign that the code is a very badly done gambiarra without any kind of decent error handling. In this case, the component from which this error came is their server, and so that’s where the error is.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.