hi. I login to Rapnet and do further operation on rapnet (like import rap price, upload Diamond, delete Diamond). Every thing was working perfectly before. but eventually Login request throwing Null Pointer Exceptions.. below is my cdde for Login..
private static final String TECHNET_NAMESPACE_PREFIX = "technet";
private static final String WEBSERVICE_SECURE_URL
= "https://technet.rapaport.com/webservices/prices/rapaportprices.asmx";
private static final String WEBSERVICE_INSECURE_URL
= "http://technet.rapaport.com/webservices/prices/rapaportprices.asmx";
private String login(String username, String password) throws SOAPException {
final SOAPMessage soapMessage = getSoapMessage();
final SOAPBody soapBody = soapMessage.getSOAPBody();
final SOAPElement loginElement = soapBody.addChildElement("Login", TECHNET_NAMESPACE_PREFIX);
loginElement.addChildElement("Username", TECHNET_NAMESPACE_PREFIX).addTextNode(username);
loginElement.addChildElement("Password", TECHNET_NAMESPACE_PREFIX).addTextNode(password);
soapMessage.saveChanges();
final SOAPConnection soapConnection = getSoapConnection();
final SOAPMessage soapMessageReply = soapConnection.call(soapMessage, WEBSERVICE_SECURE_URL);
final String textContent = soapMessageReply.getSOAPHeader().getFirstChild().getTextContent();
soapConnection.close();
return textContent;
}
red color line throwing exception....
i don't understand what happened. because it was working perfectly till now.
Thanks and Regards
Digesh Patel (Ph. : 9909531610)