Java question on GetLetterStatus
I am trying to integrate the PostalMethods API with our Java/J2EE web application. I am able to successfully send a letter and get a response (i.e, the letter id).
But, when I try to get the Status of the Letter, I am getting a null pointer exception. I looked into your samples which you provided to try my test case.
This problem occurs when the previously sent letter has an error (in this case the Address is invalid). The code I am trying is below
GetLetterStatusResponse response = client.getLetterStatus(1234); (note: number 1234 is not the real one)
returnCode = response.getResult().getCode();
System.out.println("Result Code: " + response.getResult().getCode());
The result code is fine. I am getting -3000.
But, when I try
I am getting a null pointer exception.
Could you please help me with this.
Also I see in the resources for GetLetterStatus API, the
How can I get the GetLetterStatusResult object from GetLetterStatusResponse.