Subversion Repositories SmartDukaan

Rev

Rev 517 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 517 Rev 536
Line 22... Line 22...
22
import org.xml.sax.InputSource;
22
import org.xml.sax.InputSource;
23
 
23
 
24
public class AramaxTrackingService {
24
public class AramaxTrackingService {
25
	//public static String ARAMAX_URL = "http://www.aramex.com/track_xml.asp?ShipmentNumber=";
25
	//public static String ARAMAX_URL = "http://www.aramex.com/track_xml.asp?ShipmentNumber=";
26
	
26
	
27
	private static String ARAMAX_URL = "file:///home/rajveer/shop2020/logistics/AWB_Track.xml";
27
	private static String ARAMAX_URL;
28
 
28
 
29
	static{
29
	static{
30
		try {
30
		try {
31
			ARAMAX_URL = ConfigClient.getClient().get(ARAMAX_URL);
31
			ARAMAX_URL = ConfigClient.getClient().get("aramex_update_url");
32
			
32
			
33
		} catch (ConfigException e) {
33
		} catch (ConfigException e) {
34
			ARAMAX_URL = "http://www.aramex.com/track_xml.asp?ShipmentNumber=";
34
			ARAMAX_URL = "file:///root/docs/logistics/AWB_Track.xml";
35
			e.printStackTrace();
35
			e.printStackTrace();
36
		}
36
		}
37
		ARAMAX_URL = "file:///home/rajveer/shop2020/logistics/AWB_Track.xml";
-
 
-
 
37
		
38
	}
38
	}
39
	/*
39
	/*
40
	private static AramaxTrackingService trackingService;
40
	private static AramaxTrackingService trackingService;
41
 
41
 
42
	static{
42
	static{
Line 77... Line 77...
77
				nodes = (NodeList) xpath.evaluate(expression, inputSource,	XPathConstants.NODESET);
77
				nodes = (NodeList) xpath.evaluate(expression, inputSource,	XPathConstants.NODESET);
78
			} 
78
			} 
79
			catch(XPathExpressionException xpee) {
79
			catch(XPathExpressionException xpee) {
80
				return ;
80
				return ;
81
			}
81
			}
-
 
82
			
82
 
83
 
83
			for(int i=nodes.getLength()-1; i>=0; i--) {
84
			for(int i=nodes.getLength()-1; i>=0; i--) {
84
				Node node = nodes.item(i);
85
				Node node = nodes.item(i);
85
				NodeList childNodes = node.getChildNodes();
86
				NodeList childNodes = node.getChildNodes();
86
				ShipmentUpdate update = new ShipmentUpdate();
87
				ShipmentUpdate update = new ShipmentUpdate();